Compare commits

..
178 changed files with 1345 additions and 13713 deletions

No files matched your search

+1 -7
View File
@@ -7,7 +7,7 @@ on:
push:
branches: [main]
workflow_run:
workflows: [Build APK, Unit tests]
workflows: [Build APK]
types: [completed]
workflow_dispatch:
inputs:
@@ -21,12 +21,6 @@ permissions:
pull-requests: read
statuses: write
# Build APK and Unit tests each trigger a validation, and the last one to post sets the status. Queued runs for a
# commit wait, so the newest one reads both results and posts last.
concurrency:
group: build-validation-${{ github.event.pull_request.head.sha || github.event.workflow_run.head_sha || inputs.pr_number || github.sha }}
cancel-in-progress: false
jobs:
validate:
name: Validate source and build result
+120 -10
View File
@@ -1,5 +1,5 @@
name: Build APK
run-name: ${{ github.event_name == 'pull_request' && format('building pr {0} on {1} against {2}', github.event.pull_request.number, github.event.pull_request.head.sha, github.event.pull_request.base.sha) || format('building {0} on {1}', github.ref_name, github.sha) }}
run-name: ${{ github.event_name == 'pull_request' && format('building pr {0} on {1}', github.event.pull_request.number, github.event.pull_request.head.sha) || format('building {0} on {1}', github.ref_name, github.sha) }}
on:
push:
@@ -57,18 +57,15 @@ jobs:
- name: Pin and merge the APK source
id: merge
if: github.event_name == 'pull_request'
env:
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
set -euo pipefail
# Unit tests uses the same event snapshot, including when either workflow is rerun.
git fetch --no-tags origin "$PR_BASE_SHA"
echo "base-sha=$PR_BASE_SHA" >> "$GITHUB_OUTPUT"
git fetch --no-tags origin main
echo "base-sha=$(git rev-parse origin/main)" >> "$GITHUB_OUTPUT"
git config user.name "ci"
git config user.email "ci@users.noreply.github.com"
# Partial clone: a merged blob that only exists in a fork's history can't be lazily fetched (GitHub: "not our ref"); merge-tree writes it locally first.
git merge-tree --write-tree HEAD FETCH_HEAD >/dev/null || true
git merge --no-ff --no-edit FETCH_HEAD
git merge-tree --write-tree HEAD origin/main >/dev/null || true
git merge --no-ff --no-edit origin/main
- name: Resolve trusted manifest base
id: trusted
if: github.event_name != 'pull_request'
@@ -352,7 +349,7 @@ jobs:
build:
needs: [source, components, xbox, build-runner]
name: Compile APK
name: Compile APK and Android tests
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
runs-on: ${{ fromJSON(needs.build-runner.outputs.labels) }}
timeout-minutes: 45
@@ -510,7 +507,23 @@ jobs:
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
BUILD_REF: ${{ github.ref_name }}
BUILD_SHA: ${{ github.sha }}
run: bash tools/ci/build-label.sh
run: |
if [[ -n "$(git status --porcelain)" ]]; then
tree_state=dirty
else
tree_state=clean
fi
echo "DROIDDECK_BUILD_TREE_STATE=$tree_state" >> "$GITHUB_ENV"
if [[ -n "$PR_NUMBER" ]]; then
label="pr${PR_NUMBER} at ${PR_HEAD_SHA:0:7}"
else
label="${BUILD_REF} at ${BUILD_SHA:0:7}"
fi
echo "label=$label" >> "$GITHUB_OUTPUT"
echo "DROIDDECK_SOURCE_COMMIT=${PR_HEAD_SHA:-$BUILD_SHA}" >> "$GITHUB_ENV"
echo "DROIDDECK_PR_NUMBER=${PR_NUMBER:-0}" >> "$GITHUB_ENV"
echo "DROIDDECK_PR_TITLE=${PR_TITLE//$'\n'/ }" >> "$GITHUB_ENV"
echo "Build: \`$label\`" >> "$GITHUB_STEP_SUMMARY"
- name: Rust toolchain for the store engines (aarch64-linux-android)
id: rust
@@ -721,6 +734,101 @@ jobs:
if-no-files-found: ignore
overwrite: true
- name: Resolve the Robolectric version
id: robolectric
run: |
echo "version=$(grep -o "org.robolectric:robolectric:[0-9.]*" app/build.gradle | cut -d: -f3)" >> "$GITHUB_OUTPUT"
# Robolectric downloads these from Maven Central on first use without retrying, and 429s fail whole test classes.
# The cache path sits beside the workspace because runner homes are at different depths from it, and
# actions/cache stores paths relative to the workspace. It is passed as an absolute path: the save action rejects
# "..". Runners that keep their own ~/.m2 skip the cache.
- name: Place Robolectric's Android jars beside the workspace
id: robolectric-jars
run: |
set -euo pipefail
jars="$GITHUB_WORKSPACE/../robolectric-jars"
m2="$HOME/.m2/repository/org/robolectric/android-all-instrumented"
if [ -d "$m2" ] && [ ! -L "$m2" ]; then
echo "cache=false" >> "$GITHUB_OUTPUT"
else
mkdir -p "$jars" "$(dirname "$m2")"
jars=$(cd "$jars" && pwd)
ln -sfn "$jars" "$m2"
echo "path=$jars" >> "$GITHUB_OUTPUT"
echo "cache=true" >> "$GITHUB_OUTPUT"
fi
- name: Restore Robolectric's Android jars
id: robolectric-cache
if: steps.robolectric-jars.outputs.cache == 'true'
uses: actions/cache/restore@v4
with:
path: ${{ steps.robolectric-jars.outputs.path }}
key: robolectric-android-all-v3-${{ steps.robolectric.outputs.version }}-${{ github.run_id }}
restore-keys: robolectric-android-all-v3-${{ steps.robolectric.outputs.version }}-
- name: Count the restored Robolectric jars
if: steps.robolectric-jars.outputs.cache == 'true'
run: echo "ROBOLECTRIC_JARS_BEFORE=$(find "$GITHUB_WORKSPACE/../robolectric-jars" -name '*.jar' | wc -l)" >> "$GITHUB_ENV"
- name: Unit tests
id: unit-tests
env:
DROIDDECK_BUILD_LABEL: ${{ steps.build-label.outputs.label }}
SGDB_API_KEY: ${{ secrets.SGDB_API_KEY }}
run: |
set -o pipefail
mkdir -p app/build
# A Maven 429 fails every test class that needs the missing jar. The jars an attempt did get stay for the next.
for wait in 60 180 0; do
status=0
./gradlew testReleaseUnitTest --console=plain --info --stacktrace -Drobolectric.logging=stderr -PndkVersion="$NDK_VERSION" 2>&1 | tee app/build/unit-tests.log || status=$?
if [ "$status" = 0 ] || [ "$wait" = 0 ] || ! grep -Eq '^[[:space:]]*(Caused by: org\.gradle\.internal\.resource\.transport\.http\.HttpErrorStatusCodeException: Could not GET .*https://repo\.maven\.apache\.org/.*Received status code 429 from server|Caused by: java\.io\.IOException: Server returned HTTP response code: 429 for URL: https://repo\.maven\.apache\.org/)' app/build/unit-tests.log; then
exit "$status"
fi
echo "::warning::Maven Central answered 429; running the unit tests again in ${wait}s"
sleep "$wait"
done
# actions/cache only saves when the job succeeds, so a run whose tests died on a Maven 429 never filled the cache.
# Save the complete jars even after a failed test step, when this run added some; a partial download is dropped first.
- name: Save Robolectric's Android jars
id: robolectric-jars-final
if: always() && steps.robolectric-jars.outputs.cache == 'true'
run: |
python3 - <<'PY'
import glob, os, zipfile
root = os.path.join(os.environ['GITHUB_WORKSPACE'], '..', 'robolectric-jars')
for f in glob.glob(os.path.join(root, '**', '*'), recursive=True):
if not os.path.isfile(f):
continue
try:
ok = f.endswith('.jar') and zipfile.ZipFile(f).testzip() is None
except Exception:
ok = False
if not ok:
os.remove(f)
PY
after=$(find "$GITHUB_WORKSPACE/../robolectric-jars" -name '*.jar' | wc -l)
[ "$after" -gt "${ROBOLECTRIC_JARS_BEFORE:-0}" ] && echo "save=true" >> "$GITHUB_OUTPUT" || true
- name: Store Robolectric's Android jars
if: always() && steps.robolectric-jars-final.outputs.save == 'true'
uses: actions/cache/save@v4
with:
path: ${{ steps.robolectric-jars.outputs.path }}
key: robolectric-android-all-v3-${{ steps.robolectric.outputs.version }}-${{ github.run_id }}
- 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
overwrite: true
- name: Sign with the testkey (v1 + v2 + v3)
run: |
set -euo pipefail
@@ -776,6 +884,8 @@ 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 }}
run: bash tools/release/report-build.sh
-7
View File
@@ -47,13 +47,6 @@ jobs:
echo "::error::main ${GITHUB_SHA::7} has no successful Build APK run yet: wait for it, then release"
exit 1
fi
tests=$(gh run list -R "$GITHUB_REPOSITORY" --workflow unit-tests.yml --branch main --commit "$GITHUB_SHA" \
--json conclusion,event,headSha -L 20 |
jq -r --arg sha "$GITHUB_SHA" '[.[] | select(.headSha == $sha and (.event == "push" or .event == "workflow_dispatch"))][0].conclusion // empty')
if [ "$tests" != success ]; then
echo "::error::main ${GITHUB_SHA::7} has no passing Unit tests run (${tests:-none yet}): fix or wait for it, then release"
exit 1
fi
variants=$(awk '!/^#/ && NF { print $1 }' tools/release/variants.txt | jq -R . | jq -sc .)
echo "run_id=$id" >> "$GITHUB_OUTPUT"
echo "variants=$variants" >> "$GITHUB_OUTPUT"
-182
View File
@@ -1,182 +0,0 @@
name: Unit tests
run-name: ${{ github.event_name == 'pull_request' && format('unit tests for pr {0} on {1} against {2}', github.event.pull_request.number, github.event.pull_request.head.sha, github.event.pull_request.base.sha) || format('unit tests for {0} on {1}', github.ref_name, github.sha) }}
# Runs beside Build APK rather than inside it, so a test build is published as soon as the APK compiles.
# Build validation folds this workflow's result into the "Build APK" commit status, and Release APKs requires it.
on:
push:
branches: [ main ]
paths-ignore:
- '**/*.md'
- 'LICENSE'
- '.gitignore'
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
pull_request:
branches: [ main ]
types: [ opened, synchronize, reopened, ready_for_review ]
paths-ignore:
- '**/*.md'
- 'LICENSE'
- '.gitignore'
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
workflow_dispatch:
permissions:
contents: read
actions: read
concurrency:
group: unit-tests-${{ github.event.pull_request.number || (github.event_name == 'push' && 'main') || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
jobs:
unit-tests:
name: Unit tests
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
sparse-checkout: |
/*
!/docs/releases/media/
sparse-checkout-cone-mode: false
persist-credentials: false
- name: Merge the pinned APK base
if: github.event_name == 'pull_request'
env:
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
set -euo pipefail
git config user.name "ci"
git config user.email "ci@users.noreply.github.com"
git fetch --no-tags origin "$PR_BASE_SHA"
git merge-tree --write-tree HEAD FETCH_HEAD >/dev/null || true
git merge --no-ff --no-edit FETCH_HEAD || { echo "::error::the pull request conflicts with main; Build APK lists the files"; exit 1; }
- name: Check out MaliBridge
run: git submodule update --init external/MaliBridge
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
cache-cleanup: ${{ github.event_name == 'pull_request' && 'never' || 'on-success' }}
- name: Resolve the pinned Android NDK
run: bash tools/ci/resolve-ndk.sh
- name: Set the APK build label
id: build-label
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
BUILD_REF: ${{ github.ref_name }}
BUILD_SHA: ${{ github.sha }}
run: bash tools/ci/build-label.sh
- name: Resolve the Robolectric version
id: robolectric
run: |
echo "version=$(grep -o "org.robolectric:robolectric:[0-9.]*" app/build.gradle | cut -d: -f3)" >> "$GITHUB_OUTPUT"
# Robolectric downloads these from Maven Central on first use without retrying, and 429s fail whole test classes.
# The cache path sits beside the workspace because runner homes are at different depths from it, and
# actions/cache stores paths relative to the workspace. It is passed as an absolute path: the save action rejects
# "..". Runners that keep their own ~/.m2 skip the cache.
- name: Place Robolectric's Android jars beside the workspace
id: robolectric-jars
run: |
set -euo pipefail
jars="$GITHUB_WORKSPACE/../robolectric-jars"
m2="$HOME/.m2/repository/org/robolectric/android-all-instrumented"
if [ -d "$m2" ] && [ ! -L "$m2" ]; then
echo "cache=false" >> "$GITHUB_OUTPUT"
else
mkdir -p "$jars" "$(dirname "$m2")"
jars=$(cd "$jars" && pwd)
ln -sfn "$jars" "$m2"
echo "path=$jars" >> "$GITHUB_OUTPUT"
echo "cache=true" >> "$GITHUB_OUTPUT"
fi
- name: Restore Robolectric's Android jars
id: robolectric-cache
if: steps.robolectric-jars.outputs.cache == 'true'
uses: actions/cache/restore@v4
with:
path: ${{ steps.robolectric-jars.outputs.path }}
key: robolectric-android-all-v3-${{ steps.robolectric.outputs.version }}-${{ github.run_id }}
restore-keys: robolectric-android-all-v3-${{ steps.robolectric.outputs.version }}-
- name: Count the restored Robolectric jars
if: steps.robolectric-jars.outputs.cache == 'true'
run: echo "ROBOLECTRIC_JARS_BEFORE=$(find "$GITHUB_WORKSPACE/../robolectric-jars" -name '*.jar' | wc -l)" >> "$GITHUB_ENV"
- name: Unit tests
id: unit-tests
env:
DROIDDECK_BUILD_LABEL: ${{ steps.build-label.outputs.label }}
SGDB_API_KEY: ${{ secrets.SGDB_API_KEY }}
run: |
set -o pipefail
mkdir -p app/build
# A Maven 429 fails every test class that needs the missing jar. The jars an attempt did get stay for the next.
for wait in 60 180 0; do
status=0
./gradlew testReleaseUnitTest --console=plain --info --stacktrace -Drobolectric.logging=stderr -PskipRust=true -PunitTestsOnly=true -PndkVersion="$NDK_VERSION" 2>&1 | tee app/build/unit-tests.log || status=$?
if [ "$status" = 0 ] || [ "$wait" = 0 ] || ! grep -Eq '^[[:space:]]*(Caused by: org\.gradle\.internal\.resource\.transport\.http\.HttpErrorStatusCodeException: Could not GET .*https://(repo\.maven\.apache\.org|repo1\.maven\.org)/.*Received status code 429 from server|Caused by: java\.io\.IOException: Server returned HTTP response code: 429 for URL: https://(repo\.maven\.apache\.org|repo1\.maven\.org)/)' app/build/unit-tests.log; then
exit "$status"
fi
echo "::warning::Maven Central answered 429; running the unit tests again in ${wait}s"
sleep "$wait"
done
# actions/cache only saves when the job succeeds, so a run whose tests died on a Maven 429 never filled the cache.
# Save the complete jars even after a failed test step, when this run added some; a partial download is dropped first.
- name: Save Robolectric's Android jars
id: robolectric-jars-final
if: always() && steps.robolectric-jars.outputs.cache == 'true'
run: |
python3 - <<'PY'
import glob, os, zipfile
root = os.path.join(os.environ['GITHUB_WORKSPACE'], '..', 'robolectric-jars')
for f in glob.glob(os.path.join(root, '**', '*'), recursive=True):
if not os.path.isfile(f):
continue
try:
ok = f.endswith('.jar') and zipfile.ZipFile(f).testzip() is None
except Exception:
ok = False
if not ok:
os.remove(f)
PY
after=$(find "$GITHUB_WORKSPACE/../robolectric-jars" -name '*.jar' | wc -l)
[ "$after" -gt "${ROBOLECTRIC_JARS_BEFORE:-0}" ] && echo "save=true" >> "$GITHUB_OUTPUT" || true
- name: Store Robolectric's Android jars
if: always() && steps.robolectric-jars-final.outputs.save == 'true'
uses: actions/cache/save@v4
with:
path: ${{ steps.robolectric-jars.outputs.path }}
key: robolectric-android-all-v3-${{ steps.robolectric.outputs.version }}-${{ github.run_id }}
- 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
overwrite: true
+2 -2
View File
@@ -7,7 +7,7 @@
- For an install-and-look iteration, use `tools/quick_deploy.sh` (build without lint, sign, install, about 30 s). Run `tools/build_local.sh` once to prepare the runtime and again only before a PR. It is not a per-change step.
- `tools/build_local.sh` reuses the components a main CI run prepared when every recipe identity matches the local tree (it prints `components: … reusing`). It builds them locally when no usable CI artifact matches (after you change their inputs, or when the lookup fails) or with `DROIDDECK_CI_COMPONENTS=0`.
- Helper scripts (`tools/linuxfs/overlay`, `tools/linuxfs/desktop`) are staged on every Gradle build, so editing them needs no `build_local.sh`. After preloads or other runtime components change, the fast loop warns and reuses the old binaries; run `tools/build_local.sh` when those matter. "Missing or changed runtime input" means the prepared files themselves changed: run `tools/build_local.sh` once. Do not revert scripts or copy `app/build` between checkouts; `tools/seed_worktree.sh` seeds a new worktree from the main checkout.
- Every build defaults to the NDK in `tools/ci/toolchains.env`, as CI does. CI runs `testReleaseUnitTest` in the `Unit tests` workflow, beside Build APK; when a test fails only in CI, run the release variant locally.
- Every build defaults to the NDK in `tools/ci/toolchains.env`, as CI does. CI runs `testReleaseUnitTest`; when a test fails only in CI, run the release variant locally.
- Run the tests that cover what you changed, including unchanged tests of code you edited: `./gradlew -PskipRust=true :app:testDebugUnitTest --tests '<class>'` and `python3 -m unittest discover -s tools/tests -p 'test_<area>*.py'`. The full Python suite takes about 9 minutes, and some preload tests fail on any host without zram/ntsync. Leave full runs to CI.
- For UI screenshots without a device, run `./gradlew -PskipRust=true :app:testDebugUnitTest --tests '*PreviewRenderTest'` and read `app/build/preview-renders/{handheld,portrait}/`. Add cases per `docs/compose-previews.md`. Check portrait, not just landscape.
- After changing `SettingsIndex`, regenerate the doc: `UPDATE_SETTINGS_MAP=1 ./gradlew -PskipRust=true :app:testDebugUnitTest --tests '*SettingsMapTest*'`.
@@ -31,7 +31,7 @@
- CI builds the PR merged onto `main`. Before pushing, merge or rebase onto `origin/main` and compile: most "works locally" Kotlin failures come from that merge.
- Before a PR that touches strings or resources, run `./gradlew :app:lintVitalRelease`. The fast loop skips lint, and lint catches `ExtraTranslation` and missing-locale errors.
- Commit messages and PR bodies must not carry `Co-Authored-By` or other bot trailers. `tools/release/check_authorship.py` fails the build on them.
- `gh run view --log-failed` truncates the unit-test log, so the failing test may not show. Read the whole job log with `gh api repos/Droid-Deck/DroidDeck/actions/jobs/<job-id>/logs`, or `gh run download <run> -n unit-test-results` from the `Unit tests` workflow run. Don't call a failure a runner problem until you have read it.
- `gh run view --log-failed` truncates the unit-test log, so the failing test may not show. Read the whole job log with `gh api repos/Droid-Deck/DroidDeck/actions/jobs/<job-id>/logs`, or `gh run download <run> -n unit-test-results`. Don't call a failure a runner problem until you have read it.
- Only these are known flakes worth a `gh run rerun <run> --failed`: `ProtonMenuAutoTest` "Proton work did not finish", Robolectric `HTTP response code: 429` from Maven, `Gradle Test Executor N finished with non-zero exit value 2`, apt mirror and GitHub API rate-limit errors. Treat any other failure as real.
- A workflow step that names a script your branch lacks means the branch predates a CI change. Rebase onto `main`.
+1 -5
View File
@@ -82,8 +82,6 @@ def buildBranch = providers.environmentVariable('GITHUB_HEAD_REF').getOrNull()?.
?: gitValue(['branch', '--show-current']) ?: ''
def escapeJava = { String value -> value.replace('\\', '\\\\').replace('"', '\\"').replace('\n', ' ').replace('\r', ' ') }
def ciBuild = providers.environmentVariable('GITHUB_ACTIONS').getOrNull() == 'true'
// The Unit tests workflow compiles no APK, so it has no add-on packs to pin.
def unitTestsOnly = project.findProperty('unitTestsOnly')?.toString()?.toBoolean() ?: false
def releaseSigner = rootProject.file('keystore/release-signer.sha256').text.trim()
def commitTime = (gitValue(['show', '-s', '--format=%ct', '--end-of-options', sourceCommit]) ?: '0').with { it.isLong() ? it : '0' }
def desktopKde = rootProject.file('tools/desktop-kde/release.env').readLines()
@@ -98,12 +96,10 @@ def prootPackPin = rootProject.file('tools/packs/proot/release.env').readLines()
def addonPacks = ['proot', 'directaudio', 'tracking', 'xbox', 'comet', 'butler', 'powervr', 'ubisoft', 'rockstar', 'dirt', 'epic'].collectEntries { name ->
def pack = file("build/packs/${name}.tar.zst")
if (!pack.isFile()) {
if (ciBuild && !unitTestsOnly) throw new GradleException("Add-on pack ${pack} is missing: run tools/packs/build.sh app/build/packs")
if (ciBuild) throw new GradleException("Add-on pack ${pack} is missing: run tools/packs/build.sh app/build/packs")
if (name == 'proot' && prootPackPin.PROOT_PACK_SHA256) {
return [(name): [sha256: prootPackPin.PROOT_PACK_SHA256, size: (prootPackPin.PROOT_PACK_SIZE ?: '0') as long]]
}
// A CI APK pins every pack, and CI_BUILD code assumes that, so the tests see a placeholder pin.
if (unitTestsOnly) return [(name): [sha256: '0' * 64, size: 0L]]
return [(name): [sha256: '', size: 0L]]
}
def digest = java.security.MessageDigest.getInstance('SHA-256')
@@ -1,17 +1,13 @@
package com.droiddeck.launcher.ui
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.material.icons.filled.Settings
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import com.droiddeck.launcher.R
import com.droiddeck.launcher.input.SecondScreenMode
@@ -30,50 +26,6 @@ private fun Launcher(tab: String, games: List<com.droiddeck.launcher.frontend.Li
@DroidDeckPreviews @Composable private fun SettingsPreview() = Launcher("setup")
@DroidDeckPreviews @Composable private fun RuntimeMissingPreview() = Launcher("setup", ready = false)
/** [content] over a stand-in wallpaper as the frost shows it, with see-through [cards] or solid ones. */
@Composable
private fun Frosted(transparency: Int = FROST_WALLPAPER_DEFAULT, cards: Boolean = false, cardTransparency: Int = FROST_DEFAULT, content: @Composable () -> Unit) =
DroidDeckTheme(frost = FrostChoice(transparency, cards, cardTransparency)) {
val wallpaper = Brush.linearGradient(listOf(Color(0xFFE2725B), Color(0xFF7A4BC2), Color(0xFF2A9D8F)))
Box(Modifier.fillMaxSize().background(wallpaper).background(LocalFrost.current ?: Color.Transparent)) { content() }
}
@Composable
private fun FrostedLauncher(tab: String, transparency: Int = FROST_WALLPAPER_DEFAULT, cards: Boolean = false, cardTransparency: Int = FROST_DEFAULT) =
Frosted(transparency, cards, cardTransparency) { FrontEndScreen(sampleState(navigate = tab), sampleActions) }
/** A settings step opened over frosted page text with see-through cards: the step is solid, so none of the text shows through it. */
@Composable
private fun FrostedStepOut() = Frosted(cards = true) {
val text: @Composable (Int) -> String = { androidx.compose.ui.res.stringResource(it) }
Column(Modifier.padding(24.dp)) {
val line = List(8) { text(R.string.stores_shelf_new) }.joinToString(" ")
repeat(14) { androidx.compose.material3.Text(line, fontSize = 24.sp, color = LocalPalette.current.onBackground, maxLines = 1, softWrap = false) }
}
androidx.compose.foundation.layout.BoxWithConstraints(Modifier.fillMaxSize()) {
val pill = with(androidx.compose.ui.platform.LocalDensity.current) {
androidx.compose.ui.geometry.Rect(androidx.compose.ui.geometry.Offset((maxWidth - 68.dp).toPx(), 16.dp.toPx()), androidx.compose.ui.geometry.Size(44.dp.toPx(), 44.dp.toPx()))
}
val accent = LocalPalette.current.signal
StepOut(
open = true, pill = pill, preferredSide = StepSide.Left, accent = accent, onDismiss = {}, onClosed = {}, 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(text(R.string.stores_settings_eyebrow))
Column(Modifier.stepItem(1)) {
SettingsRow(text(R.string.stores_show_mature), null) { ToggleSwitch(true, label = text(R.string.stores_show_mature)) {} }
SettingsRow(text(R.string.gog_achievements), text(R.string.gog_achievements_hint)) { ToggleSwitch(false, label = text(R.string.gog_achievements)) {} }
}
}
}
}
@DroidDeckPreviews @Composable private fun FrostedSteamTabPreview() = FrostedLauncher("steam")
@DroidDeckPreviews @Composable private fun FrostedLibraryPreview() = FrostedLauncher("games")
@DroidDeckPreviews @Composable private fun FrostedSettingsCardsPreview() = FrostedLauncher("setup", cards = true)
@DroidDeckPreviews @Composable private fun FrostedSettingsClearestPreview() = FrostedLauncher("setup", transparency = FROST_MAX, cards = true, cardTransparency = FROST_MAX)
@DroidDeckPreviews @Composable private fun FrostedStepOutPreview() = FrostedStepOut()
/** The in-game menu on one page, as a session shows it. */
@Composable
private fun SessionMenu(page: SessionDrawerPage, steam: Boolean = true, desktop: Boolean = false) = PreviewHost {
@@ -120,11 +72,6 @@ internal val previewCases: List<PreviewCase> = listOf(
PreviewCase("downloads") { Launcher("downloads") },
PreviewCase("settings") { Launcher("setup") },
PreviewCase("runtime-missing") { Launcher("setup", ready = false) },
PreviewCase("frosted-steam-tab") { FrostedLauncher("steam") },
PreviewCase("frosted-library", storesLoaded) { FrostedLauncher("games") },
PreviewCase("frosted-settings-cards") { FrostedLauncher("setup", cards = true) },
PreviewCase("frosted-settings-clearest") { FrostedLauncher("setup", transparency = FROST_MAX, cards = true, cardTransparency = FROST_MAX) },
PreviewCase("frosted-step-out") { FrostedStepOut() },
PreviewCase("session-menu-controller") { SessionMenu(SessionDrawerPage.CONTROLLER) },
PreviewCase("session-menu-display") { SessionMenu(SessionDrawerPage.DISPLAY) },
PreviewCase("session-menu-hud") { SessionMenu(SessionDrawerPage.HUD) },
-64
View File
@@ -417,69 +417,5 @@
android:name="backend:com.google.android.datatransport.cct.CctBackendFactory"
tools:node="remove" />
</service>
<service android:name=".runtime.GuestWorker0" android:exported="false" android:process=":g0" />
<service android:name=".runtime.GuestWorker1" android:exported="false" android:process=":g1" />
<service android:name=".runtime.GuestWorker2" android:exported="false" android:process=":g2" />
<service android:name=".runtime.GuestWorker3" android:exported="false" android:process=":g3" />
<service android:name=".runtime.GuestWorker4" android:exported="false" android:process=":g4" />
<service android:name=".runtime.GuestWorker5" android:exported="false" android:process=":g5" />
<service android:name=".runtime.GuestWorker6" android:exported="false" android:process=":g6" />
<service android:name=".runtime.GuestWorker7" android:exported="false" android:process=":g7" />
<service android:name=".runtime.GuestWorker8" android:exported="false" android:process=":g8" />
<service android:name=".runtime.GuestWorker9" android:exported="false" android:process=":g9" />
<service android:name=".runtime.GuestWorker10" android:exported="false" android:process=":g10" />
<service android:name=".runtime.GuestWorker11" android:exported="false" android:process=":g11" />
<service android:name=".runtime.GuestWorker12" android:exported="false" android:process=":g12" />
<service android:name=".runtime.GuestWorker13" android:exported="false" android:process=":g13" />
<service android:name=".runtime.GuestWorker14" android:exported="false" android:process=":g14" />
<service android:name=".runtime.GuestWorker15" android:exported="false" android:process=":g15" />
<service android:name=".runtime.GuestWorker16" android:exported="false" android:process=":g16" />
<service android:name=".runtime.GuestWorker17" android:exported="false" android:process=":g17" />
<service android:name=".runtime.GuestWorker18" android:exported="false" android:process=":g18" />
<service android:name=".runtime.GuestWorker19" android:exported="false" android:process=":g19" />
<service android:name=".runtime.GuestWorker20" android:exported="false" android:process=":g20" />
<service android:name=".runtime.GuestWorker21" android:exported="false" android:process=":g21" />
<service android:name=".runtime.GuestWorker22" android:exported="false" android:process=":g22" />
<service android:name=".runtime.GuestWorker23" android:exported="false" android:process=":g23" />
<service android:name=".runtime.GuestWorker24" android:exported="false" android:process=":g24" />
<service android:name=".runtime.GuestWorker25" android:exported="false" android:process=":g25" />
<service android:name=".runtime.GuestWorker26" android:exported="false" android:process=":g26" />
<service android:name=".runtime.GuestWorker27" android:exported="false" android:process=":g27" />
<service android:name=".runtime.GuestWorker28" android:exported="false" android:process=":g28" />
<service android:name=".runtime.GuestWorker29" android:exported="false" android:process=":g29" />
<service android:name=".runtime.GuestWorker30" android:exported="false" android:process=":g30" />
<service android:name=".runtime.GuestWorker31" android:exported="false" android:process=":g31" />
<service android:name=".runtime.GuestWorker32" android:exported="false" android:process=":g32" />
<service android:name=".runtime.GuestWorker33" android:exported="false" android:process=":g33" />
<service android:name=".runtime.GuestWorker34" android:exported="false" android:process=":g34" />
<service android:name=".runtime.GuestWorker35" android:exported="false" android:process=":g35" />
<service android:name=".runtime.GuestWorker36" android:exported="false" android:process=":g36" />
<service android:name=".runtime.GuestWorker37" android:exported="false" android:process=":g37" />
<service android:name=".runtime.GuestWorker38" android:exported="false" android:process=":g38" />
<service android:name=".runtime.GuestWorker39" android:exported="false" android:process=":g39" />
<service android:name=".runtime.GuestWorker40" android:exported="false" android:process=":g40" />
<service android:name=".runtime.GuestWorker41" android:exported="false" android:process=":g41" />
<service android:name=".runtime.GuestWorker42" android:exported="false" android:process=":g42" />
<service android:name=".runtime.GuestWorker43" android:exported="false" android:process=":g43" />
<service android:name=".runtime.GuestWorker44" android:exported="false" android:process=":g44" />
<service android:name=".runtime.GuestWorker45" android:exported="false" android:process=":g45" />
<service android:name=".runtime.GuestWorker46" android:exported="false" android:process=":g46" />
<service android:name=".runtime.GuestWorker47" android:exported="false" android:process=":g47" />
<service android:name=".runtime.GuestWorker48" android:exported="false" android:process=":g48" />
<service android:name=".runtime.GuestWorker49" android:exported="false" android:process=":g49" />
<service android:name=".runtime.GuestWorker50" android:exported="false" android:process=":g50" />
<service android:name=".runtime.GuestWorker51" android:exported="false" android:process=":g51" />
<service android:name=".runtime.GuestWorker52" android:exported="false" android:process=":g52" />
<service android:name=".runtime.GuestWorker53" android:exported="false" android:process=":g53" />
<service android:name=".runtime.GuestWorker54" android:exported="false" android:process=":g54" />
<service android:name=".runtime.GuestWorker55" android:exported="false" android:process=":g55" />
<service android:name=".runtime.GuestWorker56" android:exported="false" android:process=":g56" />
<service android:name=".runtime.GuestWorker57" android:exported="false" android:process=":g57" />
<service android:name=".runtime.GuestWorker58" android:exported="false" android:process=":g58" />
<service android:name=".runtime.GuestWorker59" android:exported="false" android:process=":g59" />
<service android:name=".runtime.GuestWorker60" android:exported="false" android:process=":g60" />
<service android:name=".runtime.GuestWorker61" android:exported="false" android:process=":g61" />
<service android:name=".runtime.GuestWorker62" android:exported="false" android:process=":g62" />
<service android:name=".runtime.GuestWorker63" android:exported="false" android:process=":g63" />
</application>
</manifest>
@@ -205,19 +205,15 @@ int ahb_swapchain_present(struct dmabuf_buffer *b, struct surface *s, int scene_
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) {
acquire = exp.fd;
} else {
} else if (dmabuf_fd >= 0) {
if (!g_export_failed_logged) {
g_export_failed_logged = 1;
droiddeck_log("layer", "zero-copy: no acquire fence from the game's dma-buf (%s): %s",
dmabuf_fd >= 0 ? strerror(errno) : "no dma-buf fd",
draw ? "its frames are copied instead" : "it cannot be copied, so each frame is waited for on the CPU");
droiddeck_log("layer", "zero-copy: DMA_BUF_IOCTL_EXPORT_SYNC_FILE failed (%s): waiting for each frame on the CPU instead",
strerror(errno));
}
if (dmabuf_fd >= 0) {
struct pollfd p = {.fd = dmabuf_fd, .events = POLLIN};
int r;
do { r = poll(&p, 1, 100); } while (r < 0 && errno == EINTR);
}
if (draw) return -1;
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, draw,
s ? droiddeck_surface_color(s) : NULL, ab->format);
+16 -223
View File
@@ -2272,69 +2272,6 @@ static void bind_output(struct wl_client *c, void *data, uint32_t ver, uint32_t
struct draw_list { struct vkp_draw *d; int n, cap; };
#define ZERO_COPY_FALLBACK_SIGNATURES 32u
enum zero_copy_fallback_reason {
ZERO_COPY_NO_SURFACE_BUFFER = 1,
ZERO_COPY_NO_GRALLOC_AHB = 2,
ZERO_COPY_AHB_PRESENT_FAILED = 3
};
struct zero_copy_fallback_signature {
uint32_t reason, format, stride, offset;
int width, height;
uint64_t modifier;
};
static struct zero_copy_fallback_signature g_zero_copy_fallbacks[ZERO_COPY_FALLBACK_SIGNATURES];
static uint32_t g_zero_copy_fallback_count;
static int g_zero_copy_fallback_limit_logged;
static int zero_copy_fallback_should_log(const struct dmabuf_buffer *b, uint32_t reason) {
const struct zero_copy_fallback_signature key = {
.reason = reason, .format = b ? b->format : 0,
.stride = b && b->n_planes ? b->stride[0] : 0,
.offset = b && b->n_planes ? b->offset[0] : 0,
.width = b ? b->width : 0, .height = b ? b->height : 0,
.modifier = b ? b->modifier : 0};
for (uint32_t i = 0; i < g_zero_copy_fallback_count; i++) {
const struct zero_copy_fallback_signature *seen = &g_zero_copy_fallbacks[i];
if (seen->reason == key.reason && seen->format == key.format && seen->stride == key.stride &&
seen->offset == key.offset && seen->width == key.width && seen->height == key.height &&
seen->modifier == key.modifier)
return 0;
}
if (g_zero_copy_fallback_count >= ZERO_COPY_FALLBACK_SIGNATURES) {
if (!g_zero_copy_fallback_limit_logged) {
g_zero_copy_fallback_limit_logged = 1;
droiddeck_log("layer", "zero-copy: further fallback diagnostics suppressed after %u distinct buffer signatures",
ZERO_COPY_FALLBACK_SIGNATURES);
}
return 0;
}
g_zero_copy_fallbacks[g_zero_copy_fallback_count++] = key;
return 1;
}
static void note_zero_copy_fallback(struct surface *s, const struct dmabuf_buffer *b, uint32_t reason,
int scene_w, int scene_h, int present_result) {
if (!zero_copy_fallback_should_log(b, reason)) return;
char name[160] = "unknown surface";
if (s) describe(s, name, sizeof(name));
if (reason == ZERO_COPY_NO_SURFACE_BUFFER) {
droiddeck_log("layer", "zero-copy: layer candidate %s has no associated Wayland surface buffer; using the layer-copy path",
name);
} else {
droiddeck_log("layer", "zero-copy: %s buffer %c%c%c%c %dx%d stride %u offset %u modifier 0x%llx %s; "
"scene %dx%d will use the layer-copy path (direct-present result %d)",
name, b->format & 0xff, (b->format >> 8) & 0xff, (b->format >> 16) & 0xff,
(b->format >> 24) & 0xff, b->width, b->height,
b->n_planes ? b->stride[0] : 0, b->n_planes ? b->offset[0] : 0,
(unsigned long long)b->modifier,
reason == ZERO_COPY_NO_GRALLOC_AHB
? "has no registered gralloc AHardwareBuffer"
: "has a registered gralloc AHardwareBuffer but direct presentation failed",
scene_w, scene_h, present_result);
}
}
static int add_cursor(struct draw_list *dl, int scene_w);
static struct vkp_image *surface_image(struct surface *s) {
@@ -2454,53 +2391,17 @@ static int black_fill_below(const struct draw_list *dl, int n) {
return 1;
}
#define LAYER_CANDIDATE_DIAGNOSTICS 32u
static unsigned g_layer_candidate_diag_count;
static int g_layer_candidate_diag_limit;
static void note_layer_candidate_skip(const struct vkp_draw *d, int index, int reason,
int scene_w, int scene_h) {
static int seen[LAYER_CANDIDATE_DIAGNOSTICS][8];
const int key[8] = {index, reason, scene_w, scene_h, d->dx, d->dy, d->dw, d->dh};
for (unsigned i = 0; i < g_layer_candidate_diag_count; i++)
if (!memcmp(seen[i], key, sizeof(key))) return;
if (g_layer_candidate_diag_count >= LAYER_CANDIDATE_DIAGNOSTICS) {
if (!g_layer_candidate_diag_limit++) droiddeck_log("layer", "zero-copy: further candidate-rejection details suppressed after %u signatures",
LAYER_CANDIDATE_DIAGNOSTICS);
return;
}
memcpy(seen[g_layer_candidate_diag_count++], key, sizeof(key));
const char *why = reason == 1 ? "translucent draw" :
reason == 2 ? "image is not DMA-BUF" :
reason == 3 ? "source rectangle is outside/invalid" :
reason == 4 ? "draw rectangle is outside scene or invalid" :
"not fullscreen and no black backing below";
droiddeck_log("layer", "zero-copy: candidate draw %d rejected: %s; scene %dx%d, dst %dx%d at %d,%d, src %.2f,%.2f %.2fx%.2f, image %dx%d",
index, why, scene_w, scene_h, d->dw, d->dh, d->dx, d->dy,
d->sx, d->sy, d->sw, d->sh, vkp_image_width(d->img), vkp_image_height(d->img));
}
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) { note_layer_candidate_skip(d, i, 1, scene_w, scene_h); continue; }
if (!vkp_image_is_dmabuf(d->img)) { note_layer_candidate_skip(d, i, 2, scene_w, scene_h); continue; }
if (d->blend) continue;
if (!vkp_image_is_dmabuf(d->img)) continue;
if (d->sx < 0 || d->sy < 0 || d->sw < 1.0f || d->sh < 1.0f ||
d->sx + d->sw >= vkp_image_width(d->img) + 1.0f ||
d->sy + d->sh >= vkp_image_height(d->img) + 1.0f) {
note_layer_candidate_skip(d, i, 3, scene_w, scene_h);
continue;
}
d->sy + d->sh >= vkp_image_height(d->img) + 1.0f) continue;
if (d->dx == 0 && d->dy == 0 && d->dw == scene_w && d->dh == scene_h) return i;
if (d->dx < 0 || d->dy < 0 || d->dw <= 0 || d->dh <= 0 || d->dx + d->dw > scene_w ||
d->dy + d->dh > scene_h) {
note_layer_candidate_skip(d, i, 4, scene_w, scene_h);
continue;
}
if (!black_fill_below(dl, i)) {
note_layer_candidate_skip(d, i, 5, scene_w, scene_h);
continue;
}
d->dy + d->dh > scene_h || !black_fill_below(dl, i)) continue;
return i;
}
return -1;
@@ -2521,56 +2422,6 @@ static void note_copy_scene(const struct draw_list *dl, int scene_w, int scene_h
vkp_image_is_dmabuf(t->img) ? "GPU" : "memory", t->blend ? ", translucent" : "");
}
static struct surface *surface_for_image(const struct vkp_image *img);
static void note_layer_candidate_rejected(const struct draw_list *dl, int scene_w, int scene_h) {
static int seen[32][14];
static unsigned seen_count;
static int limit_logged;
static time_t window_start;
struct timespec now_ts;
const struct vkp_draw *a = dl->n > 0 ? &dl->d[dl->n - 1] : NULL;
const struct vkp_draw *b = dl->n > 1 ? &dl->d[dl->n - 2] : NULL;
struct surface *sa = a ? surface_for_image(a->img) : NULL;
struct surface *sb = b ? surface_for_image(b->img) : NULL;
const int signature[14] = {
dl->n, scene_w, scene_h,
a ? a->dw : 0, a ? a->dh : 0,
a ? vkp_image_width(a->img) : 0, a ? vkp_image_height(a->img) : 0,
a ? vkp_image_is_dmabuf(a->img) : 0, a ? a->blend : 0, sa && sa->dmabuf_buf ? 1 : 0,
b ? b->dw : 0, b ? b->dh : 0, b ? vkp_image_is_dmabuf(b->img) : 0, sb && sb->dmabuf_buf ? 1 : 0
};
clock_gettime(CLOCK_MONOTONIC, &now_ts);
if (!window_start || now_ts.tv_sec - window_start >= 30) {
seen_count = 0;
limit_logged = 0;
window_start = now_ts.tv_sec;
}
for (unsigned i = 0; i < seen_count; i++)
if (!memcmp(signature, seen[i], sizeof(signature))) return;
if (seen_count >= 32) {
if (!limit_logged++) droiddeck_log("layer", "zero-copy: further fullscreen-candidate rejection details suppressed after 32 signatures in 30 seconds");
return;
}
memcpy(seen[seen_count++], signature, sizeof(signature));
char below[48];
if (b)
snprintf(below, sizeof(below), "%s %dx%d",
vkp_image_is_dmabuf(b->img) ? "DMA-BUF" : "non-DMA-BUF", b->dw, b->dh);
else
snprintf(below, sizeof(below), "none");
droiddeck_log("layer", "zero-copy: no eligible fullscreen DMA-BUF layer candidate: scene %dx%d, %d draws; "
"top draw %dx%d at %d,%d image %dx%d %s%s surface=%s dmabuf=%s; "
"draw below %s",
scene_w, scene_h, dl->n, a ? a->dw : 0, a ? a->dh : 0, a ? a->dx : 0, a ? a->dy : 0,
a ? vkp_image_width(a->img) : 0, a ? vkp_image_height(a->img) : 0,
a && vkp_image_is_dmabuf(a->img) ? "DMA-BUF" : "non-DMA-BUF",
a && a->blend ? " blended" : "",
sa ? "associated" : "unassociated",
sa && sa->dmabuf_buf ? "yes" : "no",
below);
}
static struct surface *surface_for_image(const struct vkp_image *img) {
struct surface *s;
wl_list_for_each(s, &g_surfaces, link)
@@ -2579,56 +2430,16 @@ static struct surface *surface_for_image(const struct vkp_image *img) {
}
static struct surface *ahb_layer_only_candidate(int scene_w, int scene_h) {
static struct {
const struct surface *surface;
int reason, scene_w, scene_h, w, h, buf_w, buf_h, x, y, src_set, dst_set, children;
} seen[32];
static unsigned seen_count;
static int limit_logged;
struct surface *s;
int w = 0, h = 0, reason = 0;
int w, h;
if (wl_list_empty(&g_toplevels)) return NULL;
s = wl_container_of(g_toplevels.prev, s, toplevel_link);
if (!s->dmabuf_buf) reason = 1;
else if (s->dmabuf_buf->img) reason = 2;
else if (!ahb_swapchain_has_ahb(s->dmabuf_buf)) reason = 3;
else if ((g_desktop && !s->placed) || s->x != 0 || s->y != 0 || s->src_set || s->dst_set) reason = 4;
else if (!wl_list_empty(&s->children)) reason = 5;
else if (g_hide_shell && !strcmp(client_name(wl_resource_get_client(s->resource)), "explorer.exe")) reason = 6;
if (!s->dmabuf_buf || s->dmabuf_buf->img || !ahb_swapchain_has_ahb(s->dmabuf_buf)) return NULL;
if ((g_desktop && !s->placed) || s->x != 0 || s->y != 0 || s->src_set || s->dst_set) return NULL;
if (!wl_list_empty(&s->children)) return NULL;
if (g_hide_shell && !strcmp(client_name(wl_resource_get_client(s->resource)), "explorer.exe")) return NULL;
surface_size(s, &w, &h);
if (!reason && (w != scene_w || h != scene_h || s->buf_w != scene_w || s->buf_h != scene_h)) reason = 7;
if (reason) {
int found = 0;
for (unsigned i = 0; i < seen_count; i++) {
if (seen[i].surface == s && seen[i].reason == reason && seen[i].scene_w == scene_w &&
seen[i].scene_h == scene_h && seen[i].w == w && seen[i].h == h &&
seen[i].buf_w == s->buf_w && seen[i].buf_h == s->buf_h && seen[i].x == s->x &&
seen[i].y == s->y && seen[i].src_set == s->src_set && seen[i].dst_set == s->dst_set &&
seen[i].children == !wl_list_empty(&s->children)) { found = 1; break; }
}
if (!found && seen_count < 32) {
seen[seen_count].surface = s; seen[seen_count].reason = reason;
seen[seen_count].scene_w = scene_w; seen[seen_count].scene_h = scene_h;
seen[seen_count].w = w; seen[seen_count].h = h; seen[seen_count].buf_w = s->buf_w; seen[seen_count].buf_h = s->buf_h;
seen[seen_count].x = s->x; seen[seen_count].y = s->y; seen[seen_count].src_set = s->src_set;
seen[seen_count].dst_set = s->dst_set; seen[seen_count].children = !wl_list_empty(&s->children);
seen_count++;
const char *why = reason == 1 ? "no DMA-BUF buffer" :
reason == 2 ? "buffer is already importable by Vulkan" :
reason == 3 ? "no registered gralloc AHardwareBuffer" :
reason == 4 ? "surface is positioned/cropped/scaled" :
reason == 5 ? "surface has child surfaces" :
reason == 6 ? "hidden shell surface" : "surface or buffer dimensions differ from scene";
char name[160]; describe(s, name, sizeof(name));
droiddeck_log("layer", "zero-copy: AHardwareBuffer-only candidate rejected: %s; %s, scene %dx%d, surface %dx%d at %d,%d, buffer %dx%d, crop=%d destination=%d children=%d",
why, name, scene_w, scene_h, w, h, s->x, s->y, s->buf_w, s->buf_h,
s->src_set, s->dst_set, !wl_list_empty(&s->children));
} else if (!found && !limit_logged) {
limit_logged = 1;
droiddeck_log("layer", "zero-copy: further AHardwareBuffer-only candidate diagnostics suppressed after 32 signatures");
}
return NULL;
}
if (w != scene_w || h != scene_h || s->buf_w != scene_w || s->buf_h != scene_h) return NULL;
return s;
}
@@ -3071,10 +2882,7 @@ static void render_scene(void) {
struct surface *ls = li >= 0 ? surface_for_image(dl.d[li].img) : NULL;
const struct vkp_draw *ld = li >= 0 ? &dl.d[li] : NULL;
if (li < 0) ls = layer_only;
if (g_zero_copy && li < 0 && !ls && !blocked && !cardboard) {
if (!cursor_on && !bfi) note_layer_candidate_rejected(&dl, w, h);
note_copy_scene(&dl, w, h, cursor_on);
}
if (g_zero_copy && li < 0 && !ls && !blocked && !cardboard) note_copy_scene(&dl, w, h, cursor_on);
if (cardboard) ls = NULL;
if (cursor_on) ls = NULL;
if (bfi) ls = NULL;
@@ -3102,30 +2910,15 @@ static void render_scene(void) {
r = generated >= 0 ? 0 : -1;
else if (generated >= 0 && !(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, ld);
if (!fg_pass && generated >= 0 && !fx_on && !framegen && r != 0) {
if (!ls || !ls->dmabuf_buf)
note_zero_copy_fallback(ls, NULL, ZERO_COPY_NO_SURFACE_BUFFER, w, h, r);
else if (!ahb_swapchain_has_ahb(ls->dmabuf_buf))
note_zero_copy_fallback(ls, ls->dmabuf_buf, ZERO_COPY_NO_GRALLOC_AHB, w, h, r);
else
note_zero_copy_fallback(ls, ls->dmabuf_buf, ZERO_COPY_AHB_PRESENT_FAILED, w, h, r);
}
if (r == 0 && !fg_pass) g_zero_copy_shown = ls;
else settle_unwaited();
int ov = 0, ov_done = 0;
if (!fg_pass && generated >= 0 && r != 0 && li >= 0) {
if (fx_on) {
r = sc_layer_present_pass(&dl.d[li], 1, w, h);
} else {
r = sc_layer_present(dl.d[li].img, w, h, ld, ls ? droiddeck_surface_color(ls) : NULL,
over == 1 ? &dl.d[li + 1] : NULL, &ov);
ov_done = 1;
}
}
if (!fg_pass && generated >= 0 && r != 0 && li >= 0)
r = fx_on ? sc_layer_present_pass(&dl.d[li], 1, w, h)
: sc_layer_present(dl.d[li].img, w, h, ld, ls ? droiddeck_surface_color(ls) : NULL);
if (r == 0) {
if (ls) ls->drawn = 1;
int go[8];
if (!ov_done && over == 1 && li >= 0 && vkp_map_draw(&dl.d[li + 1], go))
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) {
@@ -62,40 +62,8 @@ struct entry {
static struct wl_list g_entries;
static struct wl_event_loop *g_loop;
static uint64_t g_next_id = 1;
static int g_refused_logged;
static int g_ubwc_promised;
#define DISPLAY_BUFFER_MISMATCH_SIGNATURES 64u
struct display_buffer_mismatch_signature {
uint32_t kind, format, stride, offset;
int width, height;
uint64_t modifier;
};
static struct display_buffer_mismatch_signature g_mismatch_signatures[DISPLAY_BUFFER_MISMATCH_SIGNATURES];
static uint32_t g_mismatch_signature_count;
static int g_mismatch_limit_logged;
static int mismatch_should_log(const struct dmabuf_buffer *b, uint32_t kind) {
const struct display_buffer_mismatch_signature key = {
.kind = kind, .format = b->format, .stride = b->stride[0], .offset = b->offset[0],
.width = b->width, .height = b->height, .modifier = b->modifier};
for (uint32_t i = 0; i < g_mismatch_signature_count; i++) {
const struct display_buffer_mismatch_signature *seen = &g_mismatch_signatures[i];
if (seen->kind == key.kind && seen->format == key.format && seen->stride == key.stride &&
seen->offset == key.offset && seen->width == key.width && seen->height == key.height &&
seen->modifier == key.modifier)
return 0;
}
if (g_mismatch_signature_count >= DISPLAY_BUFFER_MISMATCH_SIGNATURES) {
if (!g_mismatch_limit_logged) {
g_mismatch_limit_logged = 1;
droiddeck_log("layer", "display buffers: further mismatch diagnostics suppressed after %u distinct buffer signatures",
DISPLAY_BUFFER_MISMATCH_SIGNATURES);
}
return 0;
}
g_mismatch_signatures[g_mismatch_signature_count++] = key;
return 1;
}
static int g_ubwc_probed[2];
static uint32_t ahb_format_of(uint32_t drm, uint64_t modifier) {
@@ -270,51 +238,16 @@ static void handle_alloc(struct peer *p, const struct display_buffers_request *q
} else {
if (ahb) AHardwareBuffer_release(ahb);
fd = -1;
static struct {
pid_t pid;
uint32_t width, height, format, stride, offset, reason;
uint64_t size, modifier;
} refused[32];
static unsigned refused_count;
static int refused_limit_logged;
uint32_t reason = !sized ? 1u : !sane ? 2u : !wanted ? 3u :
!ahb_swapchain_advertised() ? 4u :
p->count >= DISPLAY_BUFFERS_MAX_PER_CLIENT ? 5u : 6u;
int seen = 0;
for (unsigned i = 0; i < refused_count; i++) {
if (refused[i].pid == p->pid && refused[i].width == q->width && refused[i].height == q->height &&
refused[i].format == q->format && refused[i].stride == q->stride && refused[i].offset == q->offset &&
refused[i].size == q->size && refused[i].modifier == q->modifier && refused[i].reason == reason) {
seen = 1;
break;
}
}
if (!seen && refused_count < 32) {
refused[refused_count].pid = p->pid;
refused[refused_count].width = q->width;
refused[refused_count].height = q->height;
refused[refused_count].format = q->format;
refused[refused_count].stride = q->stride;
refused[refused_count].offset = q->offset;
refused[refused_count].size = q->size;
refused[refused_count].modifier = q->modifier;
refused[refused_count].reason = reason;
refused_count++;
const char *why = reason == 1 ? "invalid dimensions, format, or stride" :
reason == 2 ? "size/offset/layout sanity check failed" :
reason == 3 ? "zero-copy or UBWC offering is disabled" :
reason == 4 ? "AHardwareBuffer swapchain is not advertised" :
reason == 5 ? "per-client allocation limit reached" :
"gralloc allocation/fd/size validation failed";
droiddeck_log(compressed ? "error" : "layer",
"display buffers: allocation refused for pid %d: %s; request %ux%u %c%c%c%c %s stride=%u offset=%u size=%llu modifier=0x%llx (client has %d allocations)",
(int)p->pid, why, q->width, q->height,
q->format & 0xff, (q->format >> 8) & 0xff, (q->format >> 16) & 0xff, (q->format >> 24) & 0xff,
compressed ? "UBWC" : "linear", q->stride, q->offset,
(unsigned long long)q->size, (unsigned long long)q->modifier, p->count);
} else if (!seen && !refused_limit_logged) {
refused_limit_logged = 1;
droiddeck_log("layer", "display buffers: further allocation-refusal diagnostics suppressed after 32 signatures");
if (sized && wanted && (compressed || !g_refused_logged)) {
g_refused_logged = 1;
droiddeck_log(compressed ? "error" : "layer", "display buffers: no gralloc buffer matches pid %d's %ux%u "
"%c%c%c%c %s layout (stride %u bytes, pixels at %u, %llu bytes; gralloc's layout has pixels at "
"%llu, %llu bytes): %s", (int)p->pid, q->width, q->height,
q->format & 0xff, (q->format >> 8) & 0xff, (q->format >> 16) & 0xff, (q->format >> 24) & 0xff,
compressed ? "UBWC" : "linear", q->stride, q->offset, (unsigned long long)q->size,
(unsigned long long)(compressed ? ubwc_meta_size(q->width, q->height) : 0),
(unsigned long long)(compressed ? ubwc_size(q->width, q->height, q->stride) : q->size),
compressed ? "its compressed frames cannot be shown" : "its frames keep the copy path");
}
}
if (reply(p, &r, fd) != 0 && e) entry_free(e);
@@ -366,18 +299,9 @@ static int on_listen(int fd, uint32_t mask, void *data) {
}
void display_buffers_match(struct wl_client *c, struct wl_resource *buffer, struct dmabuf_buffer *b) {
static int invalid_logged;
struct stat st;
struct entry *e;
if (!g_loop || wl_list_empty(&g_entries)) return;
if (b->n_planes != 1 || b->offset[0] != 0 || fstat(b->fd[0], &st) != 0) {
if (!invalid_logged) {
invalid_logged = 1;
droiddeck_log("layer", "display buffers: cannot associate %s's DMA-BUF with gralloc (plane count %u; expected one plane at offset 0, or fstat failed)",
droiddeck_client_name(c), b->n_planes);
}
return;
}
if (!g_loop || wl_list_empty(&g_entries) || b->n_planes != 1 || b->offset[0] != 0 || fstat(b->fd[0], &st) != 0) return;
wl_list_for_each(e, &g_entries, link) {
if (e->dev != st.st_dev || e->ino != st.st_ino) continue;
AHardwareBuffer_Desc d;
@@ -387,27 +311,11 @@ void display_buffers_match(struct wl_client *c, struct wl_resource *buffer, stru
(uint32_t)b->height == e->height
: (b->modifier == MOD_LINEAR || b->modifier == MOD_INVALID) &&
e->stride == b->stride[0];
const uint32_t expected_format = ahb_format_of(b->format, e->modifier);
const int dimensions = b->width > 0 && b->height > 0 &&
(uint32_t)b->width <= d.width && (uint32_t)b->height <= d.height;
if (laid_out && e->format == expected_format && dimensions) {
if (laid_out && e->format == ahb_format_of(b->format, e->modifier) && b->width > 0 && b->height > 0 &&
(uint32_t)b->width <= d.width && (uint32_t)b->height <= d.height)
ahb_swapchain_adopt(c, buffer, b, e->ahb, e->modifier);
} else if (mismatch_should_log(b, 2)) {
droiddeck_log("layer", "display buffers: gralloc DMA-BUF identity matched but layout was rejected for %s: %c%c%c%c %dx%d stride %u offset %u modifier 0x%llx; gralloc %ux%u stride %u format 0x%x, expected format 0x%x (layout %s, dimensions %s)",
droiddeck_client_name(c), b->format & 0xff, (b->format >> 8) & 0xff,
(b->format >> 16) & 0xff, (b->format >> 24) & 0xff, b->width, b->height,
b->stride[0], b->offset[0], (unsigned long long)b->modifier,
e->width, e->height, e->stride, e->format, expected_format,
laid_out ? "ok" : "mismatch", dimensions ? "ok" : "mismatch");
}
return;
}
if (mismatch_should_log(b, 1)) {
droiddeck_log("layer", "display buffers: no registered gralloc allocation matches %s's DMA-BUF identity: %c%c%c%c %dx%d stride %u offset %u modifier 0x%llx; imported normally, copy path only",
droiddeck_client_name(c), b->format & 0xff, (b->format >> 8) & 0xff,
(b->format >> 16) & 0xff, (b->format >> 24) & 0xff, b->width, b->height,
b->stride[0], b->offset[0], (unsigned long long)b->modifier);
}
}
void display_buffers_init(struct wl_display *display) {
@@ -57,8 +57,6 @@ static int g_engine_cache_gen = -1;
static int g_engine_ok;
static _Atomic int g_failed_kind = -1;
static _Atomic int g_failed_cache_gen = -1;
static _Atomic int g_lost_kind = -1;
static int g_gen_in_flight;
struct ring_image { VkImage img; VkDeviceMemory mem; VkImageView view; int fresh; };
static struct ring_image g_ring[VKP_FG_MAX_GENERATIONS];
@@ -104,7 +102,6 @@ void vkp_framegen_set_armed(int armed, int multiplier, int target_fps) {
if (multiplier > VKP_FG_MAX_GENERATIONS + 1) multiplier = VKP_FG_MAX_GENERATIONS + 1;
if (atomic_exchange(&g_mult, multiplier) != multiplier) atomic_store(&g_cfg_dirty, 1);
if (atomic_exchange(&g_target, target_fps) != target_fps) atomic_store(&g_cfg_dirty, 1);
if (!armed) atomic_store(&g_lost_kind, -1);
atomic_store(&g_armed, armed ? 1 : 0);
LOGD("framegen: set_armed(%d, x%d, target %d fps)", armed, multiplier, target_fps);
}
@@ -138,7 +135,6 @@ void vkp_framegen_set_ddfg_tuning(int model, int perf_preset) {
}
static int start_failed_for(int kind) {
if (atomic_load(&g_lost_kind) == kind) return 1;
return atomic_load(&g_failed_kind) == kind && atomic_load(&g_failed_cache_gen) == atomic_load(&g_cache_gen);
}
@@ -200,12 +196,6 @@ void vkp_framegen_device_ready(VkDevice dev, VkQueue queue, uint32_t qfam, int f
}
void vkp_framegen_device_lost(void) {
if (g_gen_in_flight && g_engine_ok) {
atomic_store(&g_lost_kind, g_engine_kind);
FGLOG("%s was generating when the display GPU was lost: it stays off until frame generation is turned "
"on again", fge_engine_name(g_engine_kind));
}
g_gen_in_flight = 0;
atomic_store(&g_dev_lost, 1);
atomic_store(&g_dev_ready, 0);
fge_device_lost();
@@ -392,7 +382,6 @@ int vkp_framegen_run(VkCommandBuffer cmd, VkImage scene, VkImageView scene_view,
int armed = atomic_load(&g_armed);
int mult = atomic_load(&g_mult);
g_planned = 0;
g_gen_in_flight = 0;
if (!armed || !engine_usable() || w <= 0 || h <= 0) { log_arm_transition(0, kind, mult); return 0; }
if (!ensure_engine(kind)) { log_arm_transition(0, kind, mult); return 0; }
log_arm_transition(1, kind, mult);
@@ -437,7 +426,6 @@ int vkp_framegen_run(VkCommandBuffer cmd, VkImage scene, VkImageView scene_view,
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;
g_gen_in_flight = n_gen > 0;
VkImageMemoryBarrier bars[1 + VKP_FG_MAX_GENERATIONS];
uint32_t nb = 0;
@@ -492,7 +480,6 @@ int vkp_framegen_run(VkCommandBuffer cmd, VkImage scene, VkImageView scene_view,
}
void vkp_framegen_presented(int generated) {
g_gen_in_flight = 0;
if (generated < 0) generated = 0;
int64_t now = now_ns();
if (!g_window_start_ns) { g_window_start_ns = now; g_present_accum = 0; g_source_accum = 0; }
+14 -58
View File
@@ -187,8 +187,6 @@ struct layer {
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 overlay_slot(struct layer *l, struct vkp_image *src, int *idx, int *wait_fd);
static int overlay_shown(struct layer *l, int idx, const int geo[8], int translucent);
static int g_layers_ready;
static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER;
static int g_pending_cb;
@@ -723,15 +721,9 @@ static int layer_geometry(int w, int h, int scene_w, int scene_h, const struct v
static ARect g_game_src, g_game_dst;
static int g_game_geo_known;
static void note_game_geometry(const int r[8]) {
g_game_src = (ARect){r[0], r[1], r[2], r[3]};
g_game_dst = (ARect){r[4], r[5], r[6], r[7]};
g_game_geo_known = 1;
}
static void apply_geometry(ASurfaceTransaction *tx, struct layer *l, const int r[8]) {
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]) note_game_geometry(r);
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 );
l->geo_src = srcR; l->geo_dst = dstR; l->geo_valid = 1;
@@ -1006,40 +998,19 @@ unavailable:
}
int sc_layer_present(struct vkp_image *src, int scene_w, int scene_h, const struct vkp_draw *draw,
const struct droiddeck_color *color, const struct vkp_draw *over, int *over_shown) {
const struct droiddeck_color *color) {
struct layer *l = layer_of(SC_LAYER_GAME);
*over_shown = 0;
if (!src || ensure_sc(l) != 0) return -1;
int sw = vkp_image_width(src), sh = vkp_image_height(src);
int r[8];
int g = layer_geometry(sw, sh, scene_w, scene_h, draw, r);
if (g < 0) return -1;
int og[8];
if (over && !vkp_map_draw(over, og)) over = NULL;
if (g == 0) {
sc_layer_hide();
if (over) *over_shown = sc_layer_present_overlay(over->img, og, over->blend) == 0 ? 1 : -1;
return 0;
}
if (g == 0) { sc_layer_hide(); return 0; }
struct vkp_blit blits[2] = {{.src = src, .wait_fd = -1}, {.src = over ? over->img : NULL, .wait_fd = -1}};
int idx = take_free_slot(l, sw, sh, AHB_RGBA8, &blits[0].wait_fd);
if (idx < 0) {
log_drop(l);
if (g_alloc_failed) return -1;
if (over) *over_shown = sc_layer_present_overlay(over->img, og, over->blend) == 0 ? 1 : -1;
return 0;
}
blits[0].dst = l->slots[idx].img;
struct layer *ol = layer_of(SC_LAYER_OVERLAY);
int over_idx = -1;
if (over) {
note_game_geometry(r);
const int taken = overlay_slot(ol, over->img, &over_idx, &blits[1].wait_fd);
*over_shown = taken < 0 ? -1 : 1;
if (taken > 0) blits[1].dst = ol->slots[over_idx].img;
}
if (vkp_blit_images(blits, over_idx >= 0 ? 2 : 1) != 0) return -1;
int wait_fd;
int idx = take_free_slot(l, sw, sh, AHB_RGBA8, &wait_fd);
if (idx < 0) { log_drop(l); return g_alloc_failed ? -1 : 0; }
if (vkp_blit_image(src, l->slots[idx].img, wait_fd) != 0) return -1;
if (present_slot(l, idx, r, color, 0) != 0) return -1;
if (color && color->dataspace) droiddeck_color_frame_shown(color, DROIDDECK_HDR_LAYER_COPY, AHB_RGBA8);
if (!l->first_logged) {
@@ -1049,7 +1020,6 @@ int sc_layer_present(struct vkp_image *src, int scene_w, int scene_h, const stru
pool_kind(l->pool_modifier), l->pool_n);
}
vkp_signal_first_frame();
if (over_idx >= 0 && overlay_shown(ol, over_idx, og, over->blend) != 0) *over_shown = -1;
return 0;
}
@@ -1239,19 +1209,17 @@ int sc_layer_overlay_affordable(void) {
return ok;
}
static int overlay_slot(struct layer *l, struct vkp_image *src, int *idx, int *wait_fd) {
*wait_fd = -1;
if (!src) return -1;
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;
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);
if (sw <= 0 || sh <= 0) return -1;
*idx = take_free_slot(l, sw, sh, AHB_RGBA8, wait_fd);
if (*idx < 0) { log_drop(l); return g_alloc_failed ? -1 : 0; }
return 1;
}
static int overlay_shown(struct layer *l, int idx, const int geo[8], int translucent) {
int wait_fd;
int idx = take_free_slot(l, sw, sh, AHB_RGBA8, &wait_fd);
if (idx < 0) { log_drop(l); return g_alloc_failed ? -1 : 0; }
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) {
l->first_logged = 1;
@@ -1260,18 +1228,6 @@ static int overlay_shown(struct layer *l, int idx, const int geo[8], int translu
return 0;
}
int sc_layer_present_overlay(struct vkp_image *src, const int geo[8], int translucent) {
struct layer *l = layer_of(SC_LAYER_OVERLAY);
if (!geo) return -1;
int idx;
struct vkp_blit blit = {.src = src, .wait_fd = -1};
const int taken = overlay_slot(l, src, &idx, &blit.wait_fd);
if (taken <= 0) return taken;
blit.dst = l->slots[idx].img;
if (vkp_blit_images(&blit, 1) != 0) return -1;
return overlay_shown(l, idx, geo, translucent);
}
static int hide_layer(struct layer *l) {
if (!l->sc || !l->shown || api.state != 1) return 0;
ASurfaceTransaction *tx = api.txCreate();
+1 -1
View File
@@ -22,7 +22,7 @@ void sc_layer_hdr_symbols(char *out, size_t size);
int sc_layer_present(struct vkp_image *src, int scene_w, int scene_h, const struct vkp_draw *draw,
const struct droiddeck_color *color, const struct vkp_draw *over, int *over_shown);
const struct droiddeck_color *color);
int sc_layer_present_pass(const struct vkp_draw *draws, int n, int scene_w, int scene_h);
int sc_layer_present_generated(const struct vkp_draw *draws, int n_draws, const struct vkp_hdr_frame *hf,
+27 -62
View File
@@ -20,8 +20,6 @@
#include <unistd.h>
#include <errno.h>
#include <poll.h>
#include <linux/sync_file.h>
#include <sys/ioctl.h>
#include <time.h>
#include <pthread.h>
#include <stdarg.h>
@@ -3164,38 +3162,8 @@ static void blit_to_layer(VkCommandBuffer cmd, VkImage src, VkImageLayout src_la
0, 0, NULL, 0, NULL, 1, &release);
}
static int merge_wait_fds(int a, int b) {
if (a < 0) return b;
if (b < 0) return a;
struct sync_merge_data m = {.name = "droiddeck-layer-copy", .fd2 = b};
if (ioctl(a, SYNC_IOC_MERGE, &m) == 0) {
close(a);
close(b);
return m.fence;
}
struct pollfd p = {.fd = b, .events = POLLIN};
int r;
do { r = poll(&p, 1, 100); } while (r < 0 && errno == EINTR);
close(b);
if (r != 0) return a;
p.fd = a;
do { r = poll(&p, 1, 100); } while (r < 0 && errno == EINTR);
close(a);
return -2;
}
int vkp_blit_images(const struct vkp_blit *blits, int n) {
int wait_fd = -1;
for (int i = 0; i < n; i++) {
if (wait_fd == -2) { if (blits[i].wait_fd >= 0) close(blits[i].wait_fd); continue; }
wait_fd = merge_wait_fds(wait_fd, blits[i].wait_fd);
}
int valid = n > 0 && wait_fd != -2;
for (int i = 0; valid && i < n; i++) {
const struct vkp_image *src = blits[i].src, *dst = blits[i].dst;
if (!src || src->blit_dst || !dst || !dst->blit_dst) valid = 0;
}
if (!valid || dev_init() != 0) {
int vkp_blit_image(struct vkp_image *src, struct vkp_image *dst, int wait_fd) {
if (!src || src->blit_dst || !dst || !dst->blit_dst || dev_init() != 0) {
if (wait_fd >= 0) close(wait_fd);
return -1;
}
@@ -3208,35 +3176,32 @@ int vkp_blit_images(const struct vkp_blit *blits, int n) {
VkCommandBufferBeginInfo bi = {.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT};
g_vk.BeginCommandBuffer(g_cmd, &bi);
for (int i = 0; i < n; i++) {
struct vkp_image *src = blits[i].src, *dst = blits[i].dst;
stage_linear_dmabuf(g_cmd, src);
struct vkp_external_client_barrier_pair src_pair;
const int src_external = vkp_external_client_barrier_pair(
src->image, g_qfam, foreign_image(src), src->blit_dst, &src_pair);
VkImageMemoryBarrier acq = src_external ? src_pair.acquire : (VkImageMemoryBarrier){
.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .oldLayout = VK_IMAGE_LAYOUT_UNDEFINED,
.newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
.image = src->image, .subresourceRange = range, .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT};
if (!src_external) {
acq.oldLayout = src->in_general ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_PREINITIALIZED;
acq.newLayout = VK_IMAGE_LAYOUT_GENERAL;
acq.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
src->in_general = 1;
}
g_vk.CmdPipelineBarrier(g_cmd, VK_PIPELINE_STAGE_HOST_BIT | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, NULL, 0, NULL, 1, &acq);
int bw = src->w < dst->w ? src->w : dst->w, bh = src->h < dst->h ? src->h : dst->h;
VkImageBlit blit = {.srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1},
.srcOffsets = {{0, 0, 0}, {bw, bh, 1}},
.dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1},
.dstOffsets = {{0, 0, 0}, {bw, bh, 1}}};
blit_to_layer(g_cmd, src->image, src_external ? VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL : VK_IMAGE_LAYOUT_GENERAL,
dst, &blit, VK_FILTER_NEAREST);
release_external_client_image(g_cmd, src);
stage_linear_dmabuf(g_cmd, src);
struct vkp_external_client_barrier_pair src_pair;
const int src_external = vkp_external_client_barrier_pair(
src->image, g_qfam, foreign_image(src), src->blit_dst, &src_pair);
VkImageMemoryBarrier acq = src_external ? src_pair.acquire : (VkImageMemoryBarrier){
.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .oldLayout = VK_IMAGE_LAYOUT_UNDEFINED,
.newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
.image = src->image, .subresourceRange = range, .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT};
if (!src_external) {
acq.oldLayout = src->in_general ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_PREINITIALIZED;
acq.newLayout = VK_IMAGE_LAYOUT_GENERAL;
acq.srcAccessMask = VK_ACCESS_HOST_WRITE_BIT;
src->in_general = 1;
}
g_vk.CmdPipelineBarrier(g_cmd, VK_PIPELINE_STAGE_HOST_BIT | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, NULL, 0, NULL, 1, &acq);
int bw = src->w < dst->w ? src->w : dst->w, bh = src->h < dst->h ? src->h : dst->h;
VkImageBlit blit = {.srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1},
.srcOffsets = {{0, 0, 0}, {bw, bh, 1}},
.dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1},
.dstOffsets = {{0, 0, 0}, {bw, bh, 1}}};
blit_to_layer(g_cmd, src->image, src_external ? VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL : VK_IMAGE_LAYOUT_GENERAL,
dst, &blit, VK_FILTER_NEAREST);
release_external_client_image(g_cmd, src);
g_vk.EndCommandBuffer(g_cmd);
VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_TRANSFER_BIT;
@@ -105,11 +105,7 @@ int vkp_render_hdr(int scene_w, int scene_h, const struct vkp_draw *draws, int n
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);
struct vkp_blit {
struct vkp_image *src, *dst;
int wait_fd;
};
int vkp_blit_images(const struct vkp_blit *blits, int n);
int vkp_blit_image(struct vkp_image *src, struct vkp_image *dst, int wait_fd);
int vkp_image_readback(struct vkp_image *src, uint32_t *out, int max_px);
int vkp_update_map(int scene_w, int scene_h);
int vkp_map_draw(const struct vkp_draw *d, int out[8]);
@@ -20,10 +20,6 @@ class App : Application() {
override fun onCreate() {
super.onCreate()
if (android.os.Build.VERSION.SDK_INT >= 28 &&
com.droiddeck.launcher.runtime.GuestWorker.isWorkerProcess(this, Application.getProcessName())) return
if (android.os.Build.VERSION.SDK_INT >= 28 && Application.getProcessName() == packageName)
com.droiddeck.launcher.runtime.GuestWorkers.attach(this)
com.droiddeck.launcher.runtime.NativeGuest.init(this)
com.droiddeck.launcher.session.Onboarding.attach(this)
Thread({ runCatching { EnhancedSessionLogShare.cleanupAbandonedStages(this) } }, "diagnostic-stage-cleanup").start()
@@ -25,7 +25,6 @@ import android.widget.EditText
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.background
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
@@ -193,7 +192,6 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
private var prootNoSeccomp by mutableStateOf(false)
private var prootFastPath by mutableStateOf(true)
private var nativeUserland by mutableStateOf(true)
private var desktopAsUser by mutableStateOf(false)
private var cursorComposite by mutableStateOf(true)
private var guestHostname by mutableStateOf(SessionPrefs.DEFAULT_GUEST_HOSTNAME)
private var phantomWarning by mutableStateOf<String?>(null)
@@ -208,12 +206,6 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
private var launcherOrientation by mutableStateOf(android.content.pm.ActivityInfo.SCREEN_ORIENTATION_USER)
private var homePage by mutableStateOf(com.droiddeck.launcher.core.AppUiPrefs.HOME_PAGE_STEAM)
private var launcherFullscreen by mutableStateOf(true)
private var launcherFrost by mutableStateOf(false)
private var frostWallpaper by mutableStateOf(true)
private var frostCards by mutableStateOf(true)
private var frostTransparency by mutableStateOf(com.droiddeck.launcher.ui.FROST_WALLPAPER_DEFAULT)
private var frostCardTransparency by mutableStateOf(com.droiddeck.launcher.ui.FROST_DEFAULT)
private val frost = com.droiddeck.launcher.ui.LauncherFrost(this)
private var controllerHaptics by mutableStateOf(true)
private var downloadSource by mutableStateOf(DownloadSource.MODE_AUTO)
private var downloadMirror by mutableStateOf("")
@@ -1379,14 +1371,6 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
requestedOrientation = launcherOrientation
homePage = com.droiddeck.launcher.core.AppUiPrefs.homePage(this)
launcherFullscreen = SessionPrefs.launcherFullscreen(this)
launcherFrost = SessionPrefs.launcherFrost(this)
frostWallpaper = SessionPrefs.frostWallpaper(this)
frostCards = SessionPrefs.frostCards(this)
frostTransparency = SessionPrefs.frostTransparency(this)
frostCardTransparency = SessionPrefs.frostCardTransparency(this)
frost.start()
frost.prepare(launcherFrost && frostWallpaper)
frost.show(frostShown())
controllerHaptics = SessionPrefs.controllerHaptics(this)
downloadSource = DownloadSource.mode(this)
downloadMirror = DownloadSource.mirror(this)
@@ -1411,14 +1395,8 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
}
val appsTabShown = "android-apps" !in com.droiddeck.launcher.ui.NavTabs.hidden
androidx.compose.runtime.LaunchedEffect(appsTabShown) { if (appsTabShown && androidApps.isEmpty()) refreshAndroidApps() }
val frostShown = frostShown()
androidx.compose.runtime.LaunchedEffect(frostShown) { frost.show(frostShown) }
val frostChoice = if (frostShown) com.droiddeck.launcher.ui.FrostChoice(frostTransparency, frostCards, frostCardTransparency) else null
DroidDeckTheme(theme, appScale = appScale, frost = frostChoice) {
val palette = com.droiddeck.launcher.ui.LocalPalette.current
val veil = com.droiddeck.launcher.ui.LocalFrost.current
val ground = if (frost.prepared) androidx.compose.ui.Modifier.background(veil ?: palette.background) else androidx.compose.ui.Modifier
com.droiddeck.launcher.ui.FocusGlideHost(androidx.compose.ui.Modifier.fillMaxSize().then(ground).exposeTestTags()) {
DroidDeckTheme(theme, appScale = appScale) {
com.droiddeck.launcher.ui.FocusGlideHost(androidx.compose.ui.Modifier.fillMaxSize().exposeTestTags()) {
if (decky.deckyPendingZip != null) com.droiddeck.launcher.ui.DeckyZipWarningDialog(
onConfirm = { decky.confirmPluginZip() }, onCancel = { decky.cancelPluginZip() },
)
@@ -1494,12 +1472,6 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
launcherOrientation = launcherOrientation,
homePage = homePage,
launcherFullscreen = launcherFullscreen,
launcherFrost = launcherFrost,
frostWallpaper = frostWallpaper,
frostCards = frostCards,
frostTransparency = frostTransparency,
frostCardTransparency = frostCardTransparency,
frostSupported = frost.supported,
controllerHaptics = controllerHaptics,
downloadSource = downloadSource,
downloadMirror = downloadMirror,
@@ -1835,28 +1807,6 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
launcherFullscreen = on
applyLauncherFullscreen()
},
onLauncherFrost = { on ->
SessionPrefs.setLauncherFrost(this, on)
launcherFrost = on
if (on && frostWallpaper && !frost.prepared) restartLauncher()
},
onFrostWallpaper = { on ->
SessionPrefs.setFrostWallpaper(this, on)
frostWallpaper = on
if (on && !frost.prepared) restartLauncher()
},
onFrostCards = { on ->
SessionPrefs.setFrostCards(this, on)
frostCards = on
},
onFrostTransparency = { percent ->
SessionPrefs.setFrostTransparency(this, percent)
frostTransparency = SessionPrefs.frostTransparency(this)
},
onFrostCardTransparency = { percent ->
SessionPrefs.setFrostCardTransparency(this, percent)
frostCardTransparency = SessionPrefs.frostCardTransparency(this)
},
onGameStoresSpeedTier = { tier -> SessionPrefs.setGameStoresSpeedTier(this, tier); gameStoresSpeedTier = tier },
onNavigated = { navRequest = null },
onStoresShowMature = { show -> SessionPrefs.setStoresShowMature(this, show); storesShowMature = show },
@@ -2163,9 +2113,6 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
}
}
private fun frostShown(): Boolean =
launcherFrost && frostWallpaper && frost.prepared && frost.available && theme != com.droiddeck.launcher.ui.Themes.TRUE_BLACK
private fun applyLauncherFullscreen() {
@Suppress("DEPRECATION")
window.decorView.systemUiVisibility = if (launcherFullscreen) {
@@ -2513,7 +2460,6 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
launchCoordinator.cancelAll()
cancelCompatLaunch()
updates.unregister()
frost.stop()
runCatching { unregisterReceiver(shortcutsInstallStatus) }
super.onDestroy()
}
@@ -3103,7 +3049,7 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
fsyncFirst = fsyncFirst,
gamescopeRealtime = gamescopeRealtime,
gpuClockPin = gpuClockPin,
prootNoSeccomp = prootNoSeccomp, prootFastPath = prootFastPath, nativeUserland = nativeUserland, desktopAsUser = desktopAsUser, cursorComposite = cursorComposite,
prootNoSeccomp = prootNoSeccomp, prootFastPath = prootFastPath, nativeUserland = nativeUserland, cursorComposite = cursorComposite,
guestHostname = guestHostname, phantomWarning = phantomWarning,
onClientOverride = { on -> SessionPrefs.setClientCpusOverride(this, on); clientOverride = on },
onPaceCores = { on -> SessionPrefs.setPaceCores(this, on); paceCores = on },
@@ -3120,7 +3066,6 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
onProotNoSeccomp = { on -> SessionPrefs.setProotNoSeccomp(this, on); prootNoSeccomp = on },
onProotFastPath = { on -> SessionPrefs.setProotFastPath(this, on); prootFastPath = on },
onNativeUserland = { on -> SessionPrefs.setNativeUserland(this, on); nativeUserland = on },
onDesktopAsUser = { on -> SessionPrefs.setDesktopAsUser(this, on); desktopAsUser = on },
onCursorComposite = { on -> SessionPrefs.setCursorComposite(this, on); cursorComposite = on },
onGuestHostname = { name -> SessionPrefs.setGuestHostname(this, name) },
onClientCore = { core, on ->
@@ -3439,7 +3384,6 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
prootNoSeccomp = SessionPrefs.prootNoSeccomp(this)
prootFastPath = SessionPrefs.prootFastPath(this)
nativeUserland = SessionPrefs.nativeUserland(this)
desktopAsUser = SessionPrefs.desktopAsUser(this)
cursorComposite = SessionPrefs.cursorComposite(this)
guestHostname = SessionPrefs.guestHostname(this)
refreshPhantomStatus()
@@ -807,7 +807,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
}
private var isHomeApp by mutableStateOf(false)
private var androidApps by mutableStateOf<List<HomeApp.LaunchableApp>>(emptyList())
private var padConnected by mutableStateOf(false)
private val deviceListener = object : InputManager.InputDeviceListener {
override fun onInputDeviceAdded(deviceId: Int) {
@@ -1263,10 +1262,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
glasses.usesSpatialControllers(glassesSettings) && glassesSettings.joyConTracking)
joyConVr?.let { { it.recenter() } } else null,
) { headTracker?.recenter() }
val showGlassesShortcut = com.droiddeck.launcher.ui.rememberShowGlassesShortcut()
if (!phonePanel && glasses.present && showGlassesShortcut && !drawerOpen && !pcKeyboardOpen && !loading.visible) com.droiddeck.launcher.ui.GlassesCornerButton(glassesSlot,
if (!phonePanel && 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.VR
drawerPage = com.droiddeck.launcher.ui.SessionDrawerPage.GLASSES
drawerOpen = true
}
if (!drawerOpen && !pcKeyboardOpen && !loading.visible) {
@@ -1453,10 +1451,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
}
}
LaunchedEffect(drawerOpen, achievementsOpen, AgentGuest.focusRevision, StoreAchievements.revision) {
if (!drawerOpen && !achievementsOpen) {
achievementsInFront = null
return@LaunchedEffect
}
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()
@@ -1792,7 +1787,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
onBlackFrameInsertion = { on ->
SessionPrefs.setBlackFrameInsertion(this@SessionActivity, on)
blackFrameInsertion = on
CompositorHost.setBlackFrameInsertion(on, refreshHz(), compositorFpsLimit())
CompositorHost.setBlackFrameInsertion(on, refreshHz(), outputFpsLimit())
},
hdr = hdrWanted,
hdrAvailable = hdrAvailable,
@@ -1829,9 +1824,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
onRumble = { on -> updateControllerPrefs { ControllerPrefs.setRumble(this@SessionActivity, on) } },
onSteamMenu = if (SessionState.mode == SessionService.MODE_STEAM) ({ sendSteamGuide() }) else null,
onQam = if (SessionState.mode == SessionService.MODE_STEAM) ({ triggerSteamQam() }) else null,
controllerConnected = padConnected,
achievementsGame = achievementsInFront?.game,
achievementsTitle = achievementsInFront?.title,
onAchievements = achievementsInFront?.let { { drawerOpen = false; achievementsOpen = true } },
achievementsProgress = achievementsInFront?.progress,
padType = if (SessionState.mode == SessionService.MODE_STEAM && SessionState.deckPad) padType else null,
onPadType = { id ->
@@ -1952,13 +1945,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
onResume = { SessionService.resume(this@SessionActivity) },
orientation = sessionOrientation,
onOrientation = { value ->
when (SessionState.mode) {
SessionService.MODE_STEAM, SessionService.MODE_RUN ->
SessionPrefs.setOrientation(this@SessionActivity, "steam", value)
SessionService.MODE_DESKTOP ->
SessionPrefs.setOrientation(this@SessionActivity, "desktop", value)
else -> SessionPrefs.setOrientation(this@SessionActivity, value)
}
SessionPrefs.setOrientation(this@SessionActivity, value)
sessionOrientation = value
applyFollowOrientation(resources.configuration)
},
@@ -2737,7 +2724,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
oscTrackpads = SessionPrefs.oscTrackpads(this)
backHold = SessionPrefs.backHold(this)
dockedMenuController = SessionPrefs.dockedMenuController(this)
sessionOrientation = SessionPrefs.orientation(this, SessionState.mode)
sessionOrientation = SessionPrefs.orientation(this)
dualScreenSessionMode = SessionPrefs.dualScreenSessionMode(this)
backActionsInverted = SessionPrefs.backActionsInverted(this)
physicalShortcuts.bindings = PhysicalShortcuts.read(this)
@@ -3003,7 +2990,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
CompositorHost.startOrAttach(
this, holder.surface, runtimeDir.path,
driverId?.let { turnip.driverPath(it) }, driverId?.let { turnip.libraryName(it) },
applicationInfo.nativeLibraryDir, size.first, size.second, refreshHz(holder), compositorFpsLimit(),
applicationInfo.nativeLibraryDir, size.first, size.second, refreshHz(holder), outputFpsLimit(),
)
onOutputAttached(holder)
if (SessionState.running && size != previous) {
@@ -3069,7 +3056,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
WaylandCompositor.nativeResizeOutput(size.first, size.second)
}
private fun followPortrait(): Boolean = glassesScreen == null && SessionPrefs.portrait(this, SessionState.mode)
private fun followPortrait(): Boolean = glassesScreen == null && SessionPrefs.portrait(this)
private fun applyFollowChoice() {
val scale = SessionState.followScales.let { if (followPortrait()) it.second else it.first }
@@ -3078,7 +3065,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
}
private fun applyFollowOrientation(config: android.content.res.Configuration) {
val wanted = SessionPrefs.windowOrientation(this, SessionState.followScreen, config.smallestScreenWidthDp, SessionState.mode)
val wanted = SessionPrefs.windowOrientation(this, SessionState.followScreen, config.smallestScreenWidthDp)
if (requestedOrientation != wanted) requestedOrientation = wanted
}
@@ -3141,13 +3128,13 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
private fun displayMode(): String = SessionPrefs.displayMode(this,
intent.getStringExtra(SessionService.EXTRA_MODE) ?: SessionService.MODE_STEAM, intent.getStringExtra(SessionService.EXTRA_PROGRAM))
private fun portraitOutput(): Boolean = SessionPrefs.portrait(this, SessionState.mode) && !controlsBelowWanted()
private fun portraitOutput(): Boolean = SessionPrefs.portrait(this) && !controlsBelowWanted()
private fun outputSize(): Pair<Int, Int> =
com.droiddeck.launcher.session.SessionDisplay.resolveChoice(com.droiddeck.launcher.session.SessionDisplay.panelSize(this),
resolutionChoice(), portraitOutput())
private fun resolutionChoice(portrait: Boolean = SessionPrefs.portrait(this, SessionState.mode)): String {
private fun resolutionChoice(portrait: Boolean = SessionPrefs.portrait(this)): String {
val mode = displayMode()
val program = intent.getStringExtra(SessionService.EXTRA_PROGRAM)
return if (intent.getStringExtra(SessionService.EXTRA_MODE) == SessionService.MODE_RUN &&
@@ -3194,18 +3181,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
private fun outputFpsLimit(): Int = outputFpsLimit(pipUi)
// Android holds the window to the Game Mode override while the panel runs faster; the guest paces to the panel,
// so without this cap every frame past the override is drawn and dropped.
private fun hostFrameCap(): Int {
if (glassesScreen != null || bottomOutputActive) return 0
val display = (if (Build.VERSION.SDK_INT >= 30) display else @Suppress("DEPRECATION") windowManager.defaultDisplay) ?: return 0
return SessionPrefs.hostFrameCap(display.refreshRate, display.mode.refreshRate)
}
private fun compositorFpsLimit(): Int = SessionPrefs.compositorFpsLimit(
mirrorRefreshLimit(), if (noSteamSession()) SessionState.fpsLimit else 0, pipUi, hostFrameCap(),
)
private fun outputFpsLimit(pip: Boolean): Int =
SessionPrefs.compositorFpsLimit(mirrorRefreshLimit(), if (noSteamSession()) SessionState.fpsLimit else 0, pip)
@@ -3243,7 +3218,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
)
val hz = refreshHz()
val changed = kotlin.math.abs(SessionState.refreshHz - hz) > 0.1f
CompositorHost.updatePacing(hz, compositorFpsLimit())
CompositorHost.updatePacing(hz, outputFpsLimit())
pushCardboard(activeCardboard)
if (changed && ::surfaceView.isInitialized) applyFrameGen()
}
@@ -3814,7 +3789,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
if (fromController && (event.keyCode == KeyEvent.KEYCODE_BUTTON_L1 || event.keyCode == KeyEvent.KEYCODE_BUTTON_R1)) {
if (event.action == KeyEvent.ACTION_DOWN && event.repeatCount == 0) {
// The bumpers walk the tabs on the strip; a page kept inside More counts as the More tab.
val pages = sessionDrawerPages(achievementsInFront != null)
val pages = sessionDrawerPages(glasses.present)
drawerPage = pages.strip().step(pages.tabFor(drawerPage), if (event.keyCode == KeyEvent.KEYCODE_BUTTON_R1) 1 else -1)
releaseDrawerDirection()
}
@@ -4970,7 +4945,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
}
private fun refreshControls() {
padConnected = controllerConnected()
applyUnfoldedControls()
updateOnScreenControls()
}
@@ -6411,7 +6385,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
}
(getSystemService(INPUT_SERVICE) as? InputManager)
?.registerInputDeviceListener(deviceListener, Handler(Looper.getMainLooper()))
padConnected = controllerConnected()
padBridge?.setStickDeadZone(ControllerPrefs.deadZone(this))
refreshSecondScreenDisplays()
if (SessionState.guestPid > 1) padBridge?.syncConnectedControllers()
@@ -89,7 +89,7 @@ public class DirectAudioRelayComponent extends SessionPart {
}
}
final java.io.PrintWriter log = out;
pid = HostProcess.startUncounted(command.toString(), env.toArray(new String[0]),
pid = HostProcess.start(command.toString(), env.toArray(new String[0]),
app().getFilesDir(), null,
line -> {
Log.i(TAG, line);
@@ -12,7 +12,6 @@ import com.droiddeck.launcher.core.TarZst;
import java.io.File;
import java.io.InputStream;
import java.net.URL;
import java.nio.file.AtomicMoveNotSupportedException;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
@@ -37,15 +36,9 @@ public class PulseAudioComponent extends SessionPart {
private final HostLifecycle host = new HostLifecycle(Process::killProcess);
static final class HostLifecycle {
static final int MAX_STARTUP_CRASH_RESTARTS = 4;
private static final long[] STARTUP_RESTART_DELAYS_MS = {250L, 1000L, 2000L, 4000L};
volatile int pid = -1;
private long generation;
private long launches;
private boolean preferStandardPerformanceMode;
private boolean sinkReady;
private int startupCrashRestarts;
private final IntConsumer terminate;
final ReentrantReadWriteLock commands = new ReentrantReadWriteLock();
@@ -55,9 +48,6 @@ public class PulseAudioComponent extends SessionPart {
synchronized long begin() {
stop();
preferStandardPerformanceMode = false;
sinkReady = false;
startupCrashRestarts = 0;
return generation;
}
@@ -65,7 +55,6 @@ public class PulseAudioComponent extends SessionPart {
generation++;
if (pid > 1) terminate.accept(pid);
pid = -1;
sinkReady = false;
}
boolean launch(long expected, IntSupplier launch) {
@@ -74,7 +63,6 @@ public class PulseAudioComponent extends SessionPart {
synchronized (this) {
if (expected != generation) return false;
launches++;
sinkReady = false;
pid = launch.getAsInt();
return true;
}
@@ -105,45 +93,11 @@ public class PulseAudioComponent extends SessionPart {
return token == launches && pid > 1;
}
synchronized boolean preferStandardPerformanceMode() {
return preferStandardPerformanceMode;
}
synchronized void markLowLatencyFailed(long token) {
if (token == launches && pid > 1) preferStandardPerformanceMode = true;
}
synchronized void markSinkReady(long token) {
if (token == launches && pid > 1) {
sinkReady = true;
startupCrashRestarts = 0;
}
}
synchronized boolean exited(long expected) {
if (expected != generation || pid <= 1) return false;
pid = -1;
return true;
}
/**
* Decides whether a dead host should be restarted and after how many milliseconds.
* Returns 0 for immediate recovery of a host that had a working sink, a positive backoff
* while falling back to standard AAudio mode after a startup crash, or -1 to stop retrying.
*/
synchronized long nextRestartDelayMs(long expected) {
if (expected != generation) return -1L;
if (sinkReady) {
sinkReady = false;
startupCrashRestarts = 0;
return 0L;
}
preferStandardPerformanceMode = true;
if (startupCrashRestarts >= MAX_STARTUP_CRASH_RESTARTS) return -1L;
long delay = STARTUP_RESTART_DELAYS_MS[Math.min(startupCrashRestarts, STARTUP_RESTART_DELAYS_MS.length - 1)];
startupCrashRestarts++;
return delay;
}
}
public PulseAudioComponent(Context context) {
@@ -213,14 +167,11 @@ public class PulseAudioComponent extends SessionPart {
if (micFifoPath != null && !micFifoPath.isEmpty()) {
new File(micFifoPath).delete();
}
boolean standardMode = host.preferStandardPerformanceMode();
String initialPerformanceMode = standardMode ? "0" : "1";
ArrayList<String> config = new ArrayList<>();
config.add("load-module module-native-protocol-unix auth-anonymous=1 auth-cookie-enabled=0 socket=\""
+ socket().getAbsolutePath() + "\"");
config.add(".nofail");
config.add("load-module module-directaudio-native-sink sink_name=DirectAudio performance_mode="
+ initialPerformanceMode + " adaptive=1 decay=0 limiter=1 watchdog=1 volume=1.0 control_dir=" + deviceControls);
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 control_dir=" + deviceControls);
config.add("set-default-sink DirectAudio");
config.add(".fail");
if (micFifoPath != null && !micFifoPath.isEmpty()) {
@@ -235,36 +186,15 @@ public class PulseAudioComponent extends SessionPart {
env.add("LD_LIBRARY_PATH=/system/lib64:" + modules + ":" + workingDir.getAbsolutePath());
env.add("HOME=" + workingDir);
env.add("TMPDIR=" + workingDir);
// The daemon closes every fd at start but this one; in a worker process it is the binder
// fd whose closing Android takes for the process's death.
env.add("PULSE_PASSED_FD=" + com.droiddeck.launcher.runtime.GuestWorker.BINDER_FD_TOKEN);
String command = String.join(" ", HostProcess.dataExecutable(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"
+ " --log-level=info";
final java.io.PrintWriter out = openLog();
if (!host.launch(generation, () -> HostProcess.startUncounted(command, env.toArray(new String[0]), workingDir, status -> {
if (!host.launch(generation, () -> HostProcess.start(command, env.toArray(new String[0]), workingDir, status -> {
if (host.exited(generation)) {
long delayMs = host.nextRestartDelayMs(generation);
if (delayMs < 0) {
String msg = "audio host exited with status " + status
+ " before a client sink came up too many times; not restarting again in this session";
Log.w(TAG, msg);
note(out, msg);
return;
}
Log.w(TAG, "audio host exited with status " + status + "; restarting"
+ (host.preferStandardPerformanceMode() ? " with standard AAudio mode" : "")
+ (delayMs > 0 ? " in " + delayMs + " ms" : ""));
if (delayMs > 0) {
try {
Thread.sleep(delayMs);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
return;
}
}
Log.w(TAG, "audio host exited with status " + status + "; restarting");
start(generation);
}
},
@@ -278,24 +208,6 @@ public class PulseAudioComponent extends SessionPart {
guard.start();
}
private boolean loadDirectAudioSink(long token, String performanceMode) {
if ("0".equals(performanceMode)) pactlOk(token, "unload-module", "module-directaudio-native-sink");
String loaded = pactlFor(token, "load-module", "module-directaudio-native-sink", "sink_name=DirectAudio",
"performance_mode=" + performanceMode,
"adaptive=1", "decay=0", "limiter=1", "watchdog=1", "volume=1.0", "control_dir=" + deviceControls);
if (loaded == null) return false;
if (pactlOk(token, "set-default-sink", "DirectAudio")) return true;
String moduleId = loaded.trim();
pactlOk(token, "unload-module", moduleId.matches("\\d+") ? moduleId : "module-directaudio-native-sink");
return false;
}
private boolean loadPlainAAudioSink(long token, String performanceMode) {
return pactlOk(token, "load-module", "module-aaudio-sink", "sink_name=AAudioSink",
"performance_mode=" + performanceMode, "adaptive=1", "volume=1.0", "control_dir=" + deviceControls)
&& pactlOk(token, "set-default-sink", "AAudioSink");
}
private void ensureClientSink(java.io.PrintWriter out, long token) {
try {
// Nothing that may block (a sink whose AAudio open hangs: a Galaxy S24 FE (US) hung the
@@ -317,42 +229,27 @@ public class PulseAudioComponent extends SessionPart {
if (sinks == null) {
line = "== client sink: the daemon did not answer in 30 s; no fallback attempted";
} else if (sinks.contains("\tDirectAudio\t") || sinks.startsWith("DirectAudio\t") || sinks.contains("\tDirectAudio\n") || sinks.matches("(?s).*\\bDirectAudio\\b.*")) {
host.markSinkReady(token);
line = "== client sink: DirectAudio (module-directaudio-native-sink"
+ (host.preferStandardPerformanceMode() ? ", standard mode" : "") + ")";
line = "== client sink: DirectAudio (module-directaudio-native-sink)";
} else {
// AAudio can refuse the first open with AAUDIO_ERROR_DISCONNECTED while Android is
// still switching the output route (Galaxy S24 FE) or when low-latency MMAP output
// is rejected by the HAL (Samsung One UI). Retry low-latency once if it hasn't been
// disqualified yet, then fall back to performance_mode=0 (non-MMAP) on DirectAudio
// before trying the plain AAudio sink.
// still switching the output route as the session starts (seen on a Galaxy S24 FE):
// try DirectAudio again, then the plain sink, a few times over ten seconds.
String loadedAs = null;
for (int attempt = 1; attempt <= 5 && loadedAs == null && host.live(token); attempt++) {
try { Thread.sleep(2000L); } catch (InterruptedException e) { Thread.currentThread().interrupt(); return; }
if (!host.live(token)) break;
if (attempt == 1 && !host.preferStandardPerformanceMode()) {
if (loadDirectAudioSink(token, "1")) {
loadedAs = "DirectAudio on attempt " + attempt;
break;
}
if (!host.live(token)) break;
host.markLowLatencyFailed(token);
}
if (loadDirectAudioSink(token, "0")) {
loadedAs = "DirectAudio (standard mode) on attempt " + attempt;
} else if (host.live(token) && loadPlainAAudioSink(token, "0")) {
loadedAs = "the plain AAudio sink (AAudioSink, standard mode) on attempt " + attempt;
if (pactlOk(token, "load-module", "module-directaudio-native-sink", "sink_name=DirectAudio", "performance_mode=1",
"adaptive=1", "decay=0", "limiter=1", "watchdog=1", "volume=1.0", "control_dir=" + deviceControls)
&& pactlOk(token, "set-default-sink", "DirectAudio")) {
loadedAs = "DirectAudio on attempt " + attempt;
} else if (pactlOk(token, "load-module", "module-aaudio-sink", "sink_name=AAudioSink",
"performance_mode=" + (attempt == 1 ? "1" : "0"), "adaptive=1", "volume=1.0", "control_dir=" + deviceControls)
&& pactlOk(token, "set-default-sink", "AAudioSink")) {
loadedAs = "the plain AAudio sink (AAudioSink) on attempt " + attempt;
}
}
if (loadedAs != null) {
host.markSinkReady(token);
line = "== client sink: DirectAudio did not come up at start; retried and got " + loadedAs;
} else if (!host.live(token)) {
line = "== client sink: audio host exited during sink recovery";
} else {
line = "== client sink: DirectAudio did not come up and the AAudio fallback failed too after 5 retries - no client sound."
+ " If audio.log shows AAUDIO_ERROR_DISCONNECTED, Android refused the audio output: rebooting the phone usually fixes this";
}
line = loadedAs != null ? "== client sink: DirectAudio did not come up at start; retried and got " + loadedAs
: "== client sink: DirectAudio did not come up and the AAudio fallback failed too after 5 retries - no client sound."
+ " If audio.log shows AAUDIO_ERROR_DISCONNECTED, Android refused the audio output: rebooting the phone usually fixes this";
Log.w(TAG, line);
}
Log.i(TAG, line);
@@ -507,22 +404,11 @@ public class PulseAudioComponent extends SessionPart {
continue;
}
File destination = new File(workingDir, lib);
File temp = null;
try (InputStream in = resource.openStream()) {
temp = File.createTempFile(lib + ".", ".tmp", workingDir);
Files.copy(in, temp.toPath(), StandardCopyOption.REPLACE_EXISTING);
FileUtils.chmod(temp, 0771);
try {
Files.move(temp.toPath(), destination.toPath(),
StandardCopyOption.ATOMIC_MOVE, StandardCopyOption.REPLACE_EXISTING);
} catch (AtomicMoveNotSupportedException e) {
Files.move(temp.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING);
}
temp = null;
Files.copy(in, destination.toPath(), StandardCopyOption.REPLACE_EXISTING);
FileUtils.chmod(destination, 0771);
} catch (Exception e) {
Log.w(TAG, "copy " + lib, e);
} finally {
if (temp != null) temp.delete();
}
}
}
@@ -1,6 +1,5 @@
package com.droiddeck.launcher.core
import android.os.ParcelFileDescriptor
import android.util.Log
import java.io.File
import java.util.function.Consumer
@@ -8,9 +7,6 @@ import java.util.function.Consumer
object HostProcess {
private const val TAG = "HostProcess"
private const val LINKER = "/system/bin/linker64"
// sh -c WORKER_CD sh DIR NAME=VALUE... -- PROGRAM ARGS...
private const val WORKER_CD = "cd \"\$1\" || exit 126; shift; " +
"while [ \$# -gt 0 ] && [ \"\$1\" != -- ]; do export \"\$1\"; shift; done; shift; exec \"\$@\""
/** Android 10+ refuses to execute app data files for targetSdk 29+; its linker still loads them. */
@JvmStatic
@@ -69,77 +65,6 @@ object HostProcess {
}
}
/**
* As [start], but the program runs as the main process of one of the app's worker processes,
* which Android does not count against the app's child processes (docs/phantom-processes.md).
* Falls back to [start] when no worker is available. The exit status is the program's exit
* code, or 128 plus the signal that ended it, as Process.waitFor() reports it.
*/
@JvmStatic
@JvmOverloads
fun startUncounted(command: String, env: Array<String>?, dir: File?, onExit: Consumer<Int>?, onLine: Consumer<String>?,
outputFile: File? = null, onOutputComplete: Runnable? = null): Int {
val context = com.droiddeck.launcher.runtime.GuestWorkers.context
val argv = split(command)
// A missing working directory fails the launch (start() returns -1 for it), not the program
if (context == null || argv.isEmpty() || !com.droiddeck.launcher.runtime.GuestWorkers.enabled(context) ||
(dir != null && !dir.isDirectory)) {
return start(command, env, dir, onExit, onLine, outputFile, onOutputComplete)
}
val environment = LinkedHashMap(System.getenv())
env?.forEach { line ->
val eq = line.indexOf('=')
if (eq > 0) environment[line.substring(0, eq)] = line.substring(eq + 1)
}
val assignments = environment.map { (k, v) -> "$k=$v" }
// A worker cannot chdir before its exec, so Android's shell does it. The shell starts with an
// environment of its own (the program's LD_PRELOAD of glibc libraries would stop it loading)
// and exports the program's before the exec.
val launch = if (dir != null) {
listOf("/system/bin/sh", "-c", WORKER_CD, "sh", dir.path) + assignments + listOf("--") + argv
} else argv
val workerEnv = if (dir != null) listOf("PATH=/system/bin") else assignments
var input: ParcelFileDescriptor? = null
var reader: ParcelFileDescriptor? = null
var output: ParcelFileDescriptor? = null
val pid = try {
input = ParcelFileDescriptor.open(File("/dev/null"), ParcelFileDescriptor.MODE_READ_ONLY)
output = when {
onLine != null -> ParcelFileDescriptor.createPipe().let { reader = it[0]; it[1] }
outputFile != null -> ParcelFileDescriptor.open(outputFile,
ParcelFileDescriptor.MODE_WRITE_ONLY or ParcelFileDescriptor.MODE_CREATE or ParcelFileDescriptor.MODE_APPEND)
else -> ParcelFileDescriptor.open(File("/dev/null"), ParcelFileDescriptor.MODE_WRITE_ONLY)
}
com.droiddeck.launcher.runtime.GuestWorkers.start(context, launch, workerEnv, listOf(input, output, output)) { status ->
onExit?.accept(if (status < 0) -1 else if (status and 0x7f == 0) (status shr 8) and 0xff else 128 + (status and 0x7f))
}
} catch (e: Exception) {
Log.w(TAG, "no worker for ${argv.first()}", e)
-1
} finally {
runCatching { input?.close() }
runCatching { output?.close() }
}
if (pid <= 0) {
reader?.close()
return start(command, env, dir, onExit, onLine, outputFile, onOutputComplete)
}
Log.i(TAG, "started pid $pid outside the child-process count: ${argv.first()} (${argv.size - 1} arguments)")
reader?.let { pipe ->
Thread({
try {
ParcelFileDescriptor.AutoCloseInputStream(pipe).bufferedReader().useLines { lines ->
lines.forEach { onLine?.accept(it) }
}
} catch (e: Exception) {
} finally {
onOutputComplete?.run()
}
}, "proc-out-$pid").apply { priority = Thread.NORM_PRIORITY - 1; isDaemon = true; start() }
}
return pid
}
@JvmStatic
fun pidOf(process: Process): Int = try {
val field = process.javaClass.getDeclaredField("pid")
@@ -7,8 +7,6 @@ import com.droiddeck.launcher.R
enum class PhantomProcessStatus {
NOT_APPLICABLE,
/** The limit is on, but the session keeps its programs out of Android's count (GuestWorkers). */
UNCOUNTED,
DISABLED,
ENABLED,
UNSET,
@@ -59,12 +57,6 @@ object PhantomProcessLimit {
fun read(context: Context, sdk: Int = Build.VERSION.SDK_INT): PhantomProcessStatus {
if (sdk < Build.VERSION_CODES.S) return PhantomProcessStatus.NOT_APPLICABLE
val status = readSetting(context, sdk)
return if (status != PhantomProcessStatus.DISABLED && com.droiddeck.launcher.runtime.GuestWorkers.limitHandled(context))
PhantomProcessStatus.UNCOUNTED else status
}
private fun readSetting(context: Context, sdk: Int): PhantomProcessStatus {
if (usesDeviceConfig(sdk)) {
val off = context.getSharedPreferences(PREFS, Context.MODE_PRIVATE).getBoolean(PREF_ANDROID_12_OFF, false)
val global = try {
@@ -109,8 +101,7 @@ object PhantomProcessLimit {
fun hasDeveloperToggle(sdk: Int = Build.VERSION.SDK_INT): Boolean = sdk >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE
fun blocksSteam(status: PhantomProcessStatus): Boolean =
status != PhantomProcessStatus.NOT_APPLICABLE && status != PhantomProcessStatus.DISABLED &&
status != PhantomProcessStatus.UNCOUNTED
status != PhantomProcessStatus.NOT_APPLICABLE && status != PhantomProcessStatus.DISABLED
fun title(context: Context, status: PhantomProcessStatus): String = context.getString(when (status) {
PhantomProcessStatus.ENABLED -> R.string.phantom_title_on
@@ -118,7 +109,6 @@ object PhantomProcessLimit {
PhantomProcessStatus.UNREADABLE -> R.string.phantom_title_unreadable
PhantomProcessStatus.DISABLED -> R.string.phantom_title_off
PhantomProcessStatus.NOT_APPLICABLE -> R.string.phantom_title_not_required
PhantomProcessStatus.UNCOUNTED -> R.string.phantom_title_uncounted
})
fun instructions(context: Context, status: PhantomProcessStatus): String = when (status) {
@@ -126,7 +116,6 @@ object PhantomProcessLimit {
context.getString(R.string.phantom_instructions_fix, fixSentence(context))
PhantomProcessStatus.DISABLED -> context.getString(R.string.phantom_instructions_off)
PhantomProcessStatus.NOT_APPLICABLE -> context.getString(R.string.phantom_instructions_not_applicable)
PhantomProcessStatus.UNCOUNTED -> context.getString(R.string.phantom_instructions_uncounted)
}
fun gateInstructions(context: Context, status: PhantomProcessStatus): String = when (status) {
@@ -143,6 +132,5 @@ object PhantomProcessLimit {
PhantomProcessStatus.UNSET -> "not set (ROM default applies; DroidDeck requires an explicit disabled value)"
PhantomProcessStatus.UNREADABLE -> "unreadable (DroidDeck could not verify the setting)"
PhantomProcessStatus.NOT_APPLICABLE -> "not applicable before Android 12"
PhantomProcessStatus.UNCOUNTED -> "on, not needed (most of the session's programs run in uncounted worker processes)"
}
}
@@ -28,18 +28,17 @@ object SessionLogCapture {
out.flush()
writer = out
this.target = target
pid = HostProcess.startUncounted(
pid = HostProcess.start(
command(Process.myPid(), sinceMillis),
null, target.parentFile, null,
onLine = { line ->
synchronized(this) {
try {
writer?.apply { write(line); newLine(); flush() }
} catch (e: Exception) {
}
) { line ->
synchronized(this) {
try {
writer?.apply { write(line); newLine(); flush() }
} catch (e: Exception) {
}
},
)
}
}
if (pid == -1) {
out.write("logcat could not be started; this ROM may not hand an app its own entries.\n")
out.flush()
@@ -38,11 +38,6 @@ object ElfSeccompPatch {
val end = minOf(data.size, buffer.getLong(at + 8).toInt() + buffer.getLong(at + 32).toInt()) and 3.inv()
var pos = start
while (pos + 4 <= end) {
if (patchTermiosRequest(buffer, pos, end)) {
patched++
pos += 4
continue
}
val replacement = when (buffer.getInt(pos)) {
MOV_X8_SET_ROBUST_LIST -> NOP
MOV_X8_CLONE3, MOV_X8_RSEQ -> MOV_X0_ENOSYS
@@ -70,40 +65,6 @@ object ElfSeccompPatch {
return patched
}
/**
* glibc 2.42 and later read and set a terminal with TCGETS2 and TCSETS2/W2/F2, which Android's
* SELinux policy refuses on an app's pseudo-terminal slaves (EACCES): isatty() was false in every
* Konsole, ssh and tmux session, so bash had no prompt or job control and stdout was not line
* buffered. TCGETS and TCSETS* carry the same struct without its two speed fields, which glibc
* then takes from c_cflag. A site is `movz xN, #lo` then `movk xN, #hi, lsl #16`; the movz gets
* the old request and the movk becomes a no-op.
*/
private fun patchTermiosRequest(buffer: ByteBuffer, pos: Int, end: Int): Boolean {
val movz = buffer.getInt(pos)
if ((movz and 0x7fe00000) != 0x52800000) return false
val low = (movz ushr 5) and 0xffff
if (low !in 0x542a..0x542d) return false
val register = movz and 0x1f
var next = pos + 4
while (next < minOf(end, pos + 4 + 4 * 4)) {
val movk = buffer.getInt(next)
if ((movk and 0x7fe00000) == 0x72a00000 && (movk and 0x1f) == register) {
val request = when ((movk ushr 5) and 0xffff) {
0x802c -> if (low == 0x542a) 0x5401 else return false
0x402c -> if (low != 0x542a) 0x5402 + (low - 0x542b) else return false
else -> return false
}
buffer.putInt(pos, (movz and 0x1f.inv() and (0xffff shl 5).inv()) or (request shl 5) or register)
buffer.putInt(next, NOP)
return true
}
// Anything between that might read or write the register would see the old low half
if (intArrayOf(0, 5, 10, 16).any { (movk ushr it) and 0x1f == register }) return false
next += 4
}
return false
}
/** Patches the file behind [path] (symlinks followed) if it still has unpatched call sites. */
fun patchFile(path: File): Int {
val target = path.canonicalFile
@@ -1,894 +0,0 @@
package com.droiddeck.launcher.runtime
import android.app.ActivityManager
import android.app.Service
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.ServiceConnection
import android.net.LocalServerSocket
import android.net.LocalSocket
import android.os.Binder
import android.os.Handler
import android.os.IBinder
import android.os.Looper
import android.os.Parcel
import android.os.ParcelFileDescriptor
import android.os.Process
import android.system.ErrnoException
import android.system.Os
import android.system.OsConstants
import android.system.StructPollfd
import android.util.Log
import org.json.JSONObject
import java.io.DataInputStream
import java.io.File
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
/**
* A guest program run as the main process of its own Android process.
*
* Android counts the processes in an app process's cgroup against its child-process limit, but not
* the app processes themselves. The worker execs the program in place; its binder fd stays open
* across the exec, so the system keeps the process as a live service process. The program's own
* children are still counted. See docs/phantom-processes.md.
*/
open class GuestWorker : Service() {
private val binder = object : Binder() {
override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean {
if (code != RUN) return super.onTransact(code, data, reply, flags)
val argv = data.createStringArray() ?: return false
val env = data.createStringArray() ?: return false
val fds = List(data.readInt()) { data.readFileDescriptor() }
val targets = data.createIntArray() ?: IntArray(fds.size) { it }
val fillBinderFd = data.readInt() != 0
val go = data.readFileDescriptor()
val nice = data.readInt()
reply?.writeInt(Process.myPid())
Handler(Looper.getMainLooper()).post {
// The app writes a byte once it has the reply and has taken the launch on: an exec
// before then would end this process with the reply undelivered, and with none (the
// app gave up and starts the program another way) the program must not run here.
var why = ""
// poll() with a timeout counts as network I/O to StrictMode on the main thread
android.os.StrictMode.setThreadPolicy(android.os.StrictMode.ThreadPolicy.LAX)
val committed = runCatching {
fun byte(timeout: Int): Int {
val poll = StructPollfd().apply { fd = go.fileDescriptor; events = OsConstants.POLLIN.toShort() }
val ready = Os.poll(arrayOf(poll), timeout)
return (if (ready > 0) Os.read(go.fileDescriptor, ByteArray(1), 0, 1) else -1)
.also { why = "poll $ready revents ${poll.revents} read $it" }
}
// The commit, an answer, and the app's word that it has the answer: the app may
// have stopped waiting for it (and started the program another way) meanwhile.
// That last word comes, or the app closes its end (a byte or EOF): no timeout,
// which could drop a launch the app has already reported as started.
byte(GO_TIMEOUT_MS) == 1 && Os.write(go.fileDescriptor, byteArrayOf(1), 0, 1) == 1 && byte(-1) == 1
}.getOrElse { why = it.toString(); false }
go.close()
if (committed) exec(argv, env, fds, targets, fillBinderFd, nice)
else {
Log.w(TAG, "launch not committed ($why): not running ${argv.firstOrNull()}")
Process.killProcess(Process.myPid())
}
}
return true
}
}
override fun onBind(intent: Intent): IBinder = binder
private fun exec(argv: Array<String>, env: Array<String>, fds: List<ParcelFileDescriptor?>, targets: IntArray, fillBinderFd: Boolean,
nice: Int) {
try {
val top = targets.maxOrNull() ?: 2
val (binderTop, binderFd) = keepBinderOpen(maxOf(BINDER_FDS, top + 1))
// Out of the way first, so that placing one fd cannot overwrite another not yet placed.
val above = maxOf(MOVED_FDS, top + 1, binderTop + 1)
val moved = fds.map { pfd -> pfd?.let { Os.fcntlInt(it.fileDescriptor, OsConstants.F_DUPFD, above) } }
moved.forEachIndexed { i, fd ->
if (fd == null || i >= targets.size) return@forEachIndexed
val source = ParcelFileDescriptor.adoptFd(fd).also { kept.add(it) }.fileDescriptor
Os.dup2(source, targets[i])
Os.fcntlInt(source, OsConstants.F_SETFD, OsConstants.FD_CLOEXEC)
}
// A session of its own: in zygote's process group, a program signalling its group
// (kill(0, sig)) would reach every process of the app.
runCatching { Os.setsid() }
// The native hook closes the binder fds in every other process (hook/handoff.c). Only an
// app launch asks for the number (a whole argument or variable value), never a guest's.
val fill = { arg: String ->
if (!fillBinderFd) arg
else if (arg == BINDER_FD_TOKEN) binderFd.toString()
else if (arg.endsWith("=$BINDER_FD_TOKEN")) arg.removeSuffix(BINDER_FD_TOKEN) + binderFd
else arg
}
// This thread blocks SIGQUIT, SIGUSR1 and SIGPIPE (Android's runtime), and an exec keeps
// that: the program's hook sets DDH_SIGMASK instead (none blocked, unless the request says).
val mask = if (env.any { it.startsWith("DDH_SIGMASK=") }) emptyList() else listOf("DDH_SIGMASK=0")
// Android raised this thread to THREAD_PRIORITY_TOP_APP_BOOST (a service the top app binds with
// BIND_IMPORTANT is scheduled as the top app); the program and its threads would keep it and
// run ahead of the game. They get the asker's priority instead, as a forked child would.
runCatching { Process.setThreadPriority(nice) }
Os.execve(argv[0], argv.map(fill).toTypedArray(),
env.filterNot { it.startsWith("DDH_WORKER_PID=") }.map(fill).toTypedArray() + mask +
"DDH_WORKER_PID=${Process.myPid()}")
} catch (e: ErrnoException) {
Log.e(TAG, "could not exec ${argv.firstOrNull()}", e)
}
Process.killProcess(Process.myPid())
}
/**
* Binder fds stay open across the exec, at [from] or above, where no fd of the program goes.
* Returns the highest fd used and the one on /dev/binder, whose closing Android takes for
* the death of this process.
*/
private fun keepBinderOpen(from: Int): Pair<Int, Int> {
var highest = from - 1
var binder = -1
File("/proc/self/fd").listFiles()?.forEach { link ->
val target = runCatching { Os.readlink(link.path) }.getOrNull() ?: return@forEach
if (target !in BINDER_DEVICES && !target.startsWith("/dev/binderfs/")) return@forEach
// A copy, not adoptFd(): some of these fds are owned (fdsan) by a ParcelFileDescriptor.
val copy = runCatching { ParcelFileDescriptor.fromFd(link.name.toIntOrNull() ?: return@forEach) }.getOrNull()
?: return@forEach
val kept = Os.fcntlInt(copy.fileDescriptor, OsConstants.F_DUPFD, from)
highest = maxOf(highest, kept)
if (target.substringAfterLast('/') == "binder") binder = kept
copy.close()
}
return highest to binder
}
companion object {
const val RUN = IBinder.FIRST_CALL_TRANSACTION
/** An argument, or a variable's whole value, in an app launch: replaced by the number of its kept binder fd. */
const val BINDER_FD_TOKEN = "@DDH_WORKER_BINDER_FD@"
// Longer than the app may wait for the hook's "go" (GuestWorkers.ACK_TIMEOUT_MS) before it commits
private const val GO_TIMEOUT_MS = 15000
private val BINDER_DEVICES = setOf("/dev/binder", "/dev/hwbinder", "/dev/vndbinder")
private const val BINDER_FDS = 900
private const val MOVED_FDS = 1200
private const val TAG = "GuestWorker"
private val kept = ArrayList<ParcelFileDescriptor>()
fun isWorkerProcess(context: Context, process: String?): Boolean =
process != null && process.startsWith(context.packageName + ":g") &&
process.substring(context.packageName.length + 2).all { it.isDigit() }
}
}
class GuestWorker0 : GuestWorker()
class GuestWorker1 : GuestWorker()
class GuestWorker2 : GuestWorker()
class GuestWorker3 : GuestWorker()
class GuestWorker4 : GuestWorker()
class GuestWorker5 : GuestWorker()
class GuestWorker6 : GuestWorker()
class GuestWorker7 : GuestWorker()
class GuestWorker8 : GuestWorker()
class GuestWorker9 : GuestWorker()
class GuestWorker10 : GuestWorker()
class GuestWorker11 : GuestWorker()
class GuestWorker12 : GuestWorker()
class GuestWorker13 : GuestWorker()
class GuestWorker14 : GuestWorker()
class GuestWorker15 : GuestWorker()
class GuestWorker16 : GuestWorker()
class GuestWorker17 : GuestWorker()
class GuestWorker18 : GuestWorker()
class GuestWorker19 : GuestWorker()
class GuestWorker20 : GuestWorker()
class GuestWorker21 : GuestWorker()
class GuestWorker22 : GuestWorker()
class GuestWorker23 : GuestWorker()
class GuestWorker24 : GuestWorker()
class GuestWorker25 : GuestWorker()
class GuestWorker26 : GuestWorker()
class GuestWorker27 : GuestWorker()
class GuestWorker28 : GuestWorker()
class GuestWorker29 : GuestWorker()
class GuestWorker30 : GuestWorker()
class GuestWorker31 : GuestWorker()
class GuestWorker32 : GuestWorker()
class GuestWorker33 : GuestWorker()
class GuestWorker34 : GuestWorker()
class GuestWorker35 : GuestWorker()
class GuestWorker36 : GuestWorker()
class GuestWorker37 : GuestWorker()
class GuestWorker38 : GuestWorker()
class GuestWorker39 : GuestWorker()
class GuestWorker40 : GuestWorker()
class GuestWorker41 : GuestWorker()
class GuestWorker42 : GuestWorker()
class GuestWorker43 : GuestWorker()
class GuestWorker44 : GuestWorker()
class GuestWorker45 : GuestWorker()
class GuestWorker46 : GuestWorker()
class GuestWorker47 : GuestWorker()
class GuestWorker48 : GuestWorker()
class GuestWorker49 : GuestWorker()
class GuestWorker50 : GuestWorker()
class GuestWorker51 : GuestWorker()
class GuestWorker52 : GuestWorker()
class GuestWorker53 : GuestWorker()
class GuestWorker54 : GuestWorker()
class GuestWorker55 : GuestWorker()
class GuestWorker56 : GuestWorker()
class GuestWorker57 : GuestWorker()
class GuestWorker58 : GuestWorker()
class GuestWorker59 : GuestWorker()
class GuestWorker60 : GuestWorker()
class GuestWorker61 : GuestWorker()
class GuestWorker62 : GuestWorker()
class GuestWorker63 : GuestWorker()
/** The pool of [GuestWorker] processes, and the socket guests ask it through (`droiddeck-spawn`). */
object GuestWorkers {
private const val TAG = "GuestWorkers"
private val classes: List<Class<out GuestWorker>> = listOf(
GuestWorker0::class.java, GuestWorker1::class.java, GuestWorker2::class.java,
GuestWorker3::class.java, GuestWorker4::class.java, GuestWorker5::class.java,
GuestWorker6::class.java, GuestWorker7::class.java, GuestWorker8::class.java,
GuestWorker9::class.java, GuestWorker10::class.java, GuestWorker11::class.java,
GuestWorker12::class.java, GuestWorker13::class.java, GuestWorker14::class.java,
GuestWorker15::class.java, GuestWorker16::class.java, GuestWorker17::class.java,
GuestWorker18::class.java, GuestWorker19::class.java, GuestWorker20::class.java,
GuestWorker21::class.java, GuestWorker22::class.java, GuestWorker23::class.java,
GuestWorker24::class.java, GuestWorker25::class.java, GuestWorker26::class.java,
GuestWorker27::class.java, GuestWorker28::class.java, GuestWorker29::class.java,
GuestWorker30::class.java, GuestWorker31::class.java, GuestWorker32::class.java,
GuestWorker33::class.java, GuestWorker34::class.java, GuestWorker35::class.java,
GuestWorker36::class.java, GuestWorker37::class.java, GuestWorker38::class.java,
GuestWorker39::class.java, GuestWorker40::class.java, GuestWorker41::class.java,
GuestWorker42::class.java, GuestWorker43::class.java, GuestWorker44::class.java,
GuestWorker45::class.java, GuestWorker46::class.java, GuestWorker47::class.java,
GuestWorker48::class.java, GuestWorker49::class.java, GuestWorker50::class.java,
GuestWorker51::class.java, GuestWorker52::class.java, GuestWorker53::class.java,
GuestWorker54::class.java, GuestWorker55::class.java, GuestWorker56::class.java,
GuestWorker57::class.java, GuestWorker58::class.java, GuestWorker59::class.java,
GuestWorker60::class.java, GuestWorker61::class.java, GuestWorker62::class.java,
GuestWorker63::class.java,
)
private class Slot(val index: Int) {
lateinit var connection: ServiceConnection
val connected = CountDownLatch(1)
@Volatile var service: IBinder? = null
@Volatile var pid = -1
@Volatile var guest = false
/** The session it runs a program for ([serve]'s number). */
@Volatile var session = 0
@Volatile var onExit: ((Int) -> Unit)? = null
/** The priority it runs its program at: the asker's (a guest, or the app thread that started it). */
@Volatile var nice = 0
/** Set once its program was handed over: only then does its end count as the program's. */
@Volatile var started = false
/** Between the pid and the last word of a launch (under the slots lock): its end is held back. */
var launching = false
/** It ended while launching: reported once the launch turns out to have run, never otherwise. */
var endedLaunching = false
}
private val slots = arrayOfNulls<Slot>(classes.size)
// Workers bound ahead of need while a session runs: a zygote fork and the bind take about
// 60-100 ms, which every program the session starts would otherwise wait for.
private val warm = ArrayDeque<Slot>()
@Volatile private var warmTarget = 0
// Numbers the sessions: an old session's teardown can still be running when the next one starts.
@Volatile private var session = 0
// The latest session whose teardown has begun
@Volatile private var stopped = 0
// Held for a launch's last word and for marking a session stopped
private val authorizing = Any()
private val warming = java.util.concurrent.atomic.AtomicBoolean(false)
private const val WARM_WORKERS = 2
// A game's start hands off a burst of programs (Wine's services, the agent's checks) within a few
// seconds: bound ahead while the client starts it, not forked while the game draws its first frames.
private const val LAUNCH_WORKERS = 16
private const val LAUNCH_MS = 20_000L
@Volatile private var launchUntil = 0L
private val launches = java.util.concurrent.atomic.AtomicInteger()
private const val ACK_TIMEOUT_MS = 5000
private const val ANSWER_TIMEOUT_MS = 5000
private const val RECEIVE_TIMEOUT_MS = 10000
// argv and the environment of one exec, with room: Linux caps them at a quarter of the stack
private const val MAX_REQUEST_BYTES = 8 shl 20
private const val MAX_RECEIVING = 32
private val receiving = java.util.concurrent.atomic.AtomicInteger()
private val connections = java.util.concurrent.Executors.newSingleThreadExecutor { Thread(it, "guest-worker-binder").apply { isDaemon = true } }
@Volatile private var server: Thread? = null
// Android sets a worker's main thread to THREAD_PRIORITY_TOP_APP_BOOST again each time the app returns to the top
private const val TOP_APP_BOOST = -10
private const val PRIORITY_CHECK_MS = 2000L
@Volatile private var keeper: Thread? = null
/** The app, once [attach] or [serve] ran in its main process; null before. */
@Volatile var context: Context? = null
private set
/** Whether the session runs its programs in workers: the native userland, and not turned off. */
fun enabled(context: Context): Boolean =
android.os.Build.VERSION.SDK_INT >= 30 && com.droiddeck.launcher.session.SessionPrefs.childProcessHandoff(context) &&
NativeGuest.enabled(context)
/** How the running session's root was started: in a worker (true) or counted (false); null with none running. */
@Volatile var sessionRootUncounted: Boolean? = null
/**
* Whether Android's child-process limit is out of the session's way: as the running session
* started (a proot session, or one whose root fell back to a counted start, is not), else as
* the next one would start.
*/
fun limitHandled(context: Context): Boolean =
sessionRootUncounted ?: (NativeGuest.sessionMode != false && enabled(context))
/** Whether pid is a program running in one of the workers. */
fun runsInWorker(pid: Int): Boolean = pid > 0 && synchronized(slots) { slots.any { it != null && it.started && it.pid == pid } }
fun socketName(context: Context): String = "droiddeck-spawn." + context.packageName + "." + Process.myUid()
/**
* Runs [argv] (a host command line) as the main process of a free worker with [env] and the
* fds in [stdio] as its 0, 1 and 2. Returns its pid, or -1. Blocks: not for the main thread.
* [onExit] runs once the process is gone.
*/
fun start(context: Context, argv: List<String>, env: List<String>, stdio: List<ParcelFileDescriptor>, onExit: (Int) -> Unit): Int =
start(context, argv, env, stdio, IntArray(stdio.size) { it }, onExit)
/** As [start], with the fds in [fds] placed at the numbers in [targets]. */
fun start(context: Context, argv: List<String>, env: List<String>, fds: List<ParcelFileDescriptor>, targets: IntArray,
onExit: (Int) -> Unit): Int = start(context, argv, env, fds, targets, false, onExit)
/**
* [guest]: one of the session's guest programs, which [guestPids] lists and [stopGuests] ends.
* [commit] runs with the pid before the worker may run the program; false, and it does not.
* [confirmed] runs once the worker has taken it on, just before it is told to run it; false, and it does not.
* [owner]: the session asking (the one a guest's request names), else the latest.
*/
private fun start(context: Context, argv: List<String>, env: List<String>, fds: List<ParcelFileDescriptor>, targets: IntArray,
guest: Boolean, onExit: (Int) -> Unit, commit: (Int) -> Boolean = { true },
confirmed: () -> Boolean = { true }, owner: Int = session,
nice: Int = Process.getThreadPriority(Process.myTid())): Int {
val app = context.applicationContext
if (guest && owner <= stopped) {
Log.w(TAG, (if (owner == 0) "a request naming no session" else "session $owner is stopping") +
": not starting ${argv.firstOrNull()}")
return -1
}
val slot = takeWarm() ?: bind(app)?.takeIf { fresh ->
fresh.connected.await(10, TimeUnit.SECONDS).also { if (!it) release(app, fresh) }
} ?: run {
Log.w(TAG, "no worker started for ${argv.firstOrNull()}")
return -1
}
slot.guest = guest
slot.session = owner
slot.onExit = onExit
slot.nice = nice
// during a game's start the pool drains instead: its refill would fork while the game starts
if (android.os.SystemClock.elapsedRealtime() >= launchUntil) refill(app)
// The worker execs once a byte comes through this socket: after the reply has reached us, so
// that its exec does not cut the reply off, and after the slot is marked started. Closed
// without one, the worker ends without running the program (the caller starts it another way).
// It answers with a byte of its own: without that it gave up waiting, and nothing runs.
var go: Array<ParcelFileDescriptor>? = null
var data: Parcel? = Parcel.obtain()
val reply = Parcel.obtain()
try {
go = ParcelFileDescriptor.createSocketPair()
data!!.writeStringArray(argv.toTypedArray())
data.writeStringArray(env.toTypedArray())
data.writeInt(fds.size)
fds.forEach { data.writeFileDescriptor(it.fileDescriptor) }
data.writeIntArray(targets)
data.writeInt(if (guest) 0 else 1)
data.writeFileDescriptor(go[0].fileDescriptor)
data.writeInt(nice)
slot.service!!.transact(GuestWorker.RUN, data, reply, 0)
// The worker has its own copy: with ours closed (and the request's, which holds one too),
// a worker that gave up leaves no reader
data.recycle()
data = null
go[0].close()
val pid = reply.readInt()
// Once a session's teardown has begun (stopGuests), none of its programs may start: it
// would not find them.
val stopping = { guest && owner <= stopped }
if (stopping() || !commit(pid)) {
Log.w(TAG, "worker ${slot.index}: ${argv.firstOrNull()} was not taken on")
release(app, slot)
return -1
}
// launching, not started yet: an end before the last word is reported only if the launch ran
val live = synchronized(slots) {
(slots[slot.index] === slot && !stopping()).also { if (it) { slot.pid = pid; slot.launching = true } }
}
if (!live) {
Log.w(TAG, "worker ${slot.index} ended, or its session is stopping, before running ${argv.firstOrNull()}")
release(app, slot)
return -1
}
Os.write(go[1].fileDescriptor, byteArrayOf(1), 0, 1)
val answer = StructPollfd().apply { fd = go[1].fileDescriptor; events = OsConstants.POLLIN.toShort() }
// then the word to run it: given only here, once its answer is in, so that a worker whose
// answer came too late never runs a program this call reports as not started. [confirmed]
// goes first: a caller that hears nothing runs the program itself, so it must have heard
// before the worker may run it (an app dying in between loses the program, not doubles it).
// The word and a teardown's start exclude each other: a launch is authorized before stopGuests()
// marks the session stopped, and is then stopped with the pids it takes (guestPids lists a
// launching slot), or never.
val answered = Os.poll(arrayOf(answer), ANSWER_TIMEOUT_MS) > 0 && Os.read(go[1].fileDescriptor, ByteArray(1), 0, 1) == 1
val accepted = answered && synchronized(authorizing) {
!stopping() && confirmed() && Os.write(go[1].fileDescriptor, byteArrayOf(1), 0, 1) == 1
}
val endedRunning = synchronized(slots) {
slot.launching = false
if (accepted && !slot.endedLaunching) slot.started = true
accepted && slot.endedLaunching
}
if (!accepted) {
Log.w(TAG, "worker ${slot.index} did not take ${argv.firstOrNull()} on")
release(app, slot)
return -1
}
// it ran and was already gone by now: its end, once
if (endedRunning) reportEnd(app, slot)
} catch (e: Exception) {
Log.w(TAG, "worker ${slot.index} refused ${argv.firstOrNull()}", e)
synchronized(slots) { slot.launching = false }
release(app, slot)
return -1
} finally {
data?.recycle()
reply.recycle()
go?.forEach { runCatching { it.close() } }
}
Log.i(TAG, "worker ${slot.index} (pid ${slot.pid}) runs ${argv.lastOrNull { !it.startsWith("-") }}")
return slot.pid
}
/** Binds a free worker; its [Slot.connected] opens once it is up. Null when all are in use. */
private fun bind(app: Context): Slot? {
val slot = synchronized(slots) {
val index = slots.indexOfFirst { it == null }
if (index < 0) {
Log.w(TAG, "all ${slots.size} workers are busy")
return null
}
Slot(index).also { slots[index] = it }
}
slot.connection = object : ServiceConnection {
override fun onServiceConnected(name: ComponentName, binder: IBinder) {
slot.service = binder
slot.connected.countDown()
}
override fun onServiceDisconnected(name: ComponentName) = release(app, slot)
override fun onBindingDied(name: ComponentName) = release(app, slot)
}
// Callbacks off the main thread: start() waits for onServiceConnected, and a caller holding a
// lock the main thread is waiting for (PulseAudio's launch) would otherwise wait out the timeout.
val bound = runCatching {
app.bindService(Intent(app, classes[slot.index]), Context.BIND_AUTO_CREATE or Context.BIND_IMPORTANT,
connections, slot.connection)
}.onFailure { Log.w(TAG, "worker ${slot.index} could not be bound", it) }.getOrDefault(false)
if (!bound) {
release(app, slot)
return null
}
return slot
}
private fun takeWarm(): Slot? = synchronized(slots) {
while (warm.isNotEmpty()) {
val slot = warm.removeFirst()
if (slots[slot.index] === slot && slot.service?.isBinderAlive == true) return slot
}
null
}
/** Brings the warm workers back up to [warmTarget], one at a time, off the caller's thread. */
private fun refill(app: Context) {
if (warmTarget == 0 || !warming.compareAndSet(false, true)) return
Thread({
try {
while (true) {
val missing = warmTarget - synchronized(slots) { warm.size }
if (missing <= 0) break
// all at once: the zygote forks them in parallel
val fresh = (1..missing).mapNotNull { bind(app) }
if (fresh.isEmpty()) break
for (slot in fresh) {
if (!slot.connected.await(10, TimeUnit.SECONDS)) {
release(app, slot)
continue
}
// decided once, under the lock: kept warm, or released
val kept = synchronized(slots) {
(slots[slot.index] === slot && warmTarget > 0).also { if (it) warm.addLast(slot) }
}
if (!kept) release(app, slot)
}
}
} finally {
warming.set(false)
}
}, "guest-worker-warm").apply { isDaemon = true; start() }
}
/** A game is about to start: [LAUNCH_WORKERS] bound ahead, back to [WARM_WORKERS] once it is up. */
fun expectLaunch(context: Context) {
val app = context.applicationContext
val raised = synchronized(slots) { (warmTarget > 0).also { if (it) warmTarget = LAUNCH_WORKERS } }
if (!raised) return
launchUntil = android.os.SystemClock.elapsedRealtime() + LAUNCH_MS
val launch = launches.incrementAndGet()
refill(app)
Thread({
try {
Thread.sleep(LAUNCH_MS)
} catch (_: InterruptedException) {
return@Thread
}
if (launches.get() != launch) return@Thread
val extra = synchronized(slots) {
if (warmTarget != LAUNCH_WORKERS) emptyList()
else {
warmTarget = WARM_WORKERS
List((warm.size - WARM_WORKERS).coerceAtLeast(0)) { warm.removeLast() }
}
}
extra.forEach { release(app, it) }
refill(app)
}, "guest-worker-launch").apply { isDaemon = true; start() }
}
private fun release(app: Context, slot: Slot) {
var report = false
val removed = synchronized(slots) {
warm.remove(slot)
if (slot.launching) slot.endedLaunching = true else report = slot.started
(slots[slot.index] === slot).also { if (it) slots[slot.index] = null }
}
if (!removed) return
runCatching { app.unbindService(slot.connection) }
if (report) reportEnd(app, slot)
}
private fun reportEnd(app: Context, slot: Slot) {
val onExit = slot.onExit ?: return
Thread({ onExit(exitStatus(app, slot.pid)) }, "guest-worker-exit").start()
}
/** The worker's exit as a wait status (exit code << 8, or the signal), -1 when unknown. */
private fun exitStatus(app: Context, pid: Int): Int {
if (pid <= 0 || android.os.Build.VERSION.SDK_INT < 30) return -1
val am = app.getSystemService(ActivityManager::class.java)
var recorded = false
repeat(20) {
am.getHistoricalProcessExitReasons(app.packageName, pid, 1).firstOrNull()?.let {
recorded = true
// an exit code only when the process exited itself; a signal number otherwise (a native crash)
if (it.reason == android.app.ApplicationExitInfo.REASON_EXIT_SELF) return (it.status and 0xff) shl 8
if (it.status in 1..64) return it.status and 0x7f
// Android records the death first and the zygote's status later (as UNKNOWN, 0, then
// EXIT_SELF): a reason without a status may still be completed
if (it.reason != android.app.ApplicationExitInfo.REASON_UNKNOWN) return OsConstants.SIGKILL
}
Thread.sleep(50)
}
// killed by Android with no signal recorded, not a clean exit
return if (recorded) OsConstants.SIGKILL else -1
}
/** The pids of session [of]'s guest programs running in workers. */
fun guestPids(of: Int = session): List<Int> =
synchronized(slots) { slots.mapNotNull { s -> s?.takeIf { it.guest && it.session == of }?.pid?.takeIf { it > 0 } } }
/** Ends session [of]'s guest programs that are still running, and, for the latest session, the warm workers. */
fun stopGuests(of: Int = session) {
// the check and the reset together: a new session's serve() may be under way
val drained = synchronized(authorizing) {
synchronized(slots) {
stopped = maxOf(stopped, of)
if (of != session) emptyList() else { warmTarget = 0; warm.toList().also { warm.clear() } }
}
}
context?.let { app -> drained.forEach { release(app, it) } }
val pids = guestPids(of)
if (pids.isEmpty()) return
pids.forEach { Process.sendSignal(it, OsConstants.SIGTERM) }
Thread.sleep(500)
pids.forEach { Process.killProcess(it) }
}
/** Listens for `droiddeck-spawn` requests from the session's guests. */
fun attach(context: Context) {
this.context = context.applicationContext
}
/** Puts a running program's main thread back to its asker's priority after Android boosted it (once started, never stops). */
private fun keepPriorities() {
synchronized(this) {
if (keeper != null) return
keeper = Thread({
while (true) {
try {
Thread.sleep(PRIORITY_CHECK_MS)
} catch (_: InterruptedException) {
return@Thread
}
val running = synchronized(slots) {
slots.filterNotNull().filter { it.started && it.pid > 0 && it.nice != TOP_APP_BOOST }
}
for (s in running) runCatching {
if (Process.getThreadPriority(s.pid) == TOP_APP_BOOST) Process.setThreadPriority(s.pid, s.nice)
}
}
}, "guest-worker-priority").apply { isDaemon = true; start() }
}
}
/** Starts a session's use of the workers (and the spawn socket, once); returns its number. */
fun serve(context: Context): Int {
val app = context.applicationContext
this.context = app
val number = synchronized(slots) { warmTarget = WARM_WORKERS; ++session }
refill(app)
keepPriorities()
synchronized(this) {
if (server != null) return number
server = Thread({
val socket = try {
LocalServerSocket(socketName(app))
} catch (e: Exception) {
Log.e(TAG, "no spawn socket", e)
synchronized(this) { server = null }
return@Thread
}
while (true) {
val client = runCatching { socket.accept() }.getOrNull()
if (client == null) {
Thread.sleep(100) // out of fds, for one: do not spin
continue
}
// A bounded number of requests still coming in: a stalled sender holds a thread
if (receiving.incrementAndGet() > MAX_RECEIVING) {
receiving.decrementAndGet()
Log.w(TAG, "$MAX_RECEIVING spawn requests are still coming in: refusing another")
runCatching { client.close() }
continue
}
Thread({
try {
handle(app, client) { receiving.decrementAndGet() }
} catch (e: Throwable) {
Log.w(TAG, "spawn request failed", e)
}
}, "guest-spawn").start()
}
}, "guest-spawn-server").apply { isDaemon = true; start() }
}
return number
}
private fun handle(app: Context, client: LocalSocket, received: () -> Unit) {
var receiving = true
val done = { if (receiving) { receiving = false; received() } }
try {
handleRequest(app, client, done)
} finally {
done()
}
}
private fun handleRequest(app: Context, client: LocalSocket, received: () -> Unit) {
client.use {
if (client.peerCredentials.uid != Process.myUid()) return
// The whole request and its fds within this, however slowly they come (the wait for a
// program's exit is not): each read gets what is left of it
val deadline = android.os.SystemClock.elapsedRealtime() + RECEIVE_TIMEOUT_MS
fun left() {
val ms = deadline - android.os.SystemClock.elapsedRealtime()
if (ms <= 0) throw java.net.SocketTimeoutException("spawn request not received in time")
client.soTimeout = ms.toInt()
}
val input = DataInputStream(client.inputStream)
val fds = ArrayList<ParcelFileDescriptor>()
fun take() {
val received = client.ancillaryFileDescriptors.orEmpty()
try {
received.forEach { fds.add(ParcelFileDescriptor.dup(it)) }
} finally {
received.forEach { runCatching { Os.close(it) } }
}
}
// fds can come with any read, the request's own bytes too: each read's are taken at once
fun fill(bytes: ByteArray) {
var got = 0
while (got < bytes.size) {
left()
val n = input.read(bytes, got, bytes.size - got)
take()
if (n < 0) throw java.io.EOFException("spawn request ended at $got of ${bytes.size} bytes")
got += n
}
}
// Until start() has them: closed on every way out before that, from the first byte on
var handedOver = false
try {
val length = ByteArray(4).also { fill(it) }.let { java.nio.ByteBuffer.wrap(it).int }
if (length !in 1..MAX_REQUEST_BYTES) {
Log.w(TAG, "spawn request of $length bytes refused")
return
}
val payload = ByteArray(length).also { fill(it) }
val request = JSONObject(String(payload))
if (request.has("fdchunks")) {
// The hook sends its fds after the request, a chunk with each byte (hook/handoff.c)
val total = (request.optJSONArray("fds")?.length() ?: 0) + (if (request.has("table")) 1 else 0)
while (fds.size < total) {
left()
if (input.read() < 0) throw java.io.EOFException("fds ended at ${fds.size} of $total")
take()
}
} else {
take()
}
received()
val argv = request.getJSONArray("argv").let { a -> List(a.length()) { a.getString(it) } }
val env = LinkedHashMap<String, String>()
request.optJSONObject("env")?.let { o -> o.keys().forEach { env[it] = o.getString(it) } }
request.optJSONArray("envlist")?.let { a ->
for (i in 0 until a.length()) a.getString(i).split('=', limit = 2).let { if (it.size == 2) env[it[0]] = it[1] }
}
// What the hook told the program that asked (it may run in a worker itself) is not this one's
env.keys.removeAll { it.startsWith("DDH_") }
val cwd = request.optString("cwd", "/")
val wait = request.optBoolean("wait", false)
// A path without a slash names a file in the cwd, as execve() takes it, not one on PATH
val file = request.optString("file", "").let { if (it.isNotEmpty() && '/' !in it) "./$it" else it }
// The handoff table (the hook's) comes last among the fds; the rest go to these numbers.
val tableIndex = request.optInt("table", -1)
val numbers = request.optJSONArray("fds")?.let { a -> IntArray(a.length()) { a.getInt(it) } } ?: IntArray(3) { it }
val table = fds.getOrNull(tableIndex)?.takeIf { pfd ->
runCatching { Os.readlink("/proc/self/fd/${pfd.fd}") }.getOrNull()?.contains("ddnatv-handoff") == true
}
val slot = request.optInt("slot", -1)
val parent = request.optInt("parent", -1)
var programFds = fds.filterIndexed { i, _ -> i != tableIndex }
var targets = numbers
if (table != null && slot >= 0) {
// The program reports its own exit status into the table (hook/handoff.c)
val tableFd = (numbers.maxOrNull() ?: 2) + 1
programFds = programFds + table
targets = numbers + tableFd
env["DDH_TABLE"] = "$tableFd:$slot:$parent:${request.optInt("child", -1)}"
}
val root = env["DDNATV_ROOT"]?.let(::File)
val out = client.outputStream
if (root == null || argv.isEmpty()) {
out.write("error no guest root or program\n".toByteArray())
return
}
val shell = listOf("/usr/bin/bash", "/bin/bash").first { File(root, it.removePrefix("/")).isFile }
val args = if (file.isNotEmpty()) {
listOf("-c", "unset DDH_WRAPPER; cd -- \"\$1\" 2>/dev/null; a=\$2; f=\$3; shift 3; exec -a \"\$a\" \"\$f\" \"\$@\"",
"droiddeck-spawn", cwd, argv[0], file) + argv.drop(1)
} else {
listOf("-c", "unset DDH_WRAPPER; cd -- \"\$1\" 2>/dev/null; shift; exec \"\$@\"", "droiddeck-spawn", cwd) + argv
}
val command = NativeGuest.command(root, shell, args)
env["DDNATV_REAL_EXE"] = File(root, shell.removePrefix("/")).path
// The hook restores these in the program (tools/nativeguest/hook/handoff.c).
if (request.has("sigign")) env["DDH_SIGIGN"] = request.getLong("sigign").toString()
if (request.has("nofile")) {
env["DDH_NOFILE"] = request.getLong("nofile").toString() +
(if (request.has("nofilemax")) ":" + request.getLong("nofilemax") else "")
}
if (request.has("umask")) env["DDH_UMASK"] = request.getLong("umask").toString()
if (request.has("pgid")) env["DDH_PGID"] = request.getLong("pgid").toString()
if (request.has("anchor")) env["DDH_ANCHOR"] = request.getLong("anchor").toString()
if (request.has("pstart")) env["DDH_PSTART"] = request.getLong("pstart").toString()
if (request.has("astart")) env["DDH_ASTART"] = request.getLong("astart").toString()
env["DDH_SIGMASK"] = request.optLong("sigmask", 0L).toString()
// The shell above: the hook restores nothing there (bash changes its own signal mask),
// only in the program it execs, which no longer has this.
env["DDH_WRAPPER"] = "1"
val child = request.optInt("child", -1)
val exited = CountDownLatch(1)
var status = -1
var worker = -1
// The hook answers the pid with "go" (ack): without it (it died, or gave up and runs the
// program itself) the worker must not run it too.
val ack = request.optBoolean("ack", false)
var answered = false
// the hook's last word, sent once the worker has taken the program on and before it runs it
var confirmedToHook = false
// The session whose guest asks, not the latest: a new session can start (serve()) while an
// older one's guests are still sending, and that older one's teardown must find its programs.
// A request that names none is refused (start() runs nothing for session 0): the hook and
// droiddeck-spawn always name it, and which session's it is cannot be told otherwise.
val owner = request.optInt("session", 0).coerceAtLeast(0)
// The sender is the forked child (or droiddeck-spawn): its priority is the one the program would inherit
val nice = runCatching { Process.getThreadPriority(client.peerCredentials.pid) }.getOrDefault(Process.THREAD_PRIORITY_DEFAULT)
val pid = start(app, command, env.map { (k, v) -> "$k=$v" }, programFds, targets, true, owner = owner, nice = nice, onExit = { code ->
status = code
if (table != null && slot >= 0) reportExit(table, slot, code, parent, child, worker)
exited.countDown()
}, confirmed = {
!ack || runCatching {
out.write("ok\n".toByteArray())
out.flush()
confirmedToHook = true
}.isSuccess
}, commit = { started ->
worker = started
if (!ack) return@start true
runCatching {
out.write("pid $started\n".toByteArray())
out.flush()
answered = true
client.soTimeout = ACK_TIMEOUT_MS
// the whole line: a hook whose write stopped short treats it as failed and runs the program itself
val line = StringBuilder()
var ended = false
while (!ended) {
val c = input.read()
if (c < 0) break
if (c == '\n'.code) ended = true else line.append(c.toChar())
}
ended && line.toString() == "go"
}.getOrDefault(false)
})
handedOver = true
programFds.filter { it !== table }.forEach { runCatching { it.close() } }
if (pid <= 0) table?.let { runCatching { it.close() } }
if (!answered) {
out.write(if (pid > 0) "pid $pid\n".toByteArray() else "error no worker\n".toByteArray())
out.flush()
} else if (!confirmedToHook) {
// nothing runs it in a worker: the hook runs it itself
runCatching { out.write("error not started\n".toByteArray()); out.flush() }
}
if (pid > 0 && wait) {
exited.await()
// droiddeck-spawn exits with this: an exit code, or 128 plus the signal
val code = if (status < 0) 1 else if (status and 0x7f == 0) (status shr 8) and 0xff else 128 + (status and 0x7f)
out.write("exit $code\n".toByteArray())
out.flush()
}
} finally {
if (!handedOver) fds.forEach { runCatching { it.close() } }
}
}
}
// Layout of the hook's table (tools/nativeguest/hook/handoff.c): a 64-byte header, then 64-byte
// entries of int32 child, real, parent, state, ..., and at 32 the app's report: int32 status, child.
// The report is one 8-byte write tagged with the child it is for; only the hook changes an
// entry's state, so a report that lands after the entry went to another child is ignored there.
private fun reportExit(table: ParcelFileDescriptor, slot: Int, status: Int, parent: Int, child: Int, worker: Int) {
runCatching {
val entry = 64L + slot * 64L
val head = java.nio.ByteBuffer.allocate(16).order(java.nio.ByteOrder.nativeOrder())
Os.pread(table.fileDescriptor, head, entry)
val real = head.getInt(4)
val state = head.getInt(12)
// Also while the hook holds the entry (TAKEN) or has already guessed its end (EXITED):
// the report is for this child only, and wins over the timeout's guess (ddh_status)
if (head.getInt(0) != child || head.getInt(8) != parent || (real != 0 && real != worker) || state !in 1..4)
return@runCatching
// An exit Android has no record of is reported as a failure, not as a signal.
val report = java.nio.ByteBuffer.allocate(8).order(java.nio.ByteOrder.nativeOrder())
.putInt(0, if (status < 0) 1 shl 8 else status).putInt(4, child)
Os.pwrite(table.fileDescriptor, report, entry + 32)
if (parent > 0) Process.sendSignal(parent, OsConstants.SIGCHLD)
}.onFailure { Log.w(TAG, "could not report an exit to the guest's parent", it) }
runCatching { table.close() }
}
}
@@ -130,8 +130,6 @@ object SessionFiles {
"usr/local/bin/droiddeck-agent" to "usr/local/bin/droiddeck-agent",
"usr/local/bin/steam-compatibility" to "usr/local/bin/steam-compatibility",
"usr/local/bin/droiddeck-clipboard" to "usr/local/bin/droiddeck-clipboard",
"usr/local/bin/droiddeck-spawn" to "usr/local/bin/droiddeck-spawn",
"usr/local/bin/droiddeck-log-writer" to "usr/local/bin/droiddeck-log-writer",
"usr/local/bin/droiddeck-desktop-clipboard" to "usr/local/bin/droiddeck-desktop-clipboard",
"usr/local/bin/droiddeck-gpu-window" to "usr/local/bin/droiddeck-gpu-window",
"usr/local/bin/droiddeck-steam-install" to "usr/local/bin/droiddeck-steam-install",
@@ -156,7 +154,6 @@ object SessionFiles {
"usr/local/bin/droiddeck-desktop-bookmarks" to "usr/local/bin/droiddeck-desktop-bookmarks",
"usr/local/bin/droiddeck-downloads" to "usr/local/bin/droiddeck-downloads",
"usr/local/bin/droiddeck-root" to "usr/local/bin/droiddeck-root",
"usr/local/bin/droiddeck-user" to "usr/local/bin/droiddeck-user",
"usr/local/bin/droiddeck-text" to "usr/local/bin/droiddeck-text",
"usr/local/bin/droiddeck-snapd" to "usr/local/bin/droiddeck-snapd",
"usr/local/bin/droiddeck-emulators" to "usr/local/bin/droiddeck-emulators",
@@ -361,7 +358,6 @@ object SessionFiles {
Log.e(TAG, "could not write steam-compatibility-label")
}
writeCjkFontConfig(root, etc)
writeSessionBusPolicy(etc)
writeDesktopStrings(context, File(etc, "droiddeck").apply { mkdirs() })
val droiddeckEtc = File(etc, "droiddeck").apply { mkdirs() }
val stagedSocket = File(droiddeckEtc, "bwrap-socket.staged")
@@ -884,24 +880,6 @@ object SessionFiles {
}
}
/**
* A session bus admits only its owner, and with droiddeck-user (the native hook's ordinary
* user) a root process and a user's share the bus while the kernel sees one Android uid.
*/
private fun writeSessionBusPolicy(etc: File) {
val xml = """<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy context="default">
<allow user="*"/>
</policy>
</busconfig>
"""
val conf = File(etc, "dbus-1/session.d/droiddeck-users.conf")
conf.parentFile?.mkdirs()
if (!FileUtils.writeString(conf, xml)) Log.e(TAG, "could not write the session bus policy")
}
private fun writeCjkFontConfig(root: File, etc: File) {
try {
val confDir = File(etc, "fonts/conf.d").apply { mkdirs() }
@@ -63,24 +63,6 @@ object SessionPrefs {
.takeIf { value -> orientationOptions.any { it.first == value } }
?: ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE
fun orientation(context: Context, mode: String?): Int {
val key = when (mode) {
"steam", SessionService.MODE_STEAM, SessionService.MODE_RUN -> "orientation.steam"
"desktop", SessionService.MODE_DESKTOP -> "orientation.desktop"
else -> null
} ?: return orientation(context)
val stored = prefs(context).getInt(key, Int.MIN_VALUE)
return if (stored == Int.MIN_VALUE) orientation(context)
else stored.takeIf { value -> orientationOptions.any { it.first == value } } ?: orientation(context)
}
fun setOrientation(context: Context, mode: String, orientation: Int) {
require(mode == "steam" || mode == "desktop")
require(orientationOptions.any { it.first == orientation })
val key = if (mode == "steam") "orientation.steam" else "orientation.desktop"
prefs(context).edit().putInt(key, orientation).apply()
}
/** The session menu's width in dp the user dragged it to; null keeps the default. */
fun drawerWidthDp(context: Context): Int? = prefs(context).getInt("drawerWidthDp", 0).takeIf { it > 0 }
@@ -93,19 +75,11 @@ object SessionPrefs {
prefs(context).edit().putInt("orientation", orientation).apply()
}
fun windowOrientation(context: Context, followScreen: Boolean, smallestWidthDp: Int, mode: String? = null): Int {
val modeKey = when (mode) {
"steam", SessionService.MODE_STEAM, SessionService.MODE_RUN -> "orientation.steam"
"desktop", SessionService.MODE_DESKTOP -> "orientation.desktop"
else -> null
}
val preferences = prefs(context)
if (modeKey != null && preferences.contains(modeKey)) return orientation(context, mode)
return if (followScreen && smallestWidthDp >= SessionDisplay.UNFOLDED_MIN_DP && !preferences.contains("orientation"))
fun windowOrientation(context: Context, followScreen: Boolean, smallestWidthDp: Int): Int =
if (followScreen && smallestWidthDp >= SessionDisplay.UNFOLDED_MIN_DP && !prefs(context).contains("orientation"))
ActivityInfo.SCREEN_ORIENTATION_USER else orientation(context)
}
fun portrait(context: Context, mode: String? = null): Boolean = when (orientation(context, mode)) {
fun portrait(context: Context): Boolean = when (orientation(context)) {
ActivityInfo.SCREEN_ORIENTATION_PORTRAIT -> true
ActivityInfo.SCREEN_ORIENTATION_USER ->
context.resources.configuration.orientation == android.content.res.Configuration.ORIENTATION_PORTRAIT
@@ -118,39 +92,6 @@ object SessionPrefs {
prefs(context).edit().putBoolean("launcherFullscreen", on).apply()
}
fun launcherFrost(context: Context): Boolean = prefs(context).getBoolean("launcherFrost", false)
fun setLauncherFrost(context: Context, on: Boolean) {
prefs(context).edit().putBoolean("launcherFrost", on).apply()
}
fun frostWallpaper(context: Context): Boolean = prefs(context).getBoolean("frostWallpaper", true)
fun setFrostWallpaper(context: Context, on: Boolean) {
prefs(context).edit().putBoolean("frostWallpaper", on).apply()
}
fun frostCards(context: Context): Boolean = prefs(context).getBoolean("frostCards", true)
fun setFrostCards(context: Context, on: Boolean) {
prefs(context).edit().putBoolean("frostCards", on).apply()
}
fun frostTransparency(context: Context): Int = frostPercent(context, "frostTransparency", com.droiddeck.launcher.ui.FROST_WALLPAPER_DEFAULT)
fun setFrostTransparency(context: Context, percent: Int) = setFrostPercent(context, "frostTransparency", percent)
fun frostCardTransparency(context: Context): Int = frostPercent(context, "frostCardTransparency", com.droiddeck.launcher.ui.FROST_DEFAULT)
fun setFrostCardTransparency(context: Context, percent: Int) = setFrostPercent(context, "frostCardTransparency", percent)
private fun frostPercent(context: Context, key: String, default: Int): Int =
prefs(context).getInt(key, default).coerceIn(0, com.droiddeck.launcher.ui.FROST_MAX)
private fun setFrostPercent(context: Context, key: String, percent: Int) {
prefs(context).edit().putInt(key, percent.coerceIn(0, com.droiddeck.launcher.ui.FROST_MAX)).apply()
}
fun controllerHaptics(context: Context): Boolean = prefs(context).getBoolean("controllerHaptics", true)
fun setControllerHaptics(context: Context, on: Boolean) {
@@ -552,17 +493,6 @@ object SessionPrefs {
prefs(context).edit().putString("drawerPageHidden", keys.joinToString(",")).apply()
}
fun drawerSections(context: Context): Map<String, Boolean> =
idList(prefs(context).getString("drawerSections", null)).mapNotNull { entry ->
val at = entry.lastIndexOf('=').takeIf { it > 0 } ?: return@mapNotNull null
entry.substring(0, at) to (entry.substring(at + 1) == "1")
}.toMap()
fun setDrawerSections(context: Context, sections: Map<String, Boolean>) {
prefs(context).edit().putString("drawerSections", sections.entries.filter { ',' !in it.key }
.joinToString(",") { "${it.key}=${if (it.value) 1 else 0}" }).apply()
}
fun setNavTabHidden(context: Context, keys: Set<String>) {
prefs(context).edit().putString("navTabHidden", keys.joinToString(",")).apply()
}
@@ -1170,20 +1100,10 @@ object SessionPrefs {
fun nativeUserland(context: Context): Boolean = prefs(context).getBoolean("nativeUserland", true)
/** The session's long-lived programs run in worker processes Android does not count (GuestWorkers). */
fun childProcessHandoff(context: Context): Boolean = prefs(context).getBoolean("childProcessHandoff", true)
fun setNativeUserland(context: Context, on: Boolean) {
prefs(context).edit().putBoolean("nativeUserland", on).apply()
}
/** Whether the Plasma desktop, and so its apps and shells, runs as an ordinary user instead of root (native userland only). */
fun desktopAsUser(context: Context): Boolean = prefs(context).getBoolean("desktopAsUser", false)
fun setDesktopAsUser(context: Context, on: Boolean) {
prefs(context).edit().putBoolean("desktopAsUser", on).apply()
}
fun prootFastPath(context: Context): Boolean = prefs(context).getBoolean("prootFastPath", true)
fun setProotFastPath(context: Context, on: Boolean) {
@@ -1887,15 +1807,16 @@ object SessionPrefs {
const val PIP_FPS = 30
fun compositorFpsLimit(mirrorRefreshLimit: Int, sessionLimit: Int = 0, pip: Boolean = false, hostCap: Int = 0): Int {
val limit = listOf(mirrorRefreshLimit, sessionLimit, hostCap).filter { it > 0 }.minOrNull() ?: FPS_UNPACED
fun compositorFpsLimit(mirrorRefreshLimit: Int, sessionLimit: Int = 0, pip: Boolean = false): Int {
val limit = when {
mirrorRefreshLimit <= 0 && sessionLimit <= 0 -> FPS_UNPACED
mirrorRefreshLimit <= 0 -> sessionLimit
sessionLimit <= 0 -> mirrorRefreshLimit
else -> minOf(mirrorRefreshLimit, sessionLimit)
}
return if (pip && mirrorRefreshLimit <= 0 && (limit <= 0 || limit > PIP_FPS)) PIP_FPS else limit
}
/** The per-app rate Android holds this window to (Game Mode's FPS override), or 0 when the panel's rate applies. */
fun hostFrameCap(overrideHz: Float, panelHz: Float): Int =
if (overrideHz > 1f && panelHz - overrideHz > 1f) Math.round(overrideHz) else 0
val upscalerChoices = listOf(
2 to "Nearest", 0 to "Linear", 4 to "AMD FSR 1", 3 to "Snapdragon GSR",
8 to "Snapdragon GSR (quality)", 7 to "NVIDIA NIS", 6 to "Sharpen only",
@@ -2196,12 +2117,6 @@ object SessionPrefs {
(resolutionChosen(context, SessionService.MODE_DESKTOP) || resolutionChosen(context, SessionService.MODE_DESKTOP, true))) SessionService.MODE_DESKTOP
else prefMode(mode)
fun showGlassesShortcut(context: Context): Boolean = prefs(context).getBoolean("showGlassesShortcut", true)
fun setShowGlassesShortcut(context: Context, show: Boolean) {
prefs(context).edit().putBoolean("showGlassesShortcut", show).apply()
}
fun pipAutoEnter(context: Context): Boolean = prefs(context).getBoolean("pipAutoEnter", true)
fun setPipAutoEnter(context: Context, enabled: Boolean) {
@@ -661,7 +661,7 @@ class SessionService : Service() {
Log.i(TAG, "game resolution: ${w}x$h on a ${size.first}x${size.second} output")
}
if (SessionState.followScreen || size.first < size.second ||
SessionPrefs.orientation(this, SessionState.mode) == android.content.pm.ActivityInfo.SCREEN_ORIENTATION_USER)
SessionPrefs.orientation(this) == android.content.pm.ActivityInfo.SCREEN_ORIENTATION_USER)
guest.add("DD_FOLLOW_OUTPUT=1")
if (SessionState.hdr) {
guest.add("DD_HDR=1")
@@ -705,25 +705,10 @@ class SessionService : Service() {
if (com.droiddeck.launcher.gpu.Lossless.owned(this)) guest.add("DD_LOSSLESS_OWNED=1")
}
guest.add("DD_LAUNCH_DIR=" + sessionRoot.path)
// this session's worker number: the shared field may be a newer session's by the time it is used
var ownWorkers = 0
if (com.droiddeck.launcher.runtime.GuestWorkers.enabled(this)) {
// Under the lock a stop takes its number with: a stop either comes first (and this session
// starts no workers) or owns them
ownWorkers = synchronized(stopLock) {
if (gen != sessionGen || !SessionState.running) 0
else com.droiddeck.launcher.runtime.GuestWorkers.serve(this).also { guestWorkerSession = it }
}
if (ownWorkers > 0) {
guest.add("DD_SPAWN=" + com.droiddeck.launcher.runtime.GuestWorkers.socketName(this))
guest.add("DD_SPAWN_SESSION=$ownWorkers")
}
}
// Proton builds up to 11.12 report X11 text fields under this name.
guest.add("BL_LAUNCH_DIR=" + sessionRoot.path)
GameStorage.effective(this)?.let { guest.add("DD_LIBRARY_LABEL=" + it.label.replace('"', ' ')) }
if (SessionState.mode == MODE_STEAM && SessionState.steamUi == "desktop") guest.add("DD_STEAM_UI=desktop")
if (SessionPrefs.desktopAsUser(this)) guest.add("DD_DESKTOP_USER=1")
// Detailed graphics logs: per-game logs and the guest's Vulkan summary (a GPU that is not
// an Adreno, or Setup's switch), and graphics-report.txt for every session.
if (GraphicsReport.detailed(this)) guest.add("DD_GAME_LOGS=1")
@@ -878,10 +863,10 @@ class SessionService : Service() {
watchLaunchRequests(sessionRoot)
watchSyncWanted(root)
EsyncPacks.fetchInBackground(this, root)
val pid = SessionEvents.step("guest-launch") { HostProcess.startUncounted(line, hostEnv.asArray(), root, { status ->
val pid = SessionEvents.step("guest-launch") { 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@startUncounted
return@start
}
val program = programStatus(sessionRoot)
Log.i(TAG, "session ended: $status" + if (program != null) " (program $program)" else "")
@@ -897,19 +882,10 @@ class SessionService : Service() {
syncWatcher = null
}
abandonStart(gen, sessionDir, started)
val workers = ownWorkers
if (pid > 1) Thread({ teardown(pid, workerSession = workers) }, "session-teardown").start()
else com.droiddeck.launcher.runtime.GuestWorkers.stopGuests(workers)
if (pid > 1) Thread({ teardown(pid) }, "session-teardown").start()
return
}
sessionPid = pid
// Under the lock Stop clears it with, and only while this session still runs: a Stop since the
// check above has cleared it already, and this would set it again for no running session.
val uncounted = com.droiddeck.launcher.runtime.GuestWorkers.runsInWorker(pid)
synchronized(stopLock) {
if (gen == sessionGen && SessionState.running)
com.droiddeck.launcher.runtime.GuestWorkers.sessionRootUncounted = uncounted
}
if (pid > 1) {
raiseTracer(pid, gen)
SessionEvents.guestStarted(pid)
@@ -1559,15 +1535,10 @@ class SessionService : Service() {
return binds
}
// The workers' session number of the session running now (GuestWorkers.serve)
@Volatile private var guestWorkerSession = 0
private fun teardown(prootPid: Int, expectedStartTime: Long? = null, workerSession: Int = guestWorkerSession) {
private fun teardown(prootPid: Int, expectedStartTime: Long? = null) {
fun stillSameProcess(): Boolean = expectedStartTime == null || readStat(prootPid)?.second == expectedStartTime
if (!stillSameProcess()) return
// The session's programs that run in worker processes are not descendants of its root.
val workers = if (expectedStartTime == null) com.droiddeck.launcher.runtime.GuestWorkers.guestPids(workerSession) else emptyList()
val tree = descendants(prootPid) + workers.flatMap { pid -> listOfNotNull(readStat(pid)?.let { Pair(pid, it.second) }) + descendants(pid) }
val tree = descendants(prootPid)
if (!stillSameProcess()) return
saveWineRegistries(tree)
android.os.Process.sendSignal(prootPid, 15)
@@ -1584,7 +1555,6 @@ class SessionService : Service() {
killed++
}
if (killed > 0) Log.i(TAG, "swept $killed process(es) proot left behind")
if (expectedStartTime == null) com.droiddeck.launcher.runtime.GuestWorkers.stopGuests(workerSession)
}
private fun clearCachedApps() {
@@ -1759,7 +1729,6 @@ class SessionService : Service() {
SessionEvents.record("steam.game_launch_requested", mapOf("gameId" to gameId, "generation" to gen))
watchGameExit(gameId, gen, exitWatchToken, pendingSteamPreviousGameId)
Log.i(TAG, "queued Steam game $gameId for the running client")
com.droiddeck.launcher.runtime.GuestWorkers.expectLaunch(this)
}
private fun watchGameExit(
@@ -2356,16 +2325,12 @@ class SessionService : Service() {
return
}
completeNativeSleep()
var workers = 0
val (ended, endedArch) = synchronized(stopLock) {
if (gen != null && gen != sessionGen) return
// as it is when running is cleared: startup registers its workers under this lock too
workers = guestWorkerSession
cancelQueuedSteamGame()
gameExitWatchToken++
// also when startup stopped before the guest ran
com.droiddeck.launcher.runtime.NativeGuest.sessionMode = null
com.droiddeck.launcher.runtime.GuestWorkers.sessionRootUncounted = null
if (!SessionState.running) return
if (relaunch) SessionState.confirmRelaunchStop()
SessionEvents.record("guest.exited", mapOf("status" to status))
@@ -2426,8 +2391,7 @@ class SessionService : Service() {
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, workerSession = workers)
else com.droiddeck.launcher.runtime.GuestWorkers.stopGuests(workers)
if (prootPid > 1) teardown(prootPid)
killGuestLeftovers(ended)
pruneSystemVulkanRuntime()
finishSessionStop(status, stoppedGen, collectEnded)
@@ -2436,7 +2400,6 @@ class SessionService : Service() {
} else {
Thread({ pruneSystemVulkanRuntime() }, "system-vulkan-prune").start()
Thread({
com.droiddeck.launcher.runtime.GuestWorkers.stopGuests(workers)
com.droiddeck.launcher.stores.gog.GogComet.end(stoppedSession)
finishSessionStop(status, stoppedGen, collectEnded)
if (launcherEnded) importLauncherGames()
@@ -12,13 +12,13 @@ object SettingsReset {
private const val TAG = "SettingsReset"
internal val SESSION_KEYS = setOf(
"orientation", "launcherFullscreen", "launcherFrost", "frostWallpaper", "frostCards", "frostTransparency", "frostCardTransparency", "controllerHaptics", "animations", "lowStorageWarning", "theme", "runSteamAtStartup", "startupSession", "addedGamesArt",
"orientation", "launcherFullscreen", "controllerHaptics", "animations", "lowStorageWarning", "theme", "runSteamAtStartup", "startupSession", "addedGamesArt",
"drawerWidthDp", "dualScreenMode", "dualScreenSessionMode", "dualScreenLauncher", "dualScreenSessionControls", "androidTextFieldKeyboard",
"soundtracksIngame", "gameStoresSpeedTier", "gameStoresParallel", "storesOpenTab", "storesShowMature",
"storesInstallLanguage",
"hud", "hudDeck", "hudFps", "hudBattery", "hudGraph", "hudColor", "hudOpacity", "__KEEP_droidDeckHud__", "__KEEP_droidDeckHudPos__", "backHold", "dockedMenuController", "backActionsInverted", "backDoubleTapMs", "touch", "pen", "penButton", "osc", "shape", "steamController",
"gamepadLeft", "gamepadRight", "pipAutoEnter", "unfoldedControls", "unfoldedControlsWithController",
"stretch16x9", "avoidNotch", "picturePosition", "integerScaling", "railLabels", "developerTools", "navTabOrder", "navTabShelved", "navTabHidden", "drawerPageOrder", "drawerPageHidden", "drawerSections", "pcKeyboardSize", "pcKeyboardOpacity", "pcKeyboardHiddenKeys",
"stretch16x9", "avoidNotch", "picturePosition", "integerScaling", "railLabels", "developerTools", "navTabOrder", "navTabShelved", "navTabHidden", "drawerPageOrder", "drawerPageHidden", "pcKeyboardSize", "pcKeyboardOpacity", "pcKeyboardHiddenKeys",
"gpuDriverMode", "androidDriver", "linuxDriver", "linuxDriver.steam", "linuxDriver.desktop",
"tuSysmem", "glThread", "noGlError", "zinkLazy", "mangoapp", "gpuClockPin", "gamescopeRealtime", "paceCores",
"directAudio", "mic", "wifiDiscovery", "clientCpusOverride", "clientCpus", "gameCpus",
@@ -67,7 +67,7 @@ object EaLsx {
}
@Volatile var game: Game? = null
@Volatile internal var account: Account? = null
@Volatile private var account: Account? = null
/** The one session of the current launch that may act for the account. */
/** Bumped whenever the launch changes; a connection accepted under an older one is not admitted. */
@Volatile internal var generation = 0
@@ -333,11 +333,10 @@ object EaLsx {
private fun now() = LocalDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))
internal fun answer(session: Session, m: Message): String? {
private fun answer(session: Session, m: Message): String? {
val g = game
val who = account
val person = who?.takeIf { session.trusted }
val profile = who?.takeIf { session.trusted || session.claimed }
val locale = g?.locale ?: "en_US"
return when (m.name) {
"ChallengeResponse" -> {
@@ -356,16 +355,15 @@ object EaLsx {
"GetConfig" -> tag("GetConfigResponse", body = SERVICES.joinToString("") { tag("Service", "Name" to it.first, "Facility" to it.second) })
"GetProfile" -> tag(
"GetProfileResponse",
"Persona" to profile?.persona.orEmpty(), "SubscriberLevel" to 0, "CommerceCurrency" to "USD", "IsTrialSubscriber" to false,
"Country" to "US", "UserId" to profile?.userId.orEmpty(), "GeoCountry" to "US", "AvatarId" to "", "IsSubscriber" to false,
"IsSteamSubscriber" to false, "PersonaId" to profile?.personaId.orEmpty(), "IsUnderAge" to false, "UserIndex" to 0,
"Persona" to person?.persona.orEmpty(), "SubscriberLevel" to 0, "CommerceCurrency" to "USD", "IsTrialSubscriber" to false,
"Country" to "US", "UserId" to person?.userId.orEmpty(), "GeoCountry" to "US", "AvatarId" to "", "IsSubscriber" to false,
"IsSteamSubscriber" to false, "PersonaId" to person?.personaId.orEmpty(), "IsUnderAge" to false, "UserIndex" to 0,
)
"GetSetting" -> tag("GetSettingResponse", "Setting" to when (m.attrs["SettingId"]) {
"ENVIRONMENT" -> "production"
"LANGUAGE" -> locale
else -> "false"
})
"GetSettings" -> tag("GetSettingsResponse", "IsIGOAvailable" to false, "IsIGOEnabled" to false, "IsTelemetryEnabled" to false, "IsManualOffline" to false)
"GetGameInfo" -> tag("GetGameInfoResponse", "GameInfo" to when (m.attrs["GameInfoId"]) {
"FREETRIAL" -> "false"
"LANGUAGES" -> LANGUAGES
@@ -405,7 +403,7 @@ object EaLsx {
)
})
}
"GetPresence" -> tag("GetPresenceResponse", "UserId" to profile?.userId.orEmpty(), "Presence" to "INGAME")
"GetPresence" -> tag("GetPresenceResponse", "UserId" to person?.userId.orEmpty(), "Presence" to "INGAME")
"QueryPresence" -> tag("QueryPresenceResponse", body = "")
"QueryFriends" -> tag("QueryFriendsResponse", body = "")
"GetBlockList" -> tag("GetBlockListResponse", "Return" to "Success", body = "")
@@ -1,142 +0,0 @@
package com.droiddeck.launcher.ui
import android.content.Context
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.expandVertically
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.shrinkVertically
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.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.Row
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.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.ExpandMore
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.compositionLocalOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateMapOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.rotate
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.semantics.stateDescription
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 com.droiddeck.launcher.R
import com.droiddeck.launcher.session.SessionPrefs
/**
* Inside the session menu every top-level settings group folds to its header and a summary of its values.
* Groups start folded; a group the player opens or folds stays that way across sessions.
*/
internal object DrawerSectionState {
private val chosen = mutableStateMapOf<String, Boolean>()
fun load(context: Context) {
if (DevPreview.drawer != null) return
chosen.clear()
chosen.putAll(SessionPrefs.drawerSections(context))
}
fun isOpen(key: String) = chosen[key] ?: false
fun toggle(context: Context, key: String) {
chosen[key] = !isOpen(key)
if (DevPreview.drawer == null) SessionPrefs.setDrawerSections(context, chosen.toMap())
}
}
internal class DrawerSections(val context: Context, val track: (String) -> Modifier)
internal val LocalDrawerSections = compositionLocalOf<DrawerSections?> { null }
@Composable
internal fun DrawerSection(
sections: DrawerSections, key: String, title: String, summary: String?, tag: String?,
content: @Composable ColumnScope.() -> Unit,
) {
val colors = MaterialTheme.colorScheme
val pal = LocalPalette.current
val open = DrawerSectionState.isOpen(key)
val source = remember { MutableInteractionSource() }
val hot = source.collectIsFocusedAsState().value || source.collectIsHoveredAsState().value
val rotation by animateFloatAsState(if (open) 180f else 0f, Motion.tw(180), label = "sectionArrow")
val state = stringResource(if (open) R.string.widgets_expanded else R.string.widgets_collapsed)
val toggle = { DrawerSectionState.toggle(sections.context, key) }
val shape = RoundedCornerShape(14.dp)
Column(
Modifier.fillMaxWidth().padding(top = 6.dp).clip(shape)
.background(colors.surface).border(1.dp, if (open) pal.line2 else pal.line, shape),
) {
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp),
modifier = Modifier.fillMaxWidth().heightIn(min = 48.dp)
.then(sections.track("section-$key"))
.testTag("drawer-section-$key")
.background(if (hot) pal.signal.copy(alpha = 0.12f) else androidx.compose.ui.graphics.Color.Transparent)
.glideBorder(hot, shape, pal.signal)
.hoverable(source)
.clickable(interactionSource = source, indication = LocalIndication.current, role = Role.Button, onClick = toggle)
.controllerConfirm(onClick = toggle)
.semantics { contentDescription = title; stateDescription = state }
.padding(start = 12.dp, end = 8.dp, top = 6.dp, bottom = 6.dp),
) {
Column(Modifier.weight(1f)) {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
Text(title.uppercase(), fontSize = 12.sp, fontWeight = FontWeight.SemiBold, letterSpacing = 1.2.sp,
color = if (open) colors.onBackground else colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis,
modifier = Modifier.weight(1f, fill = false))
if (tag != null) Text(
tag, fontSize = 10.sp, fontWeight = FontWeight.SemiBold, color = pal.signal, maxLines = 1,
modifier = Modifier.clip(RoundedCornerShape(6.dp)).background(pal.signal.copy(alpha = 0.14f))
.padding(horizontal = 6.dp, vertical = 2.dp),
)
}
if (!open && !summary.isNullOrEmpty()) Text(
summary, fontSize = 12.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis,
modifier = Modifier.padding(top = 2.dp),
)
}
Icon(Icons.Outlined.ExpandMore, contentDescription = null, tint = colors.onSurfaceVariant,
modifier = Modifier.size(22.dp).rotate(rotation))
}
AnimatedVisibility(open, enter = expandVertically(Motion.tw(200)) + fadeIn(Motion.tw(160)),
exit = shrinkVertically(Motion.tw(160)) + fadeOut(Motion.tw(120))) {
Column(Modifier.fillMaxWidth()) {
Box(Modifier.fillMaxWidth().height(1.dp).background(pal.line))
// Only top-level groups fold; groups and dialogs opened from inside one draw normally.
CompositionLocalProvider(LocalDrawerSections provides null) { content() }
}
}
}
}
@@ -26,8 +26,7 @@ internal fun DroidDeckHudSettings(host: MenuHost, a: DrawerActions, track: (Stri
fun on(key: String) = cfg[key] == "1"
fun int(key: String, fallback: Int) = cfg[key]?.toIntOrNull() ?: fallback
SettingsGroup(stringResource(R.string.drawer_hud), key = "performance-hud",
detail = stringResource(if (a.hudOn) R.string.widgets_on else R.string.widgets_off)) {
SettingsGroup(stringResource(R.string.drawer_hud)) {
ToggleRow(host, "hud", stringResource(R.string.drawer_hud), null, a.hudOn, chipModifier = track("hud"), onChange = a.onHud)
if (a.hudOn) ToggleRow(
host, "hud-only-during-game", stringResource(R.string.hud_only_during_game),
@@ -63,7 +62,7 @@ internal fun DroidDeckHudSettings(host: MenuHost, a: DrawerActions, track: (Stri
if (a.dashboardAvailable && a.secondScreenDisplays.isNotEmpty()) BottomStripSettings(host, track)
if (!a.hudOn) return
SettingsGroup(stringResource(R.string.hud_group_look), key = "performance-hud-look") {
SettingsGroup(stringResource(R.string.hud_group_look)) {
SliderRow(stringResource(R.string.hud_scale), null, int("hudScale", 100), 50..150, step = 5, format = { "$it%" },
modifier = track("hud-scale")) { a.onHudSetting("hudScale", it.toString()) }
SliderRow(stringResource(R.string.drawer_hud_opacity), null, int("hudOpacity", 80), 0..100, step = 5, format = { "$it%" },
@@ -86,7 +85,7 @@ internal fun DroidDeckHudSettings(host: MenuHost, a: DrawerActions, track: (Stri
}
var editing by remember { mutableStateOf(false) }
SettingsGroup(stringResource(R.string.hud_group_metrics), key = "performance-hud-metrics") {
SettingsGroup(stringResource(R.string.hud_group_metrics)) {
ActionRow(stringResource(R.string.hud_group_metrics), null, stringResource(R.string.common_edit),
onClick = { editing = true }, modifier = track("hud-readings"))
val rows = DroidDeckHudSize.rowsFor(DroidDeckHudSize.from(cfg["hudSize"]), cfg)
@@ -104,7 +103,7 @@ internal fun DroidDeckHudSettings(host: MenuHost, a: DrawerActions, track: (Stri
)
}
if (on("showTemp") || on("showGpuTemp") || on("showBatteryTemp")) SettingsGroup(stringResource(R.string.hud_group_temps), key = "performance-hud-temps") {
if (on("showTemp") || on("showGpuTemp") || on("showBatteryTemp")) SettingsGroup(stringResource(R.string.hud_group_temps)) {
ChoiceRow(host, "hud-temp-unit", stringResource(R.string.hud_temp_unit), null,
listOf("c" to "°C", "f" to "°F"), if (cfg["tempUnit"].equals("f", true)) "f" else "c",
chipModifier = track("hud-temp-unit")) { a.onHudSetting("tempUnit", it) }
@@ -130,7 +129,7 @@ internal fun DroidDeckHudSettings(host: MenuHost, a: DrawerActions, track: (Stri
}
}
SettingsGroup(stringResource(R.string.hud_group_more), key = "performance-hud-more") {
SettingsGroup(stringResource(R.string.hud_group_more)) {
ActionRow(stringResource(R.string.hud_export), stringResource(R.string.hud_export_hint),
stringResource(R.string.hud_export_button), onClick = a.onHudExport, modifier = track("hud-export"))
ActionRow(stringResource(R.string.hud_reset), null, stringResource(R.string.hud_reset_button),
@@ -146,7 +145,7 @@ private fun BottomStripSettings(host: MenuHost, track: (String) -> Modifier) {
var hudOn by remember { mutableStateOf(SessionPrefs.bottomHud(context)) }
var onTabs by remember { mutableStateOf(SessionPrefs.bottomStripOnTabs(context)) }
var shown by remember { mutableStateOf(SessionPrefs.bottomStripMetrics(context)) }
SettingsGroup(stringResource(R.string.bottom_hud_group), key = "performance-bottom-hud") {
SettingsGroup(stringResource(R.string.bottom_hud_group)) {
ToggleRow(host, "bottom-hud", stringResource(R.string.bottom_hud_group), null, hudOn,
chipModifier = track("bottom-hud")) { on ->
hudOn = on
@@ -1,171 +1,52 @@
package com.droiddeck.launcher.ui
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.droiddeck.launcher.R
import com.droiddeck.launcher.gpu.FrameGen
import com.droiddeck.launcher.gpu.Lossless
@Composable
internal fun FrameGenMenu(
mode: FrameGen.Mode,
lossless: Lossless.State,
host: MenuHost, mode: FrameGen.Mode, lossless: Lossless.State,
onPick: (FrameGen.Mode) -> Unit,
onImportLossless: () -> Unit,
gameProfileId: String? = null,
hasGameOverride: Boolean = false,
onResetGame: () -> Unit = {},
focusModifier: Modifier = Modifier,
legacyButtons: Boolean = false,
) {
val need = when {
lossless.ready -> null
lossless.owned -> stringResource(R.string.lsfg_needs_install)
else -> stringResource(R.string.lsfg_needs_steam)
}
val selectedEngine = mode.engine.takeIf { it != FrameGen.ENGINE_OFF }
val offLabel = FrameGen.label(LocalContext.current, FrameGen.Mode.OFF)
val colors = MaterialTheme.colorScheme
val engines = listOf(FrameGen.ENGINE_LSFG to "LSFG", FrameGen.ENGINE_DDFG to "DDFG")
Column(Modifier.fillMaxWidth().padding(start = 10.dp, end = 10.dp, top = 0.dp, bottom = 8.dp)) {
if (!legacyButtons) OutlinedButton(
onClick = { onPick(FrameGen.Mode.OFF.copy(multiplier = mode.multiplier)) },
modifier = Modifier.fillMaxWidth().controllerConfirm(
onClick = { onPick(FrameGen.Mode.OFF.copy(multiplier = mode.multiplier)) },
),
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 8.dp),
colors = ButtonDefaults.outlinedButtonColors(
containerColor = if (selectedEngine == null) colors.primary.copy(alpha = 0.16f) else colors.surface,
contentColor = if (selectedEngine == null) colors.primary else colors.onSurface,
),
) { Text(offLabel) }
Row(Modifier.fillMaxWidth().then(if (legacyButtons) Modifier else Modifier.padding(top = 8.dp)), horizontalArrangement = Arrangement.spacedBy(8.dp)) {
val focusIndex = engines.indexOfFirst { (engine, _) ->
selectedEngine == engine || engine != FrameGen.ENGINE_LSFG || lossless.ready
}
engines.forEachIndexed { index, (engine, label) ->
val selected = selectedEngine == engine
val enabled = selected || engine != FrameGen.ENGINE_LSFG || lossless.ready
val pick = {
onPick(if (selected) FrameGen.Mode.OFF.copy(multiplier = mode.multiplier) else FrameGen.Mode(engine, mode.multiplier.coerceIn(2, 4)))
}
OutlinedButton(
onClick = pick,
enabled = enabled,
modifier = (if (index == focusIndex) focusModifier else Modifier)
.weight(1f).controllerConfirm(enabled = enabled, onClick = pick),
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 8.dp),
colors = ButtonDefaults.outlinedButtonColors(
containerColor = if (selected) colors.primary.copy(alpha = 0.16f) else colors.surface,
contentColor = if (selected) colors.primary else colors.onSurface,
),
) { Text(label) }
}
val context = LocalContext.current
AnchoredMenu(host.open == "fg", onDismiss = { if (host.open == "fg") host.open = null }, title = stringResource(R.string.frame_gen_title)) { firstItemFocus ->
val need = when {
lossless.ready -> null
lossless.owned -> stringResource(R.string.lsfg_needs_install)
else -> stringResource(R.string.lsfg_needs_steam)
}
if (selectedEngine != null) {
val multiplierEnabled = mode.engine != FrameGen.ENGINE_LSFG || lossless.ready
Row(
Modifier.fillMaxWidth().padding(top = 8.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
(2..4).forEach { multiplier ->
val selected = mode.multiplier == multiplier && mode.target == 0
val pickMultiplier = {
onPick(mode.copy(multiplier = multiplier, target = 0))
}
OutlinedButton(
onClick = pickMultiplier,
enabled = multiplierEnabled,
modifier = Modifier.weight(1f).controllerConfirm(
enabled = multiplierEnabled,
onClick = pickMultiplier,
),
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 8.dp),
colors = ButtonDefaults.outlinedButtonColors(
containerColor = if (selected) colors.secondary.copy(alpha = 0.18f) else colors.surface,
contentColor = if (selected) colors.secondary else colors.onSurface,
),
) { Text("${multiplier}×") }
}
@Composable
fun item(m: FrameGen.Mode, enabled: Boolean = true, detail: String? = null, focus: FocusRequester? = null) =
MenuItem(FrameGen.label(context, m), checked = mode == m, enabled = enabled, detail = detail, focusRequester = focus) {
onPick(m); host.open = null
}
}
if (selectedEngine == FrameGen.ENGINE_LSFG) {
Row(
Modifier.fillMaxWidth().padding(top = 8.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
FrameGen.ADAPTIVE_TARGETS.forEach { target ->
val adaptiveMode = FrameGen.Mode(FrameGen.ENGINE_LSFG, target = target)
val selected = mode.target == target
val pickTarget = { onPick(adaptiveMode) }
OutlinedButton(
onClick = pickTarget,
enabled = lossless.ready,
modifier = Modifier.weight(1f).controllerConfirm(
enabled = lossless.ready,
onClick = pickTarget,
),
contentPadding = PaddingValues(horizontal = 8.dp, vertical = 8.dp),
colors = ButtonDefaults.outlinedButtonColors(
containerColor = if (selected) colors.secondary.copy(alpha = 0.18f) else colors.surface,
contentColor = if (selected) colors.secondary else colors.onSurface,
),
) {
Text(FrameGen.label(LocalContext.current, adaptiveMode))
}
}
}
}
if (selectedEngine == FrameGen.ENGINE_LSFG && !lossless.ready) {
Text(need.orEmpty(), color = colors.onSurfaceVariant,
style = MaterialTheme.typography.bodySmall,
modifier = Modifier.padding(top = 6.dp))
}
item(FrameGen.Mode.OFF, focus = firstItemFocus)
if (gameProfileId != null) {
val resetGame = onResetGame
OutlinedButton(
onClick = resetGame,
modifier = Modifier.fillMaxWidth().padding(top = 8.dp)
.controllerConfirm(onClick = resetGame),
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 8.dp),
) {
Text(stringResource(R.string.comp_game_use_general) + if (hasGameOverride) "" else " ✓")
MenuItem(stringResource(R.string.comp_game_use_general), checked = !hasGameOverride) {
onResetGame()
host.open = null
}
}
for (m in 2..4) item(FrameGen.Mode(FrameGen.ENGINE_DDFG, m))
val lsfg = (2..4).map { FrameGen.Mode(FrameGen.ENGINE_LSFG, it) } +
FrameGen.ADAPTIVE_TARGETS.map { FrameGen.Mode(FrameGen.ENGINE_LSFG, target = it) }
lsfg.forEachIndexed { i, m -> item(m, enabled = lossless.ready, detail = need.takeIf { i == 0 }) }
if (lossless.owned) {
val using = when (lossless.source) {
Lossless.Source.STEAM -> stringResource(R.string.lsfg_using_steam)
Lossless.Source.IMPORT -> stringResource(R.string.lsfg_using_import)
Lossless.Source.NONE -> null
}
OutlinedButton(
onClick = onImportLossless,
modifier = Modifier.fillMaxWidth().padding(top = 8.dp)
.controllerConfirm(onClick = onImportLossless),
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 8.dp),
) {
Text(stringResource(R.string.lsfg_import) + (using?.let { " · $it" } ?: ""))
}
MenuItem(stringResource(R.string.lsfg_import), checked = false, detail = using) { host.open = null; onImportLossless() }
}
}
}
@@ -177,12 +177,6 @@ class FrontEndState(
val launcherOrientation: Int = android.content.pm.ActivityInfo.SCREEN_ORIENTATION_USER,
val homePage: String = com.droiddeck.launcher.core.AppUiPrefs.HOME_PAGE_STEAM,
val launcherFullscreen: Boolean = true,
val launcherFrost: Boolean = false,
val frostWallpaper: Boolean = true,
val frostCards: Boolean = true,
val frostTransparency: Int = FROST_WALLPAPER_DEFAULT,
val frostCardTransparency: Int = FROST_DEFAULT,
val frostSupported: Boolean = false,
val controllerHaptics: Boolean = true,
val downloadSource: String = DownloadSource.MODE_AUTO,
val downloadMirror: String = "",
@@ -290,11 +284,6 @@ class FrontEndActions(
val onLauncherOrientation: (Int) -> Unit = {},
val onHomePage: (String) -> Unit = {},
val onLauncherFullscreen: (Boolean) -> Unit = {},
val onLauncherFrost: (Boolean) -> Unit = {},
val onFrostWallpaper: (Boolean) -> Unit = {},
val onFrostCards: (Boolean) -> Unit = {},
val onFrostTransparency: (Int) -> Unit = {},
val onFrostCardTransparency: (Int) -> Unit = {},
val onControllerHaptics: (Boolean) -> Unit = {},
val onAnimationsEnabled: (Boolean) -> Unit = {},
val onLowStorageWarning: (Boolean) -> Unit = {},
@@ -704,7 +693,7 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com
}
}
androidx.compose.foundation.layout.BoxWithConstraints(
modifier = Modifier.fillMaxSize().background(if (LocalFrost.current != null) Color.Transparent else colors.background)
modifier = Modifier.fillMaxSize().background(colors.background)
.windowInsetsPadding(if (s.launcherFullscreen) WindowInsets.displayCutout else WindowInsets.systemBars)
.onFocusChanged { anyFocused = it.hasFocus },
) {
@@ -1,9 +1,6 @@
package com.droiddeck.launcher.ui
import androidx.compose.ui.platform.LocalContext
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleEventObserver
import androidx.compose.ui.platform.LocalLifecycleOwner
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.focus.FocusRequester
import android.os.Build
@@ -53,7 +50,6 @@ import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
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
@@ -156,20 +152,6 @@ internal fun SetupPanel(
) {
val host = rememberMenuHost()
val ctx = LocalContext.current
val frostRow = s.frostSupported && s.theme != Themes.TRUE_BLACK
var steamOrientation by remember { mutableStateOf(SessionPrefs.orientation(ctx, "steam")) }
var desktopOrientation by remember { mutableStateOf(SessionPrefs.orientation(ctx, "desktop")) }
val lifecycleOwner = LocalLifecycleOwner.current
DisposableEffect(lifecycleOwner, ctx) {
val observer = LifecycleEventObserver { _, event ->
if (event == Lifecycle.Event.ON_RESUME) {
steamOrientation = SessionPrefs.orientation(ctx, "steam")
desktopOrientation = SessionPrefs.orientation(ctx, "desktop")
}
}
lifecycleOwner.lifecycle.addObserver(observer)
onDispose { lifecycleOwner.lifecycle.removeObserver(observer) }
}
var hideHomeFromRecents by remember { mutableStateOf(com.droiddeck.launcher.core.AppUiPrefs.hideHomeFromRecents(ctx)) }
var processLimitBusy by remember { mutableStateOf(false) }
var processLimitMessage by remember { mutableStateOf<String?>(null) }
@@ -269,7 +251,7 @@ internal fun SetupPanel(
val listing = searching && query.isNotBlank()
val fixed = tab == CONTROLLER_TAB && !listing
Column(modifier = Modifier.weight(1f).fillMaxWidth().then(if (fixed) Modifier else Modifier.verticalScroll(rememberScrollState())).padding(bottom = if (fixed) 0.dp else 24.dp)) {
if (listing) SettingsSearchResults(query, frostRow) { section -> pick(section.ordinal) }
if (listing) SettingsSearchResults(query) { section -> pick(section.ordinal) }
else when (tab) {
OVERVIEW_TAB -> {
OnboardingCard(limitBlocks, a.onShowPhantomGate)
@@ -416,8 +398,7 @@ internal fun SetupPanel(
listOfNotNull(
gpu.displayName(ctx),
s.installed?.let { stringResource(R.string.setup_ready_runtime, it) },
stringResource(R.string.setup_ready_limit_off)
.takeIf { !limitBlocks && s.phantomProcessStatus != PhantomProcessStatus.UNCOUNTED },
stringResource(R.string.setup_ready_limit_off).takeIf { !limitBlocks },
s.offlineAccount?.takeIf { it.isNotEmpty() }?.let { stringResource(R.string.setup_ready_signed_in, it) },
).joinToString(" · "),
open = showChecks, onDetails = { showChecks = !showChecks },
@@ -466,35 +447,6 @@ internal fun SetupPanel(
if (s.theme == Themes.GRADIENT) GradientColorRows()
if (s.theme == Themes.CUSTOM) CustomColorRows()
if (s.theme == Themes.TRUE_BLACK) HighlightColorRow()
if (frostRow) {
ToggleRow(
host, "launcher-frost", stringResource(R.string.setup_frosted_background),
stringResource(R.string.setup_frosted_background_hint), s.launcherFrost, onChange = a.onLauncherFrost,
)
if (s.launcherFrost) {
val ctx = androidx.compose.ui.platform.LocalContext.current
val percent: (Int) -> String = { ctx.getString(R.string.ctrl_percent, it) }
ToggleRow(
host, "launcher-frost-wallpaper", stringResource(R.string.setup_frosted_wallpaper), null,
s.frostWallpaper, onChange = a.onFrostWallpaper,
)
SliderRow(
stringResource(R.string.setup_frost_transparency), stringResource(R.string.setup_frost_transparency_hint),
s.frostTransparency, 0..FROST_MAX, step = FROST_STEP, enabled = s.frostWallpaper, format = percent,
onChange = a.onFrostTransparency,
)
ToggleRow(
host, "launcher-frost-cards", stringResource(R.string.setup_frosted_cards),
stringResource(if (s.frostWallpaper) R.string.setup_frosted_cards_hint else R.string.setup_frosted_cards_needs_wallpaper),
s.frostCards, enabled = s.frostWallpaper, onChange = a.onFrostCards,
)
SliderRow(
stringResource(R.string.setup_frost_card_transparency), stringResource(R.string.setup_frost_card_transparency_hint),
s.frostCardTransparency, 0..FROST_MAX, step = FROST_STEP, enabled = s.frostWallpaper && s.frostCards, format = percent,
onChange = a.onFrostCardTransparency,
)
}
}
ChoiceRow(
host, "app-scale", stringResource(R.string.setup_app_scale), stringResource(R.string.setup_app_scale_hint),
com.droiddeck.launcher.core.AppUiPrefs.scales.map { percent ->
@@ -564,27 +516,7 @@ internal fun SetupPanel(
ChoiceRow(
host, "orientation", stringResource(R.string.setup_session_orientation), stringResource(R.string.setup_session_orientation_hint),
SessionPrefs.orientationOptions.map { (value, label) -> value to stringResource(label) },
s.orientation, onPick = { value ->
a.onOrientation(value)
steamOrientation = SessionPrefs.orientation(ctx, "steam")
desktopOrientation = SessionPrefs.orientation(ctx, "desktop")
},
)
ChoiceRow(
host, "orientation-steam", stringResource(R.string.setup_session_orientation) + " (Steam)", stringResource(R.string.setup_session_orientation_hint),
SessionPrefs.orientationOptions.map { (value, label) -> value to stringResource(label) },
steamOrientation, onPick = { value ->
steamOrientation = value
SessionPrefs.setOrientation(ctx, "steam", value)
},
)
ChoiceRow(
host, "orientation-desktop", stringResource(R.string.setup_session_orientation) + " (Desktop)", stringResource(R.string.setup_session_orientation_hint),
SessionPrefs.orientationOptions.map { (value, label) -> value to stringResource(label) },
desktopOrientation, onPick = { value ->
desktopOrientation = value
SessionPrefs.setOrientation(ctx, "desktop", value)
},
s.orientation, onPick = a.onOrientation,
)
ToggleRow(
host, "launcher-fullscreen", stringResource(R.string.setup_fullscreen),
@@ -860,7 +792,7 @@ internal fun ReadinessCard(
@Composable
private fun FrameGenMenu(s: FrontEndState, a: FrontEndActions, host: MenuHost) {
FrameGenMenu(s.frameGen, s.lossless, a.onFrameGenPick, a.onImportLossless, legacyButtons = true)
FrameGenMenu(host, s.frameGen, s.lossless, a.onFrameGenPick, a.onImportLossless)
}
@Composable
@@ -908,7 +840,8 @@ internal fun LaunchSettings(s: FrontEndState, a: FrontEndActions, host: MenuHost
) {
host.open = if (host.open == "fg") null else "fg"
}
if (host.open == "fg") FrameGenMenu(
FrameGenMenu(
host = host,
mode = if (frameGenProfileKey != null) gameFrameGenMode else s.frameGen,
lossless = s.lossless,
onPick = { mode ->
@@ -922,7 +855,6 @@ internal fun LaunchSettings(s: FrontEndState, a: FrontEndActions, host: MenuHost
}
},
onImportLossless = a.onImportLossless,
legacyButtons = true,
gameProfileId = frameGenProfileKey,
hasGameOverride = gameFrameGenOverride,
onResetGame = {
@@ -23,9 +23,6 @@ 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.DisposableEffect
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.draw.clip
@@ -34,7 +31,6 @@ import androidx.compose.ui.semantics.Role
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.sp
import androidx.compose.runtime.getValue
import com.droiddeck.launcher.session.SessionPrefs
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
@@ -71,21 +67,6 @@ internal val GlassesIcon: ImageVector by lazy {
}.build()
}
@Composable
internal fun rememberShowGlassesShortcut(): Boolean {
val context = LocalContext.current
var show by remember(context) { mutableStateOf(SessionPrefs.showGlassesShortcut(context)) }
DisposableEffect(context) {
val preferences = context.getSharedPreferences("session", android.content.Context.MODE_PRIVATE)
val listener = android.content.SharedPreferences.OnSharedPreferenceChangeListener { _, key ->
if (key == "showGlassesShortcut") show = SessionPrefs.showGlassesShortcut(context)
}
preferences.registerOnSharedPreferenceChangeListener(listener)
onDispose { preferences.unregisterOnSharedPreferenceChangeListener(listener) }
}
return show
}
@Composable
internal fun rememberGlasses(): Pair<GlassesState, GlassesSettings> {
val g by Glasses.state.collectAsState()
@@ -107,7 +88,7 @@ internal fun VrControllerGroups(host: MenuHost, track: (String) -> Modifier = {
androidx.compose.runtime.LaunchedEffect(Unit) { com.droiddeck.launcher.input.VrControllers.load(context) }
val c by com.droiddeck.launcher.input.VrControllers.settings.collectAsState()
val emulate = com.droiddeck.launcher.input.VrControllers.Emulate.entries
SettingsGroup(stringResource(R.string.vr_controllers_group), key = "vr-controllers") {
SettingsGroup(stringResource(R.string.vr_controllers_group)) {
ChoiceRow(host, "vr-emulate", stringResource(R.string.vr_controllers_emulate), stringResource(R.string.vr_controllers_emulate_hint),
emulate.map { it to stringResource(when (it) {
com.droiddeck.launcher.input.VrControllers.Emulate.OFF -> R.string.vr_controllers_off
@@ -152,7 +133,6 @@ internal fun GlassesGroups(
) {
val display = tab == null || tab == GlassesTab.DISPLAY
val vr = tab == null || tab == GlassesTab.VR
val showShortcut = rememberShowGlassesShortcut()
val picture = GlassesRendering.picture(s, g.sbs, steamVrRunning)
val usesGlasses = GlassesRendering.usesGlasses(g, outputActive, steamVrRunning)
val spatialTracking = g.spatialConnected && s.positionalTracking
@@ -162,13 +142,13 @@ internal fun GlassesGroups(
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, key = "vr-glasses-quick") {
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, key = "vr-glasses") {
if (display) SettingsGroup(g.model) {
if (g.experimental) SettingsRow(stringResource(R.string.glasses_control), stringResource(
if (g.supportsDisplayModeControl) R.string.glasses_xreal_experimental else R.string.glasses_pro2_experimental)) {}
val status = if (g.hasDisplay) stringResource(R.string.glasses_status, g.width, g.height, kotlin.math.round(g.hz).toInt(),
@@ -188,15 +168,9 @@ internal fun GlassesGroups(
}
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 (inSession) {
val context = androidx.compose.ui.platform.LocalContext.current
ToggleRow(host, "glasses-shortcut", stringResource(R.string.glasses_show_shortcut),
stringResource(R.string.glasses_show_shortcut_hint), showShortcut,
chipModifier = track("glasses-shortcut")) { SessionPrefs.setShowGlassesShortcut(context, it) }
}
}
if (display && g.canControl && g.supportsDisplayModeControl && (inSession || g.sbs || g.sbsSupport == GlassesState.SBS_FAILS)) {
SettingsGroup(stringResource(R.string.glasses_display_mode), key = "vr-glasses-mode") {
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) })
@@ -208,12 +182,12 @@ internal fun GlassesGroups(
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), key = "vr-glasses-output-${profile.name.lowercase()}") {
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), key = "vr-glasses-picture") {
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),
@@ -239,7 +213,7 @@ internal fun GlassesGroups(
format = { SpatialMeasurements.distance(it / 10f) }, modifier = track("glasses-distance")) { Glasses.setScreenDistanceDm(it) }
}
}
if (vr && (g.canControl || g.hasDisplay)) SettingsGroup(stringResource(R.string.cardboard_steamvr), key = "vr-glasses-steamvr") {
if (vr && (g.canControl || g.hasDisplay)) SettingsGroup(stringResource(R.string.cardboard_steamvr)) {
steamVr()
if (g.supportsDisplayModeControl) ToggleRow(host, "glasses-auto3d", stringResource(R.string.glasses_auto3d),
stringResource(R.string.glasses_auto3d_hint), s.auto3d, chipModifier = track("glasses-auto3d")) { Glasses.setAuto3d(it) }
@@ -252,7 +226,7 @@ internal fun GlassesGroups(
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), key = "vr-glasses-tracking") {
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
@@ -266,13 +240,13 @@ internal fun GlassesGroups(
chipModifier = track("glasses-tracking")) { Glasses.setHeadTracking(it) }
}
val calibration by Glasses.calibration.collectAsState()
if (calibration.supported) SettingsGroup(stringResource(R.string.glasses_calibration), key = "vr-glasses-calibration") {
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), key = "vr-glasses-hardware") {
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,
@@ -285,7 +259,7 @@ internal fun GlassesGroups(
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), key = "vr-glasses-experimental") {
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) }
@@ -308,7 +282,7 @@ internal fun GlassesGroups(
s.joyConTracking, enabled = s.positionalTracking, chipModifier = track("glasses-joycons")) { Glasses.setJoyConTracking(it) }
}
}
if (hands.usable) SettingsGroup(stringResource(R.string.phone_camera_tracking_group), key = "vr-hand-camera") {
if (hands.usable) SettingsGroup(stringResource(R.string.phone_camera_tracking_group)) {
HandCameraRows(host, track, inSession)
}
}
@@ -21,20 +21,12 @@ internal fun GlassesSetupPanel() {
val (glasses, settings) = rememberGlasses()
val host = rememberMenuHost()
val tabs = glassesTabs(glasses)
val context = androidx.compose.ui.platform.LocalContext.current
val showShortcut = rememberShowGlassesShortcut()
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))
SettingsGroup(stringResource(R.string.glasses_shortcut_group), key = "glasses-shortcut") {
ToggleRow(host, "glasses-shortcut", stringResource(R.string.glasses_show_shortcut),
stringResource(R.string.glasses_show_shortcut_hint), showShortcut) {
com.droiddeck.launcher.session.SessionPrefs.setShowGlassesShortcut(context, it)
}
}
if (!glasses.present && !glasses.hasDisplay && !glasses.canControl) {
Note(stringResource(R.string.setup_glasses_connect))
} else {
@@ -76,7 +76,7 @@ internal fun WindowDialog(
content: @Composable () -> Unit,
) {
if (!LocalPresentationWindow.current) {
Dialog(onDismissRequest, properties) { SolidSurfaces(content) }
Dialog(onDismissRequest, properties, content)
return
}
Popup(
@@ -87,7 +87,7 @@ internal fun WindowDialog(
Modifier.fillMaxSize().background(androidx.compose.ui.graphics.Color.Black.copy(alpha = 0.6f))
.tapOutside { if (properties.dismissOnClickOutside) onDismissRequest() },
contentAlignment = Alignment.Center,
) { SolidSurfaces(content) }
) { content() }
}
}
@@ -150,7 +150,7 @@ internal fun GlidePopup(
) {
Popup(popupPositionProvider, onDismissRequest, properties) {
if (properties.focusable) TrackKeyWindow()
SolidSurfaces { FocusGlideHost(content = content) }
FocusGlideHost(content = content)
}
}
@@ -44,7 +44,6 @@ import com.droiddeck.launcher.session.SessionPrefs
import kotlin.math.abs
import kotlin.math.atan2
import kotlin.math.hypot
import kotlin.math.max
import kotlin.math.min
@SuppressLint("ViewConstructor")
@@ -64,7 +63,6 @@ class InputSurfaceView(
private val art by lazy(LazyThreadSafetyMode.NONE) { PadArt(context) }
private var artworkDpad = emptyList<HoldButton>()
private val artworkDpadBounds = RectF()
private var crossDpads = emptyList<Pair<List<HoldButton>, RectF>>()
private var requestedLayout = customLayout
init { customLayout = surfaceStyle.shown(customLayout); addView(content, LayoutParams(-1, -1)); renderCustom(pad) }
@@ -187,7 +185,6 @@ class InputSurfaceView(
private fun renderCustom(pad: PadBridge?) {
artworkDpad = emptyList()
crossDpads = emptyList()
val canvas = object : ViewGroup(context) {
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
val layout = customLayout
@@ -206,7 +203,6 @@ class InputSurfaceView(
child.layout(x, y, x + child.measuredWidth, y + child.measuredHeight)
}
updateArtworkDpad(this)
updateCrossDpad(this)
}
override fun dispatchDraw(canvas: Canvas) {
@@ -248,39 +244,11 @@ class InputSurfaceView(
canvas.getChildAt(index) as? HoldButton
}
val previous = artworkDpad
artworkDpad = if (crossed(buttons, artworkDpadBounds)) buttons else emptyList()
artworkDpad = if (crossed(buttons)) buttons else emptyList()
if (artworkDpad != previous) (previous + artworkDpad).forEach { it.invalidate() }
}
private fun updateCrossDpad(canvas: ViewGroup) {
val buttons = (0 until canvas.childCount).map(canvas::getChildAt).filterIsInstance<HoldButton>()
val (ups, rights, downs, lefts) = DIRECTIONS.map { direction -> buttons.filter { (it.tag as? InputSurfaceElement)?.control == direction } }
crossDpads = ups.flatMap { up -> rights.flatMap { right -> downs.flatMap { down ->
lefts.mapNotNull { left -> listOf(up, right, down, left).let { arms -> hole(arms)?.let { arms to it } } } } } }
}
private fun hole(buttons: List<HoldButton>): RectF? {
val (up, right, down, left) = buttons
val hole = RectF(left.right.toFloat(), up.bottom.toFloat(), right.left.toFloat(), down.top.toFloat())
val across = max(up.left, down.left) to min(up.right, down.right)
val along = max(left.top, right.top) to min(left.bottom, right.bottom)
return hole.takeIf {
!it.isEmpty && across.first < across.second && along.first < along.second &&
across.first < it.right && across.second > it.left && along.first < it.bottom && along.second > it.top
}
}
private fun crossTarget(x: Float, y: Float): HoldButton? {
val first = crossDpads.firstOrNull()?.first?.first() ?: return null
val hx = x - (originX(first) - first.left)
val hy = y - (originY(first) - first.top)
return crossDpads.filter { (arms, hole) -> arms.all { it.visibility == VISIBLE } && hole.contains(hx, hy) }
.flatMap { it.first }.distinct().minByOrNull { arm ->
hypot(max(max(arm.left - hx, hx - arm.right), 0f), max(max(arm.top - hy, hy - arm.bottom), 0f))
}
}
private fun crossed(buttons: List<HoldButton>, bounds: RectF): Boolean {
private fun crossed(buttons: List<HoldButton>): Boolean {
if (buttons.size != DIRECTIONS.size) return false
val (up, right, down, left) = buttons
val centerX = (left.left + right.right) / 2f
@@ -290,7 +258,7 @@ class InputSurfaceView(
kotlin.math.abs((left.top + left.bottom) / 2f - centerY) > 2f ||
kotlin.math.abs((right.top + right.bottom) / 2f - centerY) > 2f ||
up.bottom >= down.top || left.right >= right.left) return false
bounds.set(left.left.toFloat(), up.top.toFloat(), right.right.toFloat(), down.bottom.toFloat())
artworkDpadBounds.set(left.left.toFloat(), up.top.toFloat(), right.right.toFloat(), down.bottom.toFloat())
return true
}
@@ -316,7 +284,6 @@ class InputSurfaceView(
val views = (canvas.childCount - 1 downTo 0).map(canvas::getChildAt).filter { it.visibility == VISIBLE }
views.firstOrNull { !(it is StickView && it.adaptive) && hits(it, x, y, 0f) }?.let { return it }
views.filter { it is HoldButton && hits(it, x, y, slack(it)) }.minByOrNull { distance(it, x, y) }?.let { return it }
crossTarget(x, y)?.let { return it }
if (views.any { it is HoldButton && hits(it, x, y, slack(it) + ADAPTIVE_CLEARANCE_PX) }) return null
return views.filter { it is StickView && it.adaptive && it !in owners.values && (hits(it, x, y, 0f) || it.captures(x - originX(it), y - originY(it))) }
.minByOrNull { distance(it, x, y) }
@@ -1,130 +0,0 @@
package com.droiddeck.launcher.ui
import android.app.Activity
import android.graphics.drawable.ColorDrawable
import android.os.Build
import android.os.PowerManager
import android.view.WindowManager
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.compositeOver
import androidx.compose.ui.graphics.lerp
import androidx.compose.ui.graphics.luminance
import java.util.function.Consumer
internal val LocalFrost = staticCompositionLocalOf<Color?> { null }
internal const val FROST_MAX = 100
internal const val FROST_STEP = 10
internal const val FROST_DEFAULT = 50
internal const val FROST_WALLPAPER_DEFAULT = 80
private const val FROST_TEXT_LIFT = 0.5f
private const val FROST_LIFT_STEPS = 5
private const val FROST_TINT_MAX = 0.9f
private const val FROST_SEARCH_STEPS = 12
private const val FROST_BLUR_DP = 28
private class FrostScale(val solid: Float, val default: Float, val clear: Float) {
fun at(percent: Int): Float {
val t = percent.coerceIn(0, FROST_MAX) / FROST_DEFAULT.toFloat()
return if (t <= 1f) solid + (default - solid) * t else default + (clear - default) * (t - 1f)
}
}
private val TINT_DARK = FrostScale(0.9f, 0.58f, 0.32f)
private val TINT_LIGHT = FrostScale(0.94f, 0.7f, 0.48f)
private val CARD_DARK = FrostScale(1f, 0.6f, 0.3f)
private val CARD_LIGHT = FrostScale(1f, 0.74f, 0.45f)
private val TEXT_LIFT_MAX = FrostScale(FROST_TEXT_LIFT, FROST_TEXT_LIFT, 1f)
class FrostChoice(
val transparency: Int = FROST_WALLPAPER_DEFAULT,
val cards: Boolean = false,
val cardTransparency: Int = FROST_DEFAULT,
)
internal class FrostLook(val veil: Color, val lift: Float, val cardAlpha: Float)
internal fun frostLook(palette: Palette, choice: FrostChoice): FrostLook {
val light = palette.background.luminance() > 0.5f
val cardAlpha = if (!choice.cards) 1f else (if (light) CARD_LIGHT else CARD_DARK).at(choice.cardTransparency)
val maxLift = maxOf(TEXT_LIFT_MAX.at(choice.transparency), if (choice.cards) TEXT_LIFT_MAX.at(choice.cardTransparency) else 0f)
// Android reports only the wallpaper's main colours, and any part of it can sit behind text.
fun readable(alpha: Float, lift: Float): Boolean = listOf(Color.Black, Color.White).all { behind ->
val page = palette.background.copy(alpha = alpha).compositeOver(behind)
val card = palette.surface.copy(alpha = cardAlpha).compositeOver(page)
val hint = lerp(palette.onSurfaceVariant, palette.onBackground, lift)
minOf(ThemeColors.contrast(hint, page), ThemeColors.contrast(hint, card)) >= ThemeColors.MIN_CONTRAST
}
var low = 0f
var high = FROST_TINT_MAX
if (readable(low, maxLift)) high = low
else if (!readable(high, maxLift)) high = 1f
else repeat(FROST_SEARCH_STEPS) {
val mid = (low + high) / 2
if (readable(mid, maxLift)) high = mid else low = mid
}
val lifts = (0..FROST_LIFT_STEPS).map { FROST_TEXT_LIFT + (maxLift - FROST_TEXT_LIFT) * it / FROST_LIFT_STEPS }
val tint = maxOf((if (light) TINT_LIGHT else TINT_DARK).at(choice.transparency), kotlin.math.ceil(high * 255f) / 255f)
val alpha = if (lifts.any { readable(tint, it) }) tint else 1f
val lift = lifts.firstOrNull { readable(alpha, it) } ?: maxLift
return FrostLook(palette.background.copy(alpha = alpha), lift, cardAlpha)
}
internal fun Palette.frosted(look: FrostLook): Palette = Palette(
id, label, detail,
background = background,
surface = if (look.cardAlpha < 1f) surface.copy(alpha = look.cardAlpha) else surface,
surfaceVariant = if (look.cardAlpha < 1f) surfaceVariant.copy(alpha = look.cardAlpha) else surfaceVariant,
line = line, line2 = line2,
onBackground = onBackground, onSurfaceVariant = lerp(onSurfaceVariant, onBackground, look.lift),
primary = primary, primary2 = primary2, onPrimary = onPrimary, signal = signal,
good = good, error = error, warning = warning,
)
internal class LauncherFrost(private val activity: Activity) {
var available by mutableStateOf(false)
private set
var prepared = false
private set
private var stopListening: (() -> Unit)? = null
val supported: Boolean
get() = Build.VERSION.SDK_INT >= 31 &&
(available || activity.getSystemService(PowerManager::class.java)?.isPowerSaveMode == true)
fun start() {
if (Build.VERSION.SDK_INT < 31 || stopListening != null) return
val windows = activity.windowManager
val blur = Consumer<Boolean> { available = it }
available = windows.isCrossWindowBlurEnabled
windows.addCrossWindowBlurEnabledListener(blur)
stopListening = { windows.removeCrossWindowBlurEnabledListener(blur) }
}
fun stop() {
stopListening?.invoke()
stopListening = null
}
// A window made see-through after its first frame keeps drawing over its old frames, so this runs before setContent.
fun prepare(on: Boolean) {
prepared = on && Build.VERSION.SDK_INT >= 31
if (prepared) activity.window.setBackgroundDrawable(ColorDrawable(android.graphics.Color.TRANSPARENT))
}
fun show(on: Boolean) {
if (!prepared || Build.VERSION.SDK_INT < 31) return
val window = activity.window
val flags = WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER or WindowManager.LayoutParams.FLAG_BLUR_BEHIND
if (on) window.addFlags(flags) else window.clearFlags(flags)
window.attributes = window.attributes.apply {
blurBehindRadius = if (on) (FROST_BLUR_DP * activity.resources.displayMetrics.density).toInt() else 0
}
}
}
@@ -116,7 +116,10 @@ internal object NavTabs {
fun more(s: FrontEndState) = listed(s).filter { place(s, it) == TabPlace.MORE }
fun bar(s: FrontEndState): List<String> = listed(s).filter { place(s, it) == TabPlace.BAR } + MORE
fun bar(s: FrontEndState): List<String> {
val shown = listed(s).filter { place(s, it) == TabPlace.BAR }
return if (more(s).isEmpty()) shown else shown + MORE
}
fun setHidden(context: Context, key: String, hide: Boolean) {
hidden = if (hide && hideable(key)) hidden + key else hidden - key
@@ -11,7 +11,7 @@ internal fun PenSettingsGroup(
host: MenuHost, pen: SessionPrefs.Pen, track: (String) -> Modifier = { Modifier },
onPick: (key: String, value: String) -> Unit,
) {
SettingsGroup(stringResource(R.string.mode_pen), key = "controller-pen") {
SettingsGroup(stringResource(R.string.mode_pen)) {
ChoiceRow(host, "pen", stringResource(R.string.mode_pen), null,
listOf(SessionPrefs.PEN_MOUSE to stringResource(R.string.mode_pen_mouse),
SessionPrefs.PEN_TOUCH to stringResource(R.string.mode_pen_touch)),
@@ -49,7 +49,6 @@ fun PerformancePage(
prootNoSeccomp: Boolean,
prootFastPath: Boolean,
nativeUserland: Boolean,
desktopAsUser: Boolean,
cursorComposite: Boolean,
guestHostname: String,
phantomWarning: String?,
@@ -68,7 +67,6 @@ fun PerformancePage(
onProotNoSeccomp: (Boolean) -> Unit,
onProotFastPath: (Boolean) -> Unit,
onNativeUserland: (Boolean) -> Unit,
onDesktopAsUser: (Boolean) -> Unit,
onCursorComposite: (Boolean) -> Unit,
onGuestHostname: (String) -> Unit,
onClientCore: (Int, Boolean) -> Unit,
@@ -196,12 +194,6 @@ fun PerformancePage(
modifier = Modifier.width(220.dp).focusGlide(),
)
}
ToggleRow(
host, "desktopasuser", stringResource(R.string.perf_desktop_as_user),
stringResource(if (nativeUserland) R.string.perf_desktop_as_user_hint else R.string.perf_desktop_as_user_needs_native),
desktopAsUser && nativeUserland, enabled = nativeUserland,
onChange = onDesktopAsUser,
)
}
if (phantomWarning != null) {
Spacer(Modifier.height(16.dp))
@@ -226,7 +218,7 @@ fun PerformancePage(
@Composable
internal fun GpuClockGroup(host: MenuHost, on: Boolean, chipModifier: Modifier = Modifier, onChange: (Boolean) -> Unit) {
SettingsGroup(stringResource(R.string.perf_gpu), key = "performance-gpu") {
SettingsGroup(stringResource(R.string.perf_gpu)) {
ToggleRow(
host, "gpuclock", stringResource(R.string.perf_gpuclock),
null,
@@ -6,19 +6,17 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import com.droiddeck.launcher.session.SessionPrefs
/** HUD holds the Performance page and GAMES the Game page; the names stay because saved page orders use them. */
internal enum class SessionDrawerPage(val firstControl: String) {
CONTROLLER("section-controller-input"),
HUD("section-performance-pacing"),
FRAMEGEN("fg"),
DISPLAY("section-display"),
EFFECTS("section-effects-look"),
GAMES("section-game-profile"),
VR("section-vr-steamvr"),
SESSION("pause"),
MORE("more-edit"),
ACHIEVEMENTS("achievements"),
CONTROLLER("input-profile"),
GLASSES("glasses-game"),
DISPLAY("fg"),
HUD("hud"),
EFFECTS("look"),
GAMES("anisotropy"),
AGENT("agent-input"),
SESSION("suspend"),
MORE("more-edit"),
VR("steamvr"),
}
internal object DrawerPages {
@@ -73,16 +71,16 @@ internal object DrawerPages {
}
internal fun offeredDrawerPages(
hasAchievements: Boolean = false, hasAgent: Boolean = com.droiddeck.launcher.agent.AgentTab.shown,
hasGlasses: Boolean = false, hasAgent: Boolean = com.droiddeck.launcher.agent.AgentTab.shown,
): List<SessionDrawerPage> =
DrawerPages.order.filter {
(hasAchievements || it != SessionDrawerPage.ACHIEVEMENTS) &&
(hasGlasses || it != SessionDrawerPage.GLASSES) &&
(hasAgent || it != SessionDrawerPage.AGENT)
}
internal fun sessionDrawerPages(
hasAchievements: Boolean = false, hasAgent: Boolean = com.droiddeck.launcher.agent.AgentTab.shown,
): List<SessionDrawerPage> = offeredDrawerPages(hasAchievements, hasAgent).filter { it !in DrawerPages.hidden }
hasGlasses: Boolean = false, hasAgent: Boolean = com.droiddeck.launcher.agent.AgentTab.shown,
): List<SessionDrawerPage> = offeredDrawerPages(hasGlasses, hasAgent).filter { it !in DrawerPages.hidden }
/** The pages shown as tabs: everything up to and including the More tab. */
internal fun List<SessionDrawerPage>.strip(): List<SessionDrawerPage> {
File diff suppressed because it is too large. Load diff
@@ -39,7 +39,6 @@ internal class SettingsEntry(
val words: List<String> = emptyList(),
val developer: Boolean = false,
val tab: String? = null,
val frost: Boolean = false,
) {
val within: Int? get() = section?.title ?: tab?.let { railLabelIcon(it).first } ?: group
@@ -90,7 +89,6 @@ internal object SettingsIndex {
s(SettingsSection.PERFORMANCE, R.string.perf_native_userland, "proot"),
s(SettingsSection.PERFORMANCE, R.string.perf_cursor_composite, "mouse", "cursor"),
s(SettingsSection.PERFORMANCE, R.string.perf_hostname, "name"),
s(SettingsSection.PERFORMANCE, R.string.perf_desktop_as_user, "root", "user", "sudo", "fakeroot"),
s(SettingsSection.CONTROLLER, R.string.setup_tab_controller, "gamepad", "buttons", "mapping", "profile", "remap"),
SettingsEntry(SettingsPlace.TAB, R.string.rail_storage, tab = "storage", words = listOf("sd card", "space", "uninstall", "disk")),
@@ -101,10 +99,6 @@ internal object SettingsIndex {
s(SettingsSection.GLASSES, R.string.setup_tab_glasses, "xreal", "viture", "vr", "ar"),
s(SettingsSection.LAUNCHER, R.string.setup_theme, "color", "dark"),
SettingsEntry(
SettingsPlace.SETTINGS, R.string.setup_frosted_background, section = SettingsSection.LAUNCHER, frost = true,
words = listOf("blur", "wallpaper", "background", "cards", "transparent", "transparency", "opacity", "glass"),
),
s(SettingsSection.LAUNCHER, R.string.setup_app_scale, "size", "zoom"),
s(SettingsSection.LAUNCHER, R.string.setup_launcher_icon),
s(SettingsSection.LAUNCHER, R.string.setup_animations),
@@ -156,6 +150,6 @@ internal object SettingsIndex {
sh(R.string.stores_tab_library, R.string.stores_tab_library, "second library", "sd card", "steam library"),
)
fun search(context: Context, query: String, frost: Boolean = false): List<SettingsEntry> =
entries.filter { (!it.developer || DeveloperTools.on) && (!it.frost || frost) && it.matches(context, query) }
fun search(context: Context, query: String): List<SettingsEntry> =
entries.filter { (!it.developer || DeveloperTools.on) && it.matches(context, query) }
}
@@ -96,9 +96,9 @@ internal fun SettingsPillSearch(
}
@Composable
internal fun SettingsSearchResults(query: String, frost: Boolean, onOpen: (SettingsSection) -> Unit) {
internal fun SettingsSearchResults(query: String, onOpen: (SettingsSection) -> Unit) {
val ctx = LocalContext.current
val found = remember(query, frost) { SettingsIndex.search(ctx, query, frost) }
val found = remember(query) { SettingsIndex.search(ctx, query) }
if (found.isEmpty()) {
Note(stringResource(R.string.settings_search_none, query.trim()))
return
@@ -307,7 +307,7 @@ fun AnchoredMenu(
runCatching { firstItemFocus.requestFocus() }
}
}
SolidSurfaces { CompositionLocalProvider(LocalDensity provides density, LocalConfiguration provides configuration) {
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)),
@@ -363,7 +363,7 @@ fun AnchoredMenu(
}
}
}
} }
}
}
}
@@ -443,11 +443,7 @@ fun ValueChip(text: String, open: Boolean, enabled: Boolean = true, modifier: Mo
}
@Composable
fun SettingsGroup(title: String, compact: Boolean = false, detail: String? = null, key: String? = null, tag: String? = null, content: @Composable ColumnScope.() -> Unit) {
LocalDrawerSections.current?.let { sections ->
DrawerSection(sections, key ?: title, title, detail, tag, content)
return
}
fun SettingsGroup(title: String, compact: Boolean = false, detail: String? = null, content: @Composable ColumnScope.() -> Unit) {
val tight = compact || LocalCompactSettings.current
val colors = MaterialTheme.colorScheme
val pal = LocalPalette.current
@@ -466,7 +462,7 @@ fun SettingsGroup(title: String, compact: Boolean = false, detail: String? = nul
}
@Composable
fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hintLines: Int? = null, stacked: Boolean = false, tightControlSpacing: Boolean = false, control: @Composable () -> Unit) {
fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hintLines: Int? = null, stacked: Boolean = false, control: @Composable () -> Unit) {
val compact = LocalCompactSettings.current
val colors = MaterialTheme.colorScheme
val pal = LocalPalette.current
@@ -488,13 +484,13 @@ fun SettingsRow(label: String, hint: String?, highlighted: Boolean = false, hint
} else if (stacked || LocalNarrowPane.current) Column(
modifier = Modifier.fillMaxWidth().background(bg).padding(
horizontal = if (compact) 10.dp else 14.dp,
vertical = if (tightControlSpacing) 2.dp else if (compact) 6.dp else 12.dp),
vertical = if (compact) 6.dp else 12.dp),
) {
Text(label, fontSize = if (compact) 13.sp else 15.sp,
lineHeight = if (compact) 16.sp else androidx.compose.ui.unit.TextUnit.Unspecified,
fontWeight = FontWeight.SemiBold, color = colors.onBackground)
if (hint != null || hintLines != null) hintText(if (compact) 11.sp else 13.sp)
Box(Modifier.padding(top = if (tightControlSpacing) 2.dp else if (compact) 6.dp else 8.dp)) { control() }
Box(Modifier.padding(top = if (compact) 6.dp else 8.dp)) { control() }
} else Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.fillMaxWidth().background(bg).padding(horizontal = 14.dp, vertical = 11.dp),
@@ -13,7 +13,7 @@ internal fun FrameGenGroup(s: FrontEndState, a: FrontEndActions) {
SettingsRow(stringResource(R.string.frame_gen_title), stringResource(R.string.frame_gen_hint), highlighted = host.open == "fg") {
Box {
ValueChip(s.frameGenLabel, host.open == "fg") { host.open = if (host.open == "fg") null else "fg" }
if (host.open == "fg") FrameGenMenu(s.frameGen, s.lossless, a.onFrameGenPick, a.onImportLossless)
FrameGenMenu(host, s.frameGen, s.lossless, a.onFrameGenPick, a.onImportLossless)
}
}
}
@@ -149,6 +149,7 @@ private val OutPull = 6.dp
private val OutBoxCorner = 16.dp
private val OutFillet = 10.dp
@OptIn(ExperimentalComposeUiApi::class)
@Composable
internal fun StepOut(
open: Boolean,
@@ -162,22 +163,6 @@ internal fun StepOut(
items: Int = 4,
handle: @Composable () -> Unit,
content: @Composable StepOutScope.() -> Unit,
) = SolidSurfaces { StepOutPanel(open, pill, preferredSide, accent, onDismiss, onClosed, pillCorner, maxWidth, items, handle, content) }
@OptIn(ExperimentalComposeUiApi::class)
@Composable
private fun StepOutPanel(
open: Boolean,
pill: Rect,
preferredSide: StepSide,
accent: Color,
onDismiss: () -> Unit,
onClosed: () -> Unit,
pillCorner: Dp?,
maxWidth: Dp,
items: Int,
handle: @Composable () -> Unit,
content: @Composable StepOutScope.() -> Unit,
) {
val colors = MaterialTheme.colorScheme
val density = LocalDensity.current
@@ -56,7 +56,6 @@ 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.focus.onFocusChanged
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
@@ -359,67 +358,6 @@ internal fun SessionAchievementsPanel(label: String, state: AchievementsState, t
}
}
/** The Achievements page of the session menu: the same list as the full panel, inside the menu's own scroll. */
@Composable
internal fun DrawerAchievementsPage(game: StoreAchievements.Game, title: String?, track: (String) -> Modifier) {
val colors = MaterialTheme.colorScheme
val pal = LocalPalette.current
val label = StoreAchievements.forSource(game.source)?.label.orEmpty()
val state = rememberAchievements(game) ?: AchievementsState.READING
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
var noteHadFocus by remember { mutableStateOf(false) }
val firstRow = remember { FocusRequester() }
val loaded = !state.list.isNullOrEmpty()
LaunchedEffect(loaded) {
if (loaded && noteHadFocus) {
noteHadFocus = false
withFrameNanos { }
runCatching { firstRow.requestFocus() }
}
}
Column(Modifier.fillMaxWidth().padding(top = 8.dp, start = 4.dp, end = 4.dp)) {
Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth()) {
Text(title.orEmpty(), fontSize = 13.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f))
state.list?.takeIf { it.isNotEmpty() }?.let { list ->
if (state.all) Trophy(18.dp, Modifier.padding(end = 6.dp))
Text(stringResource(R.string.achievements_count_short, state.done, list.size), fontSize = 15.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 = 12.dp).then(track("achievements"))
.onFocusChanged { if (it.isFocused) noteHadFocus = true }.focusable())
return@Column
}
LinearProgressIndicator(
progress = { state.done / list.size.toFloat() }, color = pal.signal, trackColor = pal.line,
modifier = Modifier.padding(top = 8.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 = 10.dp), bumpers = false, compact = true,
)
val shown = kinds.getOrNull(pick)?.second ?: list
val sections = if (pick == 0) groups(shown).filter { it.second.isNotEmpty() } else listOf(null to shown)
val first = sections.firstOrNull()?.second?.firstOrNull()?.id
Column(Modifier.padding(top = 6.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) {
for ((group, items) in sections) {
if (group != null) AchievementGroupLabel(stringResource(group, items.size))
for (a in items) androidx.compose.runtime.key(a.id) {
AchievementRow(a, compact = true, if (a.id == first) track("achievements").focusRequester(firstRow) else Modifier)
}
}
}
}
}
@Composable
internal fun DrawerAchievementsRow(progress: Pair<Int, Int>?, modifier: Modifier = Modifier, onClick: () -> Unit) {
val colors = MaterialTheme.colorScheme
@@ -230,51 +230,35 @@ val LocalPalette = staticCompositionLocalOf { Themes.byId(Themes.GRAPHITE) }
val Palette.onSignal: Color get() = if (signal.luminance() > 0.18f) Color(0xFF03111F) else Color.White
internal val LocalSolidPalette = staticCompositionLocalOf<Palette?> { null }
@Composable
fun DroidDeckTheme(theme: String? = null, appScale: Int = AppUiPrefs.DEFAULT_SCALE, frost: FrostChoice? = null, content: @Composable () -> Unit) {
fun DroidDeckTheme(theme: String? = null, appScale: Int = AppUiPrefs.DEFAULT_SCALE, content: @Composable () -> Unit) {
val context = LocalContext.current
remember(context) { Themes.loadGradient(context) }
val id = theme ?: SessionPrefs.theme(context)
if (id == Themes.INNER_GAMER) InnerGamerHue(Themes.rgbSpeed)
val solid = Themes.byId(id)
val look = frost?.let { frostLook(solid, it) }
val p = if (look == null) solid else solid.frosted(look)
val p = Themes.byId(id)
val scheme = darkColorScheme(
primary = p.primary, onPrimary = p.onPrimary, secondary = p.onSurfaceVariant,
background = p.background, onBackground = p.onBackground,
surface = p.surface, onSurface = p.onBackground,
surfaceVariant = p.surfaceVariant, onSurfaceVariant = p.onSurfaceVariant,
error = p.error,
)
val baseDensity = LocalDensity.current
val baseConfiguration = LocalConfiguration.current
val density = remember(baseDensity, appScale) { scaledAppDensity(baseDensity, appScale) }
val configuration = remember(baseConfiguration, appScale) { scaledAppConfiguration(baseConfiguration, appScale) }
CompositionLocalProvider(
LocalPalette provides p,
LocalSolidPalette provides solid.takeIf { look != null },
LocalFrost provides look?.veil,
LocalDensity provides density,
LocalConfiguration provides configuration,
) {
MaterialTheme(colorScheme = p.scheme(), typography = ContentDirected) {
MaterialTheme(colorScheme = scheme, typography = ContentDirected) {
FocusGlideHost { ProvideTextStyle(TextStyle(textDirection = TextDirection.Content), content) }
}
}
}
private fun Palette.scheme() = darkColorScheme(
primary = primary, onPrimary = onPrimary, secondary = onSurfaceVariant,
background = background, onBackground = onBackground,
surface = surface, onSurface = onBackground,
surfaceVariant = surfaceVariant, onSurfaceVariant = onSurfaceVariant,
error = error,
)
@Composable
internal fun SolidSurfaces(content: @Composable () -> Unit) {
val solid = LocalSolidPalette.current
if (solid == null) content()
else CompositionLocalProvider(LocalPalette provides solid, LocalSolidPalette provides null, LocalFrost provides null) {
MaterialTheme(colorScheme = solid.scheme(), typography = MaterialTheme.typography, content = content)
}
}
private val ContentDirected = Typography().run {
fun TextStyle.byContent() = copy(textDirection = TextDirection.Content)
Typography(
@@ -69,7 +69,7 @@ internal object ThemeColors {
private val DARK_INK = Color(0xFF03111F)
internal fun contrast(a: Color, b: Color): Float {
private fun contrast(a: Color, b: Color): Float {
val x = a.luminance()
val y = b.luminance()
return (max(x, y) + 0.05f) / (min(x, y) + 0.05f)
@@ -80,7 +80,7 @@ internal object ThemeColors {
return if (worst(DARK_INK) >= worst(Color.White)) DARK_INK else Color.White
}
internal const val MIN_CONTRAST = 4.5f
private const val MIN_CONTRAST = 4.5f
private fun fitTo(ink: Color, argb: Int): Int {
fun short(color: Int) = contrast(ink, Color(color)) < MIN_CONTRAST
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="512"
android:viewportHeight="512">
<path android:fillColor="#FFFFFFFF" android:fillType="evenOdd" android:pathData="M 142 335 L 148 343 L 148 345 L 155 352 L 165 365 L 166 368 L 169 370 L 171 374 L 176 379 L 177 382 L 179 383 L 181 387 L 187 393 L 187 395 L 193 401 L 196 400 L 200 392 L 206 386 L 259 419 L 262 418 L 266 411 L 264 406 L 250 398 L 249 396 L 242 391 L 237 389 L 236 387 L 231 385 L 227 381 L 215 374 L 215 371 L 222 361 L 222 356 L 220 353 Z M 472 198 L 463 195 L 446 195 L 436 198 L 431 198 L 426 200 L 418 201 L 415 203 L 382 209 L 375 212 L 361 214 L 353 217 L 349 224 L 349 226 L 346 229 L 339 245 L 336 248 L 281 354 L 274 365 L 275 370 L 279 376 L 279 379 L 311 450 L 311 453 L 317 465 L 325 473 L 327 474 L 339 474 L 348 470 L 353 465 L 360 454 L 369 436 L 369 434 L 372 430 L 374 424 L 385 404 L 388 396 L 399 376 L 463 246 L 466 243 L 470 232 L 480 214 L 479 205 Z M 444 224 L 445 226 L 337 439 L 334 435 L 332 428 L 316 393 L 315 388 L 312 384 L 312 381 L 305 367 L 305 364 L 307 362 L 348 282 L 369 244 L 369 242 L 372 239 L 381 238 L 386 236 L 390 236 L 395 234 L 409 232 L 423 228 L 432 227 L 440 224 Z M 211 187 L 201 192 L 201 194 L 203 196 L 203 198 L 228 249 L 225 251 L 166 265 L 165 266 L 169 280 L 234 264 L 242 278 L 242 280 L 265 327 L 278 321 L 278 319 L 250 261 L 252 259 L 313 244 L 310 229 L 244 246 L 235 230 L 235 228 L 226 211 L 226 209 L 224 207 L 215 186 Z M 233 127 L 233 129 L 235 131 L 240 133 L 243 136 L 248 138 L 287 162 L 287 165 L 279 178 L 281 181 L 288 183 L 290 182 L 304 186 L 310 186 L 313 188 L 316 187 L 320 189 L 343 192 L 350 195 L 352 194 L 357 196 L 362 196 L 354 186 L 351 184 L 350 181 L 347 179 L 339 168 L 335 165 L 335 163 L 324 152 L 323 149 L 320 147 L 311 135 L 307 134 L 302 136 L 302 138 L 297 144 L 297 146 L 295 148 L 292 148 L 282 141 L 276 139 L 266 132 L 264 132 L 253 125 L 247 123 L 242 119 L 237 120 Z M 221 73 L 212 70 L 195 70 L 175 75 L 170 75 L 154 80 L 140 82 L 135 84 L 130 84 L 123 87 L 103 91 L 95 103 L 88 119 L 86 121 L 79 136 L 75 141 L 73 147 L 66 158 L 59 174 L 56 177 L 23 240 L 24 245 L 34 266 L 34 269 L 44 289 L 44 292 L 60 326 L 63 335 L 67 342 L 72 347 L 76 349 L 91 348 L 95 346 L 106 334 L 118 310 L 118 308 L 120 306 L 229 88 L 228 80 Z M 193 99 L 194 100 L 190 107 L 190 109 L 183 121 L 183 123 L 181 125 L 176 137 L 174 139 L 132 224 L 130 226 L 123 242 L 112 261 L 89 307 L 88 311 L 85 314 L 58 250 L 53 241 L 62 223 L 74 202 L 118 117 L 121 114 L 129 113 L 134 111 L 139 111 L 162 105 L 167 105 L 188 99 Z" />
</vector>
-18
View File
@@ -654,9 +654,6 @@
<string name="perf_hostname">اسم المضيف</string>
<string name="perf_hostname_hint">الاسم الذي يراه Steam لهذا الجهاز. اتركه خاليًا للاستعادة إلى %1$s.</string>
<string name="perf_hostname_invalid">أحرف وأرقام وشرطات داخلية فقط، حتى 63 حرفًا.</string>
<string name="perf_desktop_as_user">تشغيل سطح المكتب كمستخدم</string>
<string name="perf_desktop_as_user_hint">يعمل سطح المكتب وتطبيقاته وطرفياته كمستخدم عادي باسم deck بدلًا من root، للتطبيقات التي ترفض root. يظل sudo يعمل. يسري على سطح المكتب التالي.</string>
<string name="perf_desktop_as_user_needs_native">يتطلب التشغيل دون proot.</string>
<string name="perf_phantom_warning">Android مهيَّأ لإنهاء هذه الجلسة</string>
<string name="driver_installed">مثبّت</string>
<string name="driver_available">متاح للتنزيل</string>
@@ -1350,16 +1347,6 @@
<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="setup_frosted_background">مصنفر</string>
<string name="setup_frosted_background_hint">يعرض خلفية الشاشة مموّهة خلف المشغّل. يستهلك طاقة بطارية أكثر.</string>
<string name="setup_frosted_wallpaper">خلفية مصنفرة</string>
<string name="setup_frosted_cards">بطاقات مصنفرة</string>
<string name="setup_frosted_cards_hint">تُظهر البطاقات والمجموعات قليلًا من الخلفية. تبقى القوائم والحوارات معتمة.</string>
<string name="setup_frosted_cards_needs_wallpaper">يتطلب الخلفية المصنفرة.</string>
<string name="setup_frost_transparency">شفافية الخلفية</string>
<string name="setup_frost_transparency_hint">مقدار ما يظهر من الخلفية.</string>
<string name="setup_frost_card_transparency">شفافية البطاقات</string>
<string name="setup_frost_card_transparency_hint">مقدار ما يظهر من الخلفية عبر البطاقات.</string>
<string name="setup_low_storage_warning">التحذير عند انخفاض مساحة التخزين</string>
<string name="setup_low_storage_warning_hint">اسأل قبل تشغيل Steam عندما تكون المساحة الحرة أقل من 10 جيجابايت.</string>
<string name="ctrl_layout">التخطيط</string>
@@ -2564,8 +2551,6 @@
<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_title_uncounted">يتولى DroidDeck حد العمليات الفرعية</string>
<string name="phantom_instructions_uncounted">يشغّل DroidDeck معظم برامج الجلسة في عمليات لا يحتسبها Android، ما يبقي الجلسة دون الحد بكثير، لذا يمكن إبقاء خيارات المطوّرين متوقفة. ما زال Steam وبعض أدواته المساعدة محتسبة.</string>
<string name="phantom_fix_toggle">فعِّل «إيقاف القيود المفروضة على العمليات الثانوية» في خيارات المطوّرين، واترك خيارات المطوّرين مفعَّلة بعد ذلك.</string>
<string name="phantom_fix_no_toggle">لا يحتوي إصدار Android هذا على مفتاح لذلك. استخدِم تصحيح الأخطاء اللاسلكي لتغييره من هذا الجهاز.</string>
<string name="upd_block_no_apk">لا يتوفّر تنزيل لهذا الإصدار الخاص بهذه النسخة من DroidDeck.</string>
@@ -4331,7 +4316,4 @@
<string name="steam_store_linux_build">تثبّت هذه اللعبة إصدار Linux الخاص بها. ثبّتها من Steam.</string>
<string name="game_zoom_title">تكبير اللعبة</string>
<string name="game_zoom_hint">اضبط تكبير اللعبة من 100% إلى 300%</string>
<string name="glasses_shortcut_group">اختصار داخل اللعبة</string>
<string name="glasses_show_shortcut">إظهار اختصار النظارات الذكية</string>
<string name="glasses_show_shortcut_hint">إظهار زر النظارات الذكية العائم فوق اللعبة.</string>
</resources>
@@ -648,9 +648,6 @@
<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_desktop_as_user">El escritorio se ejecuta como usuario</string>
<string name="perf_desktop_as_user_hint">El escritorio, sus apps y sus terminales se ejecutan como el usuario común deck en lugar de root, para las apps que rechazan root. sudo sigue funcionando. Se aplica al próximo escritorio.</string>
<string name="perf_desktop_as_user_needs_native">Requiere Ejecutar sin proot.</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>
@@ -1399,16 +1396,6 @@
<string name="glasses_xreal_experimental">Compatibilidad experimental con XREAL 1S, One, One Pro, One Pro+ y Aura. Usa el modo Follow y desactiva la estabilización en el menú de las gafas; en Aura, desactiva también Spatial Anchor. El seguimiento de cabeza y el cambio entre 2D/3D se han probado en Aura y One Pro+.</string>
<string name="glasses_pro2_experimental">Seguimiento de cabeza experimental para Pro 2. Los ajustes de brillo y volumen y el cambio de modo de pantalla aún no son compatibles.</string>
<string name="setup_animations">Animaciones</string>
<string name="setup_frosted_background">Esmerilado</string>
<string name="setup_frosted_background_hint">Muestra tu fondo de pantalla difuminado detrás del launcher. Consume más batería.</string>
<string name="setup_frosted_wallpaper">Fondo de pantalla esmerilado</string>
<string name="setup_frosted_cards">Tarjetas esmeriladas</string>
<string name="setup_frosted_cards_hint">Las tarjetas y los grupos dejan ver un poco del fondo de pantalla. Los menús y diálogos siguen sólidos.</string>
<string name="setup_frosted_cards_needs_wallpaper">Necesita el fondo de pantalla esmerilado.</string>
<string name="setup_frost_transparency">Transparencia del fondo de pantalla</string>
<string name="setup_frost_transparency_hint">Cuánto se ve el fondo de pantalla.</string>
<string name="setup_frost_card_transparency">Transparencia de las tarjetas</string>
<string name="setup_frost_card_transparency_hint">Cuánto se ve el fondo de pantalla a través de las tarjetas.</string>
<string name="setup_low_storage_warning">Avisar cuando queda poco almacenamiento</string>
<string name="setup_low_storage_warning_hint">Preguntar antes de iniciar Steam cuando el espacio libre es menor a 10 GB.</string>
<string name="ctrl_layout">Disposición</string>
@@ -2556,8 +2543,6 @@
<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_title_uncounted">DroidDeck gestiona el límite de procesos secundarios</string>
<string name="phantom_instructions_uncounted">DroidDeck ejecuta la mayoría de los programas de la sesión en procesos que Android no cuenta, lo que mantiene la sesión muy por debajo del límite, así que las Opciones de desarrollador pueden quedar desactivadas. Steam y algunos de sus procesos auxiliares todavía cuentan.</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>
@@ -4209,7 +4194,4 @@
<string name="steam_store_close_steam">Cierra Steam primero</string>
<string name="steam_store_session_wait">Pausa primero la descarga de Steam</string>
<string name="steam_store_linux_build">Este juego instala su versión para Linux. Instálalo desde Steam.</string>
<string name="glasses_shortcut_group">Acceso directo en el juego</string>
<string name="glasses_show_shortcut">Mostrar acceso directo de Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Mostrar el botón flotante de Smart Glasses sobre el juego.</string>
</resources>
-18
View File
@@ -646,9 +646,6 @@
<string name="perf_hostname">Име на хоста</string>
<string name="perf_hostname_hint">Името, което Steam вижда за това устройство. Оставено празно възстановява %1$s.</string>
<string name="perf_hostname_invalid">Само букви, цифри и тирета по средата, до 63 знака.</string>
<string name="perf_desktop_as_user">Работният плот работи като потребител</string>
<string name="perf_desktop_as_user_hint">Работният плот, приложенията и терминалите му работят като обикновения потребител deck вместо root, за приложения, които отказват root. sudo продължава да работи. Важи за следващия работен плот.</string>
<string name="perf_desktop_as_user_needs_native">Изисква Работа без proot.</string>
<string name="perf_phantom_warning">Android е настроен да прекратява тази сесия</string>
<string name="driver_installed">Инсталиран</string>
<string name="driver_available">Налично за изтегляне</string>
@@ -1322,16 +1319,6 @@
<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="setup_frosted_background">Матово</string>
<string name="setup_frosted_background_hint">Показва тапета ви размазан зад лаунчъра. Изразходва повече батерия.</string>
<string name="setup_frosted_wallpaper">Матов тапет</string>
<string name="setup_frosted_cards">Матови карти</string>
<string name="setup_frosted_cards_hint">Картите и групите пропускат малко от тапета. Менютата и диалозите остават плътни.</string>
<string name="setup_frosted_cards_needs_wallpaper">Изисква матов тапет.</string>
<string name="setup_frost_transparency">Прозрачност на тапета</string>
<string name="setup_frost_transparency_hint">Колко от тапета се вижда.</string>
<string name="setup_frost_card_transparency">Прозрачност на картите</string>
<string name="setup_frost_card_transparency_hint">Колко от тапета се вижда през картите.</string>
<string name="setup_low_storage_warning">Предупреждение при малко място</string>
<string name="setup_low_storage_warning_hint">Питай преди стартиране на Steam, когато свободното място е под 10 GB.</string>
<string name="ctrl_layout">Разположение</string>
@@ -2460,8 +2447,6 @@
<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_title_uncounted">DroidDeck се справя с ограничението за дъщерни процеси</string>
<string name="phantom_instructions_uncounted">DroidDeck изпълнява повечето програми на сесията в процеси, които Android не отчита, така че сесията остава далеч под лимита и опциите за програмисти могат да останат изключени. Steam и някои от помощните му процеси все още се отчитат.</string>
<string name="phantom_fix_toggle">Включи „Деактивиране на ограниченията за дъщерните процеси“ в Опции за програмисти и остави Опции за програмисти включени след това.</string>
<string name="phantom_fix_no_toggle">Тази версия на Android няма превключвател за това. Използвай безжично отстраняване на грешки, за да го промениш от това устройство.</string>
<string name="upd_block_no_apk">Тази версия няма изтегляне за това копие на DroidDeck.</string>
@@ -4171,7 +4156,4 @@
<string name="steam_store_linux_build">Тази игра инсталира версията си за Linux. Инсталирайте я от Steam.</string>
<string name="game_zoom_title">Мащабиране на играта</string>
<string name="game_zoom_hint">Регулирайте увеличението на играта от 100% до 300%</string>
<string name="glasses_shortcut_group">Пряк път в играта</string>
<string name="glasses_show_shortcut">Показване на прекия път за Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Показва плаващия бутон за Smart Glasses върху играта.</string>
</resources>
-18
View File
@@ -650,9 +650,6 @@
<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_desktop_as_user">Plocha běží jako uživatel</string>
<string name="perf_desktop_as_user_hint">Plocha, její aplikace a terminály běží jako běžný uživatel deck místo root, kvůli aplikacím, které root odmítají. sudo dál funguje. Projeví se u příští plochy.</string>
<string name="perf_desktop_as_user_needs_native">Vyžaduje Spouštět bez proot.</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>
@@ -1336,16 +1333,6 @@
<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="setup_frosted_background">Matné</string>
<string name="setup_frosted_background_hint">Zobrazí za spouštěčem rozmazanou tapetu. Spotřebuje více baterie.</string>
<string name="setup_frosted_wallpaper">Matná tapeta</string>
<string name="setup_frosted_cards">Matné karty</string>
<string name="setup_frosted_cards_hint">Karty a skupiny nechají prosvítat trochu tapety. Nabídky a dialogy zůstanou neprůhledné.</string>
<string name="setup_frosted_cards_needs_wallpaper">Vyžaduje matnou tapetu.</string>
<string name="setup_frost_transparency">Průhlednost tapety</string>
<string name="setup_frost_transparency_hint">Kolik tapety prosvítá.</string>
<string name="setup_frost_card_transparency">Průhlednost karet</string>
<string name="setup_frost_card_transparency_hint">Kolik tapety prosvítá kartami.</string>
<string name="setup_low_storage_warning">Upozornit na nedostatek úložiště</string>
<string name="setup_low_storage_warning_hint">Zeptat se před spuštěním Steamu, když je volné místo pod 10 GB.</string>
<string name="ctrl_layout">Rozložení</string>
@@ -2512,8 +2499,6 @@
<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_title_uncounted">Limit podřízených procesů řeší DroidDeck</string>
<string name="phantom_instructions_uncounted">DroidDeck spouští většinu programů relace v procesech, které Android nezapočítává, takže relace zůstává hluboko pod limitem a možnosti pro vývojáře mohou zůstat vypnuté. Steam a některé jeho pomocné procesy se stále započítávají.</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>
@@ -4251,7 +4236,4 @@
<string name="steam_store_linux_build">Tato hra instaluje svou verzi pro Linux. Nainstalujte ji ze Steamu.</string>
<string name="game_zoom_title">Přiblížení hry</string>
<string name="game_zoom_hint">Nastavte zvětšení hry od 100 % do 300 %</string>
<string name="glasses_shortcut_group">Zkratka ve hře</string>
<string name="glasses_show_shortcut">Zobrazit zkratku Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Zobrazit plovoucí tlačítko Smart Glasses nad hrou.</string>
</resources>
-18
View File
@@ -646,9 +646,6 @@
<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_desktop_as_user">Skrivebordet kører som bruger</string>
<string name="perf_desktop_as_user_hint">Skrivebordet, dets apps og terminaler kører som den almindelige bruger deck i stedet for root, til apps der afviser root. sudo virker stadig. Gælder fra næste skrivebord.</string>
<string name="perf_desktop_as_user_needs_native">Kræver Kør uden proot.</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>
@@ -1322,16 +1319,6 @@
<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="setup_frosted_background">Mat</string>
<string name="setup_frosted_background_hint">Viser din baggrund sløret bag launcheren. Bruger mere batteri.</string>
<string name="setup_frosted_wallpaper">Mat baggrundsbillede</string>
<string name="setup_frosted_cards">Matte kort</string>
<string name="setup_frosted_cards_hint">Kort og grupper lader lidt af baggrundsbilledet skinne igennem. Menuer og dialoger forbliver faste.</string>
<string name="setup_frosted_cards_needs_wallpaper">Kræver mat baggrundsbillede.</string>
<string name="setup_frost_transparency">Baggrundens gennemsigtighed</string>
<string name="setup_frost_transparency_hint">Hvor meget af baggrundsbilledet der skinner igennem.</string>
<string name="setup_frost_card_transparency">Kortenes gennemsigtighed</string>
<string name="setup_frost_card_transparency_hint">Hvor meget af baggrundsbilledet der skinner gennem kortene.</string>
<string name="setup_low_storage_warning">Advar, når lagerpladsen er lav</string>
<string name="setup_low_storage_warning_hint">Spørg, før Steam startes, når den ledige plads er under 10 GB.</string>
<string name="ctrl_layout">Layout</string>
@@ -2460,8 +2447,6 @@
<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_title_uncounted">DroidDeck håndterer grænsen for underprocesser</string>
<string name="phantom_instructions_uncounted">DroidDeck kører de fleste af sessionens programmer i processer, som Android ikke tæller med, så sessionen holder sig et godt stykke under grænsen, og Indstillinger for udviklere kan forblive slået fra. Steam og nogle af dets hjælpeprocesser tæller stadig med.</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>
@@ -4171,7 +4156,4 @@
<string name="steam_store_linux_build">Dette spil installerer sin Linux-version. Installer det fra Steam.</string>
<string name="game_zoom_title">Spilzoom</string>
<string name="game_zoom_hint">Juster spillets forstørrelse fra 100 % til 300 %</string>
<string name="glasses_shortcut_group">Genvej i spillet</string>
<string name="glasses_show_shortcut">Vis Smart Glasses-genvej</string>
<string name="glasses_show_shortcut_hint">Vis den flydende Smart Glasses-knap oven på spillet.</string>
</resources>
-18
View File
@@ -646,9 +646,6 @@
<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_desktop_as_user">Desktop läuft als Benutzer</string>
<string name="perf_desktop_as_user_hint">Der Desktop, seine Apps und Terminals laufen als normaler Benutzer deck statt als root, für Apps, die root ablehnen. sudo funktioniert weiterhin. Gilt ab dem nächsten Desktop.</string>
<string name="perf_desktop_as_user_needs_native">Erfordert Ohne proot ausführen.</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>
@@ -1314,16 +1311,6 @@
<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="setup_frosted_background">Milchglas</string>
<string name="setup_frosted_background_hint">Zeigt dein Hintergrundbild unscharf hinter dem Launcher. Verbraucht mehr Akku.</string>
<string name="setup_frosted_wallpaper">Milchglas-Hintergrundbild</string>
<string name="setup_frosted_cards">Milchglas-Karten</string>
<string name="setup_frosted_cards_hint">Karten und Gruppen lassen etwas vom Hintergrundbild durch. Menüs und Dialoge bleiben deckend.</string>
<string name="setup_frosted_cards_needs_wallpaper">Erfordert das Milchglas-Hintergrundbild.</string>
<string name="setup_frost_transparency">Transparenz des Hintergrundbilds</string>
<string name="setup_frost_transparency_hint">Wie viel vom Hintergrundbild durchscheint.</string>
<string name="setup_frost_card_transparency">Transparenz der Karten</string>
<string name="setup_frost_card_transparency_hint">Wie viel vom Hintergrundbild durch die Karten scheint.</string>
<string name="setup_low_storage_warning">Bei knappem Speicher warnen</string>
<string name="setup_low_storage_warning_hint">Vor dem Start von Steam nachfragen, wenn weniger als 10 GB frei sind.</string>
<string name="ctrl_layout">Layout</string>
@@ -2452,8 +2439,6 @@
<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_title_uncounted">Limit für untergeordnete Prozesse übernimmt DroidDeck</string>
<string name="phantom_instructions_uncounted">DroidDeck führt die meisten Programme der Sitzung in Prozessen aus, die Android nicht mitzählt. So bleibt die Sitzung deutlich unter dem Limit, und die Entwickleroptionen können ausgeschaltet bleiben. Steam und einige seiner Hilfsprozesse zählen weiterhin mit.</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>
@@ -4171,7 +4156,4 @@
<string name="steam_store_linux_build">Dieses Spiel installiert seine Linux-Version. Installiere es über Steam.</string>
<string name="game_zoom_title">Spielzoom</string>
<string name="game_zoom_hint">Spielvergrößerung von 100 % bis 300 % anpassen</string>
<string name="glasses_shortcut_group">Ingame-Verknüpfung</string>
<string name="glasses_show_shortcut">Smart-Glasses-Verknüpfung anzeigen</string>
<string name="glasses_show_shortcut_hint">Die schwebende Smart-Glasses-Schaltfläche über dem Spiel anzeigen.</string>
</resources>
-18
View File
@@ -646,9 +646,6 @@
<string name="perf_hostname">Όνομα κεντρικού υπολογιστή</string>
<string name="perf_hostname_hint">Το όνομα που βλέπει το Steam για αυτή τη συσκευή. Αν το αφήσετε κενό, επανέρχεται σε %1$s.</string>
<string name="perf_hostname_invalid">Μόνο γράμματα, ψηφία και εσωτερικές παύλες, έως 63 χαρακτήρες.</string>
<string name="perf_desktop_as_user">Η επιφάνεια εργασίας εκτελείται ως χρήστης</string>
<string name="perf_desktop_as_user_hint">Η επιφάνεια εργασίας, οι εφαρμογές και τα τερματικά της εκτελούνται ως ο απλός χρήστης deck αντί για root, για εφαρμογές που αρνούνται το root. Το sudo εξακολουθεί να λειτουργεί. Ισχύει από την επόμενη επιφάνεια εργασίας.</string>
<string name="perf_desktop_as_user_needs_native">Απαιτεί Εκτέλεση χωρίς proot.</string>
<string name="perf_phantom_warning">Το Android είναι ρυθμισμένο να διακόπτει αυτή τη συνεδρία</string>
<string name="driver_installed">Εγκατεστημένο</string>
<string name="driver_available">Διαθέσιμο για λήψη</string>
@@ -1322,16 +1319,6 @@
<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="setup_frosted_background">Θαμπό</string>
<string name="setup_frosted_background_hint">Εμφανίζει την ταπετσαρία σας θολή πίσω από τον εκκινητή. Καταναλώνει περισσότερη μπαταρία.</string>
<string name="setup_frosted_wallpaper">Θαμπή ταπετσαρία</string>
<string name="setup_frosted_cards">Θαμπές κάρτες</string>
<string name="setup_frosted_cards_hint">Οι κάρτες και οι ομάδες αφήνουν να φαίνεται λίγη από την ταπετσαρία. Τα μενού και οι διάλογοι μένουν συμπαγείς.</string>
<string name="setup_frosted_cards_needs_wallpaper">Χρειάζεται θαμπή ταπετσαρία.</string>
<string name="setup_frost_transparency">Διαφάνεια ταπετσαρίας</string>
<string name="setup_frost_transparency_hint">Πόση από την ταπετσαρία φαίνεται.</string>
<string name="setup_frost_card_transparency">Διαφάνεια καρτών</string>
<string name="setup_frost_card_transparency_hint">Πόση από την ταπετσαρία φαίνεται μέσα από τις κάρτες.</string>
<string name="setup_low_storage_warning">Προειδοποίηση για χαμηλό χώρο αποθήκευσης</string>
<string name="setup_low_storage_warning_hint">Ερώτηση πριν από την εκκίνηση του Steam όταν ο ελεύθερος χώρος είναι κάτω από 10 GB.</string>
<string name="ctrl_layout">Διάταξη</string>
@@ -2460,8 +2447,6 @@
<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_title_uncounted">Το DroidDeck χειρίζεται το όριο θυγατρικών διεργασιών</string>
<string name="phantom_instructions_uncounted">Το DroidDeck εκτελεί τα περισσότερα προγράμματα της συνεδρίας σε διεργασίες που το Android δεν μετράει, ώστε η συνεδρία να μένει πολύ κάτω από το όριο και οι Επιλογές για προγραμματιστές να μπορούν να μείνουν απενεργοποιημένες. Το Steam και ορισμένες βοηθητικές διεργασίες του εξακολουθούν να μετράνε.</string>
<string name="phantom_fix_toggle">Ενεργοποιήστε την «Απενεργοπ. περιορισμών σε θυγατρικές διεργασίες» στις Επιλογές προγραμματιστή και αφήστε τις Επιλογές προγραμματιστή ενεργές μετά.</string>
<string name="phantom_fix_no_toggle">Αυτή η έκδοση Android δεν έχει διακόπτη για αυτό. Χρησιμοποιήστε τον ασύρματο εντοπισμό σφαλμάτων για να το αλλάξετε από αυτή τη συσκευή.</string>
<string name="upd_block_no_apk">Αυτή η έκδοση δεν έχει λήψη για αυτό το αντίγραφο του DroidDeck.</string>
@@ -4171,7 +4156,4 @@
<string name="steam_store_linux_build">Αυτό το παιχνίδι εγκαθιστά την έκδοσή του για Linux. Εγκαταστήστε το από το Steam.</string>
<string name="game_zoom_title">Ζουμ παιχνιδιού</string>
<string name="game_zoom_hint">Ρυθμίστε τη μεγέθυνση του παιχνιδιού από 100% έως 300%</string>
<string name="glasses_shortcut_group">Συντόμευση μέσα στο παιχνίδι</string>
<string name="glasses_show_shortcut">Εμφάνιση συντόμευσης Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Εμφάνιση του αιωρούμενου κουμπιού Smart Glasses πάνω από το παιχνίδι.</string>
</resources>
-18
View File
@@ -648,9 +648,6 @@
<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_desktop_as_user">El escritorio se ejecuta como usuario</string>
<string name="perf_desktop_as_user_hint">El escritorio, sus apps y sus terminales se ejecutan como el usuario normal deck en lugar de root, para las apps que rechazan root. sudo sigue funcionando. Se aplica al próximo escritorio.</string>
<string name="perf_desktop_as_user_needs_native">Requiere Ejecutar sin proot.</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>
@@ -1329,16 +1326,6 @@
<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="setup_frosted_background">Esmerilado</string>
<string name="setup_frosted_background_hint">Muestra tu fondo de pantalla difuminado detrás del launcher. Consume más batería.</string>
<string name="setup_frosted_wallpaper">Fondo de pantalla esmerilado</string>
<string name="setup_frosted_cards">Tarjetas esmeriladas</string>
<string name="setup_frosted_cards_hint">Las tarjetas y los grupos dejan ver un poco del fondo de pantalla. Los menús y diálogos siguen opacos.</string>
<string name="setup_frosted_cards_needs_wallpaper">Necesita el fondo de pantalla esmerilado.</string>
<string name="setup_frost_transparency">Transparencia del fondo de pantalla</string>
<string name="setup_frost_transparency_hint">Cuánto se ve el fondo de pantalla.</string>
<string name="setup_frost_card_transparency">Transparencia de las tarjetas</string>
<string name="setup_frost_card_transparency_hint">Cuánto se ve el fondo de pantalla a través de las tarjetas.</string>
<string name="setup_low_storage_warning">Avisar cuando queda poco almacenamiento</string>
<string name="setup_low_storage_warning_hint">Preguntar antes de iniciar Steam cuando el espacio libre es inferior a 10 GB.</string>
<string name="ctrl_layout">Disposición</string>
@@ -2486,8 +2473,6 @@
<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_title_uncounted">DroidDeck gestiona el límite de procesos secundarios</string>
<string name="phantom_instructions_uncounted">DroidDeck ejecuta la mayoría de los programas de la sesión en procesos que Android no cuenta, lo que mantiene la sesión muy por debajo del límite, así que las Opciones para desarrolladores pueden seguir desactivadas. Steam y algunos de sus procesos auxiliares siguen contando.</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>
@@ -4211,7 +4196,4 @@
<string name="steam_store_linux_build">Este juego instala su versión para Linux. Instálalo desde Steam.</string>
<string name="game_zoom_title">Zoom del juego</string>
<string name="game_zoom_hint">Ajusta la ampliación del juego del 100 % al 300 %</string>
<string name="glasses_shortcut_group">Acceso directo en el juego</string>
<string name="glasses_show_shortcut">Mostrar acceso directo de Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Mostrar el botón flotante de Smart Glasses sobre el juego.</string>
</resources>
-18
View File
@@ -646,9 +646,6 @@
<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_desktop_as_user">Työpöytä toimii käyttäjänä</string>
<string name="perf_desktop_as_user_hint">Työpöytä, sen sovellukset ja päätteet toimivat tavallisena käyttäjänä deck rootin sijaan, rootin torjuvia sovelluksia varten. sudo toimii edelleen. Koskee seuraavaa työpöytää.</string>
<string name="perf_desktop_as_user_needs_native">Vaatii Suorita ilman prootia.</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>
@@ -1322,16 +1319,6 @@
<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="setup_frosted_background">Huurrettu</string>
<string name="setup_frosted_background_hint">Näyttää taustakuvasi sumennettuna käynnistimen takana. Kuluttaa enemmän akkua.</string>
<string name="setup_frosted_wallpaper">Huurrettu taustakuva</string>
<string name="setup_frosted_cards">Huurretut kortit</string>
<string name="setup_frosted_cards_hint">Kortit ja ryhmät päästävät hieman taustakuvaa läpi. Valikot ja valintaikkunat pysyvät peittävinä.</string>
<string name="setup_frosted_cards_needs_wallpaper">Vaatii huurretun taustakuvan.</string>
<string name="setup_frost_transparency">Taustakuvan läpinäkyvyys</string>
<string name="setup_frost_transparency_hint">Kuinka paljon taustakuvaa näkyy läpi.</string>
<string name="setup_frost_card_transparency">Korttien läpinäkyvyys</string>
<string name="setup_frost_card_transparency_hint">Kuinka paljon taustakuvaa näkyy korttien läpi.</string>
<string name="setup_low_storage_warning">Varoita, kun tallennustila on vähissä</string>
<string name="setup_low_storage_warning_hint">Kysy ennen Steamin käynnistämistä, kun vapaata tilaa on alle 10 Gt.</string>
<string name="ctrl_layout">Asettelu</string>
@@ -2460,8 +2447,6 @@
<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_title_uncounted">DroidDeck hoitaa aliprosessirajoituksen</string>
<string name="phantom_instructions_uncounted">DroidDeck ajaa useimmat istunnon ohjelmat prosesseissa, joita Android ei laske, joten istunto pysyy reilusti rajan alapuolella ja kehittäjäasetukset voivat pysyä pois päältä. Steam ja osa sen apuprosesseista lasketaan edelleen.</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>
@@ -4171,7 +4156,4 @@
<string name="steam_store_linux_build">Tämä peli asentaa Linux-versionsa. Asenna se Steamista.</string>
<string name="game_zoom_title">Pelin zoomaus</string>
<string name="game_zoom_hint">Säädä pelin suurennusta välillä 100–300 %</string>
<string name="glasses_shortcut_group">Pelin aikainen pikakuvake</string>
<string name="glasses_show_shortcut">Näytä Smart Glasses -pikakuvake</string>
<string name="glasses_show_shortcut_hint">Näytä pelin päällä kelluva Smart Glasses -painike.</string>
</resources>
-18
View File
@@ -648,9 +648,6 @@
<string name="perf_hostname">Nom d\'hôte</string>
<string name="perf_hostname_hint">Le nom sous lequel Steam voit cet appareil. Laisser vide pour restaurer %1$s.</string>
<string name="perf_hostname_invalid">Ne peut contenir que des lettres, des chiffres et des tirets au milieu, jusqu\'à 63 caractères.</string>
<string name="perf_desktop_as_user">Le bureau s’exécute en tant qu’utilisateur</string>
<string name="perf_desktop_as_user_hint">Le bureau, ses applications et ses terminaux s’exécutent en tant qu’utilisateur ordinaire deck au lieu de root, pour les applications qui refusent root. sudo fonctionne toujours. S’applique au prochain bureau.</string>
<string name="perf_desktop_as_user_needs_native">Nécessite Exécuter sans proot.</string>
<string name="perf_phantom_warning">Android est configuré pour terminer cette session</string>
<string name="driver_installed">Installé</string>
<string name="driver_available">Téléchargeable</string>
@@ -1328,16 +1325,6 @@
<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="setup_frosted_background">Givré</string>
<string name="setup_frosted_background_hint">Affiche votre fond d’écran flouté derrière le lanceur. Consomme plus de batterie.</string>
<string name="setup_frosted_wallpaper">Fond d’écran givré</string>
<string name="setup_frosted_cards">Cartes givrées</string>
<string name="setup_frosted_cards_hint">Les cartes et les groupes laissent transparaître un peu du fond d’écran. Les menus et les boîtes de dialogue restent opaques.</string>
<string name="setup_frosted_cards_needs_wallpaper">Nécessite le fond d’écran givré.</string>
<string name="setup_frost_transparency">Transparence du fond d’écran</string>
<string name="setup_frost_transparency_hint">La part du fond d’écran visible à travers.</string>
<string name="setup_frost_card_transparency">Transparence des cartes</string>
<string name="setup_frost_card_transparency_hint">La part du fond d’écran visible à travers les cartes.</string>
<string name="setup_low_storage_warning">Avertir quand l\'espace de stockage est faible</string>
<string name="setup_low_storage_warning_hint">Demander avant de lancer Steam lorsque l\'espace libre est inférieur à 10 Go.</string>
<string name="ctrl_layout">Disposition</string>
@@ -2485,8 +2472,6 @@
<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_title_uncounted">Limite de processus enfants gérée par DroidDeck</string>
<string name="phantom_instructions_uncounted">DroidDeck exécute la plupart des programmes de la session dans des processus qu’Android ne compte pas, ce qui maintient la session bien en dessous de la limite : les options pour les développeurs peuvent rester désactivées. Steam et certains de ses processus auxiliaires sont toujours comptés.</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>
@@ -4210,7 +4195,4 @@
<string name="steam_store_linux_build">Ce jeu installe sa version Linux. Installez-le depuis Steam.</string>
<string name="game_zoom_title">Zoom du jeu</string>
<string name="game_zoom_hint">Réglez le grossissement du jeu de 100 % à 300 %</string>
<string name="glasses_shortcut_group">Raccourci en jeu</string>
<string name="glasses_show_shortcut">Afficher le raccourci Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Afficher le bouton flottant Smart Glasses par-dessus le jeu.</string>
</resources>
-18
View File
@@ -646,9 +646,6 @@
<string name="perf_hostname">होस्ट नाम</string>
<string name="perf_hostname_hint">वह नाम जो Steam इस डिवाइस के लिए देखता है। खाली छोड़ने पर %1$s वापस आ जाता है।</string>
<string name="perf_hostname_invalid">सिर्फ़ अक्षर, अंक और बीच के हाइफ़न, 63 वर्णों तक।</string>
<string name="perf_desktop_as_user">डेस्कटॉप उपयोगकर्ता के रूप में चलता है</string>
<string name="perf_desktop_as_user_hint">डेस्कटॉप, उसके ऐप और टर्मिनल root के बजाय सामान्य उपयोगकर्ता deck के रूप में चलते हैं, उन ऐप के लिए जो root को अस्वीकार करते हैं। sudo फिर भी काम करता है। अगले डेस्कटॉप पर लागू होता है।</string>
<string name="perf_desktop_as_user_needs_native">proot के बिना चलाएँ आवश्यक है।</string>
<string name="perf_phantom_warning">Android इस सेशन को बंद करने के लिए सेट है</string>
<string name="driver_installed">इंस्टॉल है</string>
<string name="driver_available">डाउनलोड के लिए उपलब्ध</string>
@@ -1322,16 +1319,6 @@
<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="setup_frosted_background">फ़्रॉस्टेड</string>
<string name="setup_frosted_background_hint">लॉन्चर के पीछे आपका वॉलपेपर धुंधला दिखाता है। ज़्यादा बैटरी खर्च होती है।</string>
<string name="setup_frosted_wallpaper">फ़्रॉस्टेड वॉलपेपर</string>
<string name="setup_frosted_cards">फ़्रॉस्टेड कार्ड</string>
<string name="setup_frosted_cards_hint">कार्ड और समूह वॉलपेपर का थोड़ा हिस्सा दिखाते हैं। मेन्यू और डायलॉग ठोस रहते हैं।</string>
<string name="setup_frosted_cards_needs_wallpaper">फ़्रॉस्टेड वॉलपेपर ज़रूरी है।</string>
<string name="setup_frost_transparency">वॉलपेपर की पारदर्शिता</string>
<string name="setup_frost_transparency_hint">वॉलपेपर कितना दिखता है।</string>
<string name="setup_frost_card_transparency">कार्ड की पारदर्शिता</string>
<string name="setup_frost_card_transparency_hint">कार्ड के पार वॉलपेपर कितना दिखता है।</string>
<string name="setup_low_storage_warning">स्टोरेज कम होने पर चेतावनी दें</string>
<string name="setup_low_storage_warning_hint">खाली जगह 10 GB से कम होने पर Steam शुरू करने से पहले पूछें।</string>
<string name="ctrl_layout">लेआउट</string>
@@ -2460,8 +2447,6 @@
<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_title_uncounted">चाइल्ड-प्रोसेस सीमा DroidDeck संभालता है</string>
<string name="phantom_instructions_uncounted">DroidDeck सत्र के ज़्यादातर प्रोग्राम उन प्रोसेस में चलाता है जिन्हें Android नहीं गिनता, जिससे सत्र सीमा से काफ़ी नीचे रहता है, इसलिए डेवलपर विकल्प बंद रह सकते हैं। Steam और उसके कुछ सहायक प्रोसेस अब भी गिने जाते हैं।</string>
<string name="phantom_fix_toggle">डेवलपर विकल्प में “चाइल्ड प्रोसेस से जुड़ी पाबंदियां हटाएं” चालू करें, और बाद में डेवलपर विकल्प चालू रहने दें।</string>
<string name="phantom_fix_no_toggle">इस Android वर्शन में इसके लिए कोई स्विच नहीं है। इसे इस डिवाइस से बदलने के लिए वायरलेस डीबगिंग इस्तेमाल करें।</string>
<string name="upd_block_no_apk">इस बिल्ड में DroidDeck की इस कॉपी के लिए कोई डाउनलोड नहीं है।</string>
@@ -4171,7 +4156,4 @@
<string name="steam_store_linux_build">यह गेम अपना Linux संस्करण इंस्टॉल करता है। इसे Steam से इंस्टॉल करें।</string>
<string name="game_zoom_title">गेम ज़ूम</string>
<string name="game_zoom_hint">गेम का ज़ूम 100% से 300% तक समायोजित करें</string>
<string name="glasses_shortcut_group">गेम में शॉर्टकट</string>
<string name="glasses_show_shortcut">Smart Glasses शॉर्टकट दिखाएँ</string>
<string name="glasses_show_shortcut_hint">गेम के ऊपर तैरता हुआ Smart Glasses बटन दिखाएँ।</string>
</resources>
-18
View File
@@ -646,9 +646,6 @@
<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_desktop_as_user">Az asztal felhasználóként fut</string>
<string name="perf_desktop_as_user_hint">Az asztal, az alkalmazásai és a termináljai root helyett a deck nevű átlagos felhasználóként futnak, a root-ot elutasító alkalmazások miatt. A sudo továbbra is működik. A következő asztaltól érvényes.</string>
<string name="perf_desktop_as_user_needs_native">A Futtatás proot nélkül szükséges hozzá.</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>
@@ -1322,16 +1319,6 @@
<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="setup_frosted_background">Matt</string>
<string name="setup_frosted_background_hint">A háttérképet elmosva jeleníti meg az indítóalkalmazás mögött. Több akkumulátort használ.</string>
<string name="setup_frosted_wallpaper">Matt háttérkép</string>
<string name="setup_frosted_cards">Matt kártyák</string>
<string name="setup_frosted_cards_hint">A kártyák és csoportok átengednek egy kicsit a háttérképből. A menük és párbeszédablakok átlátszatlanok maradnak.</string>
<string name="setup_frosted_cards_needs_wallpaper">Matt háttérkép szükséges hozzá.</string>
<string name="setup_frost_transparency">Háttérkép átlátszósága</string>
<string name="setup_frost_transparency_hint">Mennyi látszik át a háttérképből.</string>
<string name="setup_frost_card_transparency">Kártyák átlátszósága</string>
<string name="setup_frost_card_transparency_hint">Mennyi látszik a háttérképből a kártyákon át.</string>
<string name="setup_low_storage_warning">Figyelmeztetés kevés tárhely esetén</string>
<string name="setup_low_storage_warning_hint">Rákérdezés a Steam indítása előtt, ha 10 GB-nál kevesebb a szabad hely.</string>
<string name="ctrl_layout">Elrendezés</string>
@@ -2460,8 +2447,6 @@
<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_title_uncounted">A gyermekfolyamat-korlátot a DroidDeck kezeli</string>
<string name="phantom_instructions_uncounted">A DroidDeck a munkamenet legtöbb programját olyan folyamatokban futtatja, amelyeket az Android nem számol bele, így a munkamenet jóval a korlát alatt marad, és a fejlesztői beállítások kikapcsolva maradhatnak. A Steam és néhány segédfolyamata továbbra is beleszámít.</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>
@@ -4171,7 +4156,4 @@
<string name="steam_store_linux_build">Ez a játék a Linux-verzióját telepíti. Telepítsd a Steamből.</string>
<string name="game_zoom_title">Játék nagyítása</string>
<string name="game_zoom_hint">A játék nagyításának beállítása 100% és 300% között</string>
<string name="glasses_shortcut_group">Játékon belüli parancsikon</string>
<string name="glasses_show_shortcut">Smart Glasses parancsikon megjelenítése</string>
<string name="glasses_show_shortcut_hint">A játék fölött lebegő Smart Glasses gomb megjelenítése.</string>
</resources>
-18
View File
@@ -644,9 +644,6 @@
<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_desktop_as_user">Desktop berjalan sebagai pengguna</string>
<string name="perf_desktop_as_user_hint">Desktop, aplikasi, dan terminalnya berjalan sebagai pengguna biasa deck, bukan root, untuk aplikasi yang menolak root. sudo tetap berfungsi. Berlaku untuk desktop berikutnya.</string>
<string name="perf_desktop_as_user_needs_native">Memerlukan Jalankan tanpa proot.</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>
@@ -1316,16 +1313,6 @@
<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="setup_frosted_background">Buram</string>
<string name="setup_frosted_background_hint">Menampilkan wallpaper Anda yang diburamkan di belakang peluncur. Memakai lebih banyak baterai.</string>
<string name="setup_frosted_wallpaper">Wallpaper buram</string>
<string name="setup_frosted_cards">Kartu buram</string>
<string name="setup_frosted_cards_hint">Kartu dan grup menampilkan sedikit wallpaper. Menu dan dialog tetap solid.</string>
<string name="setup_frosted_cards_needs_wallpaper">Memerlukan wallpaper buram.</string>
<string name="setup_frost_transparency">Transparansi wallpaper</string>
<string name="setup_frost_transparency_hint">Seberapa banyak wallpaper yang terlihat.</string>
<string name="setup_frost_card_transparency">Transparansi kartu</string>
<string name="setup_frost_card_transparency_hint">Seberapa banyak wallpaper yang terlihat melalui kartu.</string>
<string name="setup_low_storage_warning">Peringatkan saat penyimpanan hampir penuh</string>
<string name="setup_low_storage_warning_hint">Tanya sebelum memulai Steam saat ruang kosong di bawah 10 GB.</string>
<string name="ctrl_layout">Tata letak</string>
@@ -2435,8 +2422,6 @@
<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_title_uncounted">Batas proses anak ditangani DroidDeck</string>
<string name="phantom_instructions_uncounted">DroidDeck menjalankan sebagian besar program sesi dalam proses yang tidak dihitung Android, sehingga sesi tetap jauh di bawah batas dan Opsi developer bisa tetap nonaktif. Steam dan beberapa proses pembantunya masih dihitung.</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>
@@ -4141,7 +4126,4 @@
<string name="steam_store_linux_build">Game ini memasang versi Linux-nya. Pasang dari Steam.</string>
<string name="game_zoom_title">Zoom game</string>
<string name="game_zoom_hint">Sesuaikan pembesaran game dari 100% hingga 300%</string>
<string name="glasses_shortcut_group">Pintasan dalam game</string>
<string name="glasses_show_shortcut">Tampilkan pintasan Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Tampilkan tombol Smart Glasses mengambang di atas game.</string>
</resources>
-18
View File
@@ -648,9 +648,6 @@
<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_desktop_as_user">Il desktop viene eseguito come utente</string>
<string name="perf_desktop_as_user_hint">Il desktop, le sue app e i suoi terminali vengono eseguiti come utente normale deck invece che come root, per le app che rifiutano root. sudo funziona comunque. Si applica al prossimo desktop.</string>
<string name="perf_desktop_as_user_needs_native">Richiede Esegui senza proot.</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>
@@ -1320,16 +1317,6 @@
<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="setup_frosted_background">Satinato</string>
<string name="setup_frosted_background_hint">Mostra il tuo sfondo sfocato dietro il launcher. Consuma più batteria.</string>
<string name="setup_frosted_wallpaper">Sfondo satinato</string>
<string name="setup_frosted_cards">Schede satinate</string>
<string name="setup_frosted_cards_hint">Schede e gruppi lasciano trasparire un po’ dello sfondo. Menu e finestre di dialogo restano opachi.</string>
<string name="setup_frosted_cards_needs_wallpaper">Richiede lo sfondo satinato.</string>
<string name="setup_frost_transparency">Trasparenza dello sfondo</string>
<string name="setup_frost_transparency_hint">Quanto dello sfondo si vede attraverso.</string>
<string name="setup_frost_card_transparency">Trasparenza delle schede</string>
<string name="setup_frost_card_transparency_hint">Quanto dello sfondo si vede attraverso le schede.</string>
<string name="setup_low_storage_warning">Avvisa quando lo spazio è scarso</string>
<string name="setup_low_storage_warning_hint">Chiedi conferma prima di avviare Steam quando lo spazio libero è inferiore a 10 GB.</string>
<string name="ctrl_layout">Layout</string>
@@ -2477,8 +2464,6 @@
<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_title_uncounted">Limite dei processi figli gestito da DroidDeck</string>
<string name="phantom_instructions_uncounted">DroidDeck esegue la maggior parte dei programmi della sessione in processi che Android non conteggia, così la sessione resta ben al di sotto del limite e le Opzioni sviluppatore possono restare disattivate. Steam e alcuni dei suoi processi di supporto vengono ancora conteggiati.</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>
@@ -4210,7 +4195,4 @@
<string name="steam_store_linux_build">Questo gioco installa la sua versione Linux. Installalo da Steam.</string>
<string name="game_zoom_title">Zoom del gioco</string>
<string name="game_zoom_hint">Regola l\'ingrandimento del gioco dal 100% al 300%</string>
<string name="glasses_shortcut_group">Scorciatoia nel gioco</string>
<string name="glasses_show_shortcut">Mostra scorciatoia Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Mostra il pulsante mobile Smart Glasses sopra il gioco.</string>
</resources>
-18
View File
@@ -644,9 +644,6 @@
<string name="perf_hostname">ホスト名</string>
<string name="perf_hostname_hint">Steamがこのデバイスを認識する名前。空にすると%1$sに戻ります。</string>
<string name="perf_hostname_invalid">英数字と中間のハイフンのみ使用でき、最大63文字です。</string>
<string name="perf_desktop_as_user">デスクトップをユーザーとして実行</string>
<string name="perf_desktop_as_user_hint">デスクトップとそのアプリやターミナルを root ではなく一般ユーザー deck として実行します。root を拒否するアプリ向けです。sudo は引き続き使えます。次回のデスクトップから適用されます。</string>
<string name="perf_desktop_as_user_needs_native">proot なしで実行が必要です。</string>
<string name="perf_phantom_warning">Androidがこのセッションを終了するように設定されています</string>
<string name="driver_installed">インストール済み</string>
<string name="driver_available">ダウンロード可能</string>
@@ -1316,16 +1313,6 @@
<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="setup_frosted_background">すりガラス</string>
<string name="setup_frosted_background_hint">ランチャーの背後に壁紙をぼかして表示します。バッテリーの消費が増えます。</string>
<string name="setup_frosted_wallpaper">すりガラスの壁紙</string>
<string name="setup_frosted_cards">すりガラスのカード</string>
<string name="setup_frosted_cards_hint">カードやグループから壁紙が少し透けて見えます。メニューとダイアログは不透明のままです。</string>
<string name="setup_frosted_cards_needs_wallpaper">すりガラスの壁紙が必要です。</string>
<string name="setup_frost_transparency">壁紙の透明度</string>
<string name="setup_frost_transparency_hint">壁紙がどれだけ透けて見えるか。</string>
<string name="setup_frost_card_transparency">カードの透明度</string>
<string name="setup_frost_card_transparency_hint">カード越しに壁紙がどれだけ透けて見えるか。</string>
<string name="setup_low_storage_warning">ストレージ残量が少ないときに警告する</string>
<string name="setup_low_storage_warning_hint">空き容量が 10 GB 未満のとき、Steam を起動する前に確認します。</string>
<string name="ctrl_layout">レイアウト</string>
@@ -2435,8 +2422,6 @@
<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_title_uncounted">子プロセスの制限は DroidDeck が対処します</string>
<string name="phantom_instructions_uncounted">DroidDeck はセッションのほとんどのプログラムを Android が数えないプロセスで実行するため、セッションは上限を大きく下回り、開発者向けオプションはオフのままでかまいません。Steam とその補助プロセスの一部は引き続き数えられます。</string>
<string name="phantom_fix_toggle">開発者向けオプションで「子プロセスの制限を無効化」をオンにし、その後も開発者向けオプションをオンのままにしてください。</string>
<string name="phantom_fix_no_toggle">このAndroidバージョンにはこのスイッチがありません。ワイヤレスデバッグを使って、このデバイスから変更してください。</string>
<string name="upd_block_no_apk">このビルドには、このDroidDeckコピー用のダウンロードがありません。</string>
@@ -4141,7 +4126,4 @@
<string name="steam_store_linux_build">このゲームは Linux 版をインストールします。Steam からインストールしてください。</string>
<string name="game_zoom_title">ゲームズーム</string>
<string name="game_zoom_hint">ゲームの拡大率を100%から300%の間で調整します</string>
<string name="glasses_shortcut_group">ゲーム内ショートカット</string>
<string name="glasses_show_shortcut">Smart Glasses のショートカットを表示</string>
<string name="glasses_show_shortcut_hint">ゲーム画面上に Smart Glasses のフローティングボタンを表示します。</string>
</resources>
-18
View File
@@ -644,9 +644,6 @@
<string name="perf_hostname">호스트 이름</string>
<string name="perf_hostname_hint">Steam이 이 기기를 인식하는 이름입니다. 비워 두면 %1$s(으)로 복원됩니다.</string>
<string name="perf_hostname_invalid">영문, 숫자 및 중간 하이픈만 사용할 수 있으며 최대 63자입니다.</string>
<string name="perf_desktop_as_user">데스크톱을 사용자로 실행</string>
<string name="perf_desktop_as_user_hint">데스크톱과 앱, 터미널이 root 대신 일반 사용자 deck으로 실행됩니다. root를 거부하는 앱을 위한 설정입니다. sudo는 계속 사용할 수 있습니다. 다음 데스크톱부터 적용됩니다.</string>
<string name="perf_desktop_as_user_needs_native">proot 없이 실행이 필요합니다.</string>
<string name="perf_phantom_warning">Android가 이 세션을 종료하도록 설정했습니다</string>
<string name="driver_installed">설치됨</string>
<string name="driver_available">다운로드 가능</string>
@@ -1316,16 +1313,6 @@
<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="setup_frosted_background">반투명</string>
<string name="setup_frosted_background_hint">런처 뒤에 배경화면을 흐리게 표시합니다. 배터리를 더 많이 사용합니다.</string>
<string name="setup_frosted_wallpaper">반투명 배경화면</string>
<string name="setup_frosted_cards">반투명 카드</string>
<string name="setup_frosted_cards_hint">카드와 그룹에 배경화면이 살짝 비쳐 보입니다. 메뉴와 대화상자는 불투명하게 유지됩니다.</string>
<string name="setup_frosted_cards_needs_wallpaper">반투명 배경화면이 필요합니다.</string>
<string name="setup_frost_transparency">배경화면 투명도</string>
<string name="setup_frost_transparency_hint">배경화면이 얼마나 비쳐 보이는지 정합니다.</string>
<string name="setup_frost_card_transparency">카드 투명도</string>
<string name="setup_frost_card_transparency_hint">카드 너머로 배경화면이 얼마나 비쳐 보이는지 정합니다.</string>
<string name="setup_low_storage_warning">저장 공간이 부족할 때 경고</string>
<string name="setup_low_storage_warning_hint">여유 공간이 10GB 미만이면 Steam을 시작하기 전에 확인합니다.</string>
<string name="ctrl_layout">레이아웃</string>
@@ -2435,8 +2422,6 @@
<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_title_uncounted">하위 프로세스 제한은 DroidDeck이 처리합니다</string>
<string name="phantom_instructions_uncounted">DroidDeck은 세션 프로그램 대부분을 Android가 세지 않는 프로세스에서 실행하므로 세션이 한도보다 훨씬 낮게 유지되어 개발자 옵션을 꺼 둔 채로 두어도 됩니다. Steam과 일부 보조 프로세스는 여전히 집계됩니다.</string>
<string name="phantom_fix_toggle">개발자 옵션에서 “하위 프로세스 제한 사용 중지”를 켜고, 이후에도 개발자 옵션을 켜 둔 상태로 유지하세요.</string>
<string name="phantom_fix_no_toggle">이 Android 버전에는 해당 스위치가 없습니다. 무선 디버깅을 사용하여 이 기기에서 변경하세요.</string>
<string name="upd_block_no_apk">이 빌드에는 이 DroidDeck 복사본용 다운로드가 없습니다.</string>
@@ -4141,7 +4126,4 @@
<string name="steam_store_linux_build">이 게임은 Linux 버전을 설치합니다. Steam에서 설치하세요.</string>
<string name="game_zoom_title">게임 확대</string>
<string name="game_zoom_hint">게임 확대율을 100%에서 300%까지 조정합니다</string>
<string name="glasses_shortcut_group">게임 내 바로가기</string>
<string name="glasses_show_shortcut">Smart Glasses 바로가기 표시</string>
<string name="glasses_show_shortcut_hint">게임 위에 떠 있는 Smart Glasses 버튼을 표시합니다.</string>
</resources>
-18
View File
@@ -644,9 +644,6 @@
<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_desktop_as_user">Desktop berjalan sebagai pengguna</string>
<string name="perf_desktop_as_user_hint">Desktop, aplnya dan terminalnya berjalan sebagai pengguna biasa deck dan bukan root, untuk apl yang menolak root. sudo masih berfungsi. Berkuat kuasa pada desktop seterusnya.</string>
<string name="perf_desktop_as_user_needs_native">Memerlukan Jalankan tanpa proot.</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>
@@ -1316,16 +1313,6 @@
<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="setup_frosted_background">Kabur</string>
<string name="setup_frosted_background_hint">Memaparkan kertas dinding anda yang dikaburkan di belakang pelancar. Menggunakan lebih banyak bateri.</string>
<string name="setup_frosted_wallpaper">Kertas dinding kabur</string>
<string name="setup_frosted_cards">Kad kabur</string>
<string name="setup_frosted_cards_hint">Kad dan kumpulan menampakkan sedikit kertas dinding. Menu dan dialog kekal padu.</string>
<string name="setup_frosted_cards_needs_wallpaper">Memerlukan kertas dinding kabur.</string>
<string name="setup_frost_transparency">Ketelusan kertas dinding</string>
<string name="setup_frost_transparency_hint">Berapa banyak kertas dinding yang kelihatan.</string>
<string name="setup_frost_card_transparency">Ketelusan kad</string>
<string name="setup_frost_card_transparency_hint">Berapa banyak kertas dinding yang kelihatan melalui kad.</string>
<string name="setup_low_storage_warning">Beri amaran apabila storan rendah</string>
<string name="setup_low_storage_warning_hint">Tanya sebelum memulakan Steam apabila ruang kosong kurang daripada 10 GB.</string>
<string name="ctrl_layout">Susun atur</string>
@@ -2435,8 +2422,6 @@
<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_title_uncounted">Had proses anak dikendalikan oleh DroidDeck</string>
<string name="phantom_instructions_uncounted">DroidDeck menjalankan kebanyakan program sesi dalam proses yang tidak dikira oleh Android, jadi sesi kekal jauh di bawah had dan Pilihan pembangun boleh kekal dimatikan. Steam dan sesetengah proses pembantunya masih dikira.</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>
@@ -4141,7 +4126,4 @@
<string name="steam_store_linux_build">Permainan ini memasang versi Linuxnya. Pasang daripada Steam.</string>
<string name="game_zoom_title">Zum permainan</string>
<string name="game_zoom_hint">Laraskan pembesaran permainan daripada 100% hingga 300%</string>
<string name="glasses_shortcut_group">Pintasan dalam permainan</string>
<string name="glasses_show_shortcut">Tunjukkan pintasan Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Tunjukkan butang Smart Glasses terapung di atas permainan.</string>
</resources>
-18
View File
@@ -646,9 +646,6 @@
<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_desktop_as_user">Skrivebordet kjører som bruker</string>
<string name="perf_desktop_as_user_hint">Skrivebordet, appene og terminalene kjører som den vanlige brukeren deck i stedet for root, for apper som avviser root. sudo virker fortsatt. Gjelder fra neste skrivebord.</string>
<string name="perf_desktop_as_user_needs_native">Krever Kjør uten proot.</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>
@@ -1322,16 +1319,6 @@
<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="setup_frosted_background">Matt</string>
<string name="setup_frosted_background_hint">Viser bakgrunnsbildet ditt uskarpt bak launcheren. Bruker mer batteri.</string>
<string name="setup_frosted_wallpaper">Matt bakgrunnsbilde</string>
<string name="setup_frosted_cards">Matte kort</string>
<string name="setup_frosted_cards_hint">Kort og grupper slipper litt av bakgrunnsbildet gjennom. Menyer og dialoger forblir heldekkende.</string>
<string name="setup_frosted_cards_needs_wallpaper">Krever matt bakgrunnsbilde.</string>
<string name="setup_frost_transparency">Bakgrunnens gjennomsiktighet</string>
<string name="setup_frost_transparency_hint">Hvor mye av bakgrunnsbildet som synes gjennom.</string>
<string name="setup_frost_card_transparency">Kortenes gjennomsiktighet</string>
<string name="setup_frost_card_transparency_hint">Hvor mye av bakgrunnsbildet som synes gjennom kortene.</string>
<string name="setup_low_storage_warning">Advar når lagringsplassen er lav</string>
<string name="setup_low_storage_warning_hint">Spør før Steam startes når ledig plass er under 10 GB.</string>
<string name="ctrl_layout">Oppsett</string>
@@ -2460,8 +2447,6 @@
<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_title_uncounted">DroidDeck håndterer grensen for underprosesser</string>
<string name="phantom_instructions_uncounted">DroidDeck kjører de fleste programmene i økten i prosesser som Android ikke teller med, så økten holder seg godt under grensen og utvikleralternativer kan forbli av. Steam og noen av hjelpeprosessene dens telles fortsatt.</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>
@@ -4171,7 +4156,4 @@
<string name="steam_store_linux_build">Dette spillet installerer Linux-versjonen sin. Installer det fra Steam.</string>
<string name="game_zoom_title">Spillzoom</string>
<string name="game_zoom_hint">Juster spillforstørrelsen fra 100 % til 300 %</string>
<string name="glasses_shortcut_group">Snarvei i spillet</string>
<string name="glasses_show_shortcut">Vis Smart Glasses-snarvei</string>
<string name="glasses_show_shortcut_hint">Vis den flytende Smart Glasses-knappen over spillet.</string>
</resources>
-18
View File
@@ -646,9 +646,6 @@
<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_desktop_as_user">Bureaublad draait als gebruiker</string>
<string name="perf_desktop_as_user_hint">Het bureaublad, de apps en terminals draaien als de gewone gebruiker deck in plaats van root, voor apps die root weigeren. sudo werkt nog steeds. Geldt vanaf het volgende bureaublad.</string>
<string name="perf_desktop_as_user_needs_native">Vereist Uitvoeren zonder proot.</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>
@@ -1322,16 +1319,6 @@
<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="setup_frosted_background">Matglas</string>
<string name="setup_frosted_background_hint">Toont je achtergrond wazig achter de launcher. Verbruikt meer batterij.</string>
<string name="setup_frosted_wallpaper">Matglazen achtergrond</string>
<string name="setup_frosted_cards">Matglazen kaarten</string>
<string name="setup_frosted_cards_hint">Kaarten en groepen laten iets van de achtergrond door. Menu’s en dialogen blijven dekkend.</string>
<string name="setup_frosted_cards_needs_wallpaper">Vereist de matglazen achtergrond.</string>
<string name="setup_frost_transparency">Transparantie van de achtergrond</string>
<string name="setup_frost_transparency_hint">Hoeveel van de achtergrond doorschijnt.</string>
<string name="setup_frost_card_transparency">Transparantie van de kaarten</string>
<string name="setup_frost_card_transparency_hint">Hoeveel van de achtergrond door de kaarten schijnt.</string>
<string name="setup_low_storage_warning">Waarschuwen bij weinig opslagruimte</string>
<string name="setup_low_storage_warning_hint">Vragen voordat Steam start als er minder dan 10 GB vrij is.</string>
<string name="ctrl_layout">Indeling</string>
@@ -2460,8 +2447,6 @@
<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_title_uncounted">Limiet voor onderliggende processen geregeld door DroidDeck</string>
<string name="phantom_instructions_uncounted">DroidDeck voert de meeste programma\'s van de sessie uit in processen die Android niet meetelt, zodat de sessie ruim onder de limiet blijft en Ontwikkelaarsopties uit kunnen blijven. Steam en enkele van zijn hulpprocessen tellen nog wel mee.</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>
@@ -4171,7 +4156,4 @@
<string name="steam_store_linux_build">Deze game installeert zijn Linux-versie. Installeer hem via Steam.</string>
<string name="game_zoom_title">Gamezoom</string>
<string name="game_zoom_hint">Pas de spelvergroting aan van 100% tot 300%</string>
<string name="glasses_shortcut_group">Snelkoppeling in game</string>
<string name="glasses_show_shortcut">Smart Glasses-snelkoppeling tonen</string>
<string name="glasses_show_shortcut_hint">Toon de zwevende Smart Glasses-knop boven het spel.</string>
</resources>
-18
View File
@@ -650,9 +650,6 @@
<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_desktop_as_user">Pulpit działa jako użytkownik</string>
<string name="perf_desktop_as_user_hint">Pulpit, jego aplikacje i terminale działają jako zwykły użytkownik deck zamiast root, dla aplikacji, które odrzucają root. sudo nadal działa. Obowiązuje od następnego pulpitu.</string>
<string name="perf_desktop_as_user_needs_native">Wymaga Uruchamiaj bez proot.</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>
@@ -1336,16 +1333,6 @@
<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="setup_frosted_background">Matowe</string>
<string name="setup_frosted_background_hint">Pokazuje rozmytą tapetę za aplikacją. Zużywa więcej baterii.</string>
<string name="setup_frosted_wallpaper">Matowa tapeta</string>
<string name="setup_frosted_cards">Matowe karty</string>
<string name="setup_frosted_cards_hint">Karty i grupy przepuszczają trochę tapety. Menu i okna dialogowe pozostają nieprzezroczyste.</string>
<string name="setup_frosted_cards_needs_wallpaper">Wymaga matowej tapety.</string>
<string name="setup_frost_transparency">Przezroczystość tapety</string>
<string name="setup_frost_transparency_hint">Ile tapety prześwituje.</string>
<string name="setup_frost_card_transparency">Przezroczystość kart</string>
<string name="setup_frost_card_transparency_hint">Ile tapety prześwituje przez karty.</string>
<string name="setup_low_storage_warning">Ostrzegaj o małej ilości miejsca</string>
<string name="setup_low_storage_warning_hint">Pytaj przed uruchomieniem Steam, gdy wolne miejsce wynosi mniej niż 10 GB.</string>
<string name="ctrl_layout">Układ</string>
@@ -2512,8 +2499,6 @@
<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_title_uncounted">Limitem procesów podrzędnych zajmuje się DroidDeck</string>
<string name="phantom_instructions_uncounted">DroidDeck uruchamia większość programów sesji w procesach, których Android nie liczy, dzięki czemu sesja pozostaje znacznie poniżej limitu, a Opcje programisty mogą pozostać wyłączone. Steam i niektóre jego procesy pomocnicze nadal są liczone.</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>
@@ -4251,7 +4236,4 @@
<string name="steam_store_linux_build">Ta gra instaluje swoją wersję dla Linuksa. Zainstaluj ją ze Steama.</string>
<string name="game_zoom_title">Powiększenie gry</string>
<string name="game_zoom_hint">Dostosuj powiększenie gry w zakresie od 100% do 300%</string>
<string name="glasses_shortcut_group">Skrót w grze</string>
<string name="glasses_show_shortcut">Pokaż skrót Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Pokaż pływający przycisk Smart Glasses nad grą.</string>
</resources>
@@ -648,9 +648,6 @@
<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_desktop_as_user">O ambiente de trabalho corre como utilizador</string>
<string name="perf_desktop_as_user_hint">O ambiente de trabalho, as suas apps e terminais correm como o utilizador comum deck em vez de root, para apps que recusam root. O sudo continua a funcionar. Aplica-se ao próximo ambiente de trabalho.</string>
<string name="perf_desktop_as_user_needs_native">Requer Executar sem proot.</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>
@@ -1320,16 +1317,6 @@
<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="setup_frosted_background">Fosco</string>
<string name="setup_frosted_background_hint">Mostra a imagem de fundo desfocada atrás do iniciador. Gasta mais bateria.</string>
<string name="setup_frosted_wallpaper">Fundo fosco</string>
<string name="setup_frosted_cards">Cartões foscos</string>
<string name="setup_frosted_cards_hint">Os cartões e grupos deixam ver um pouco do fundo. Os menus e caixas de diálogo continuam opacos.</string>
<string name="setup_frosted_cards_needs_wallpaper">Requer o fundo fosco.</string>
<string name="setup_frost_transparency">Transparência do fundo</string>
<string name="setup_frost_transparency_hint">Quanto do fundo se vê através.</string>
<string name="setup_frost_card_transparency">Transparência dos cartões</string>
<string name="setup_frost_card_transparency_hint">Quanto do fundo se vê através dos cartões.</string>
<string name="setup_low_storage_warning">Avisar quando o armazenamento estiver baixo</string>
<string name="setup_low_storage_warning_hint">Perguntar antes de iniciar o Steam quando o espaço livre for inferior a 10 GB.</string>
<string name="ctrl_layout">Esquema</string>
@@ -2492,8 +2479,6 @@
<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_title_uncounted">Limite de processos filhos gerido pelo DroidDeck</string>
<string name="phantom_instructions_uncounted">O DroidDeck executa a maioria dos programas da sessão em processos que o Android não conta, o que mantém a sessão bem abaixo do limite, por isso as Opções de programador podem continuar desativadas. O Steam e alguns dos seus processos auxiliares continuam a contar.</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>
@@ -4210,7 +4195,4 @@
<string name="steam_store_linux_build">Este jogo instala a sua versão para Linux. Instale-o a partir do Steam.</string>
<string name="game_zoom_title">Zoom do jogo</string>
<string name="game_zoom_hint">Ajuste a ampliação do jogo de 100% a 300%</string>
<string name="glasses_shortcut_group">Atalho no jogo</string>
<string name="glasses_show_shortcut">Mostrar atalho do Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Mostrar o botão flutuante do Smart Glasses sobre o jogo.</string>
</resources>
-18
View File
@@ -648,9 +648,6 @@
<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_desktop_as_user">A área de trabalho roda como usuário</string>
<string name="perf_desktop_as_user_hint">A área de trabalho, seus apps e terminais rodam como o usuário comum deck em vez de root, para apps que recusam root. O sudo continua funcionando. Vale a partir da próxima área de trabalho.</string>
<string name="perf_desktop_as_user_needs_native">Requer Executar sem proot.</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>
@@ -1328,16 +1325,6 @@
<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="setup_frosted_background">Fosco</string>
<string name="setup_frosted_background_hint">Mostra seu papel de parede desfocado atrás do inicializador. Usa mais bateria.</string>
<string name="setup_frosted_wallpaper">Papel de parede fosco</string>
<string name="setup_frosted_cards">Cartões foscos</string>
<string name="setup_frosted_cards_hint">Cartões e grupos deixam ver um pouco do papel de parede. Menus e caixas de diálogo continuam opacos.</string>
<string name="setup_frosted_cards_needs_wallpaper">Requer o papel de parede fosco.</string>
<string name="setup_frost_transparency">Transparência do papel de parede</string>
<string name="setup_frost_transparency_hint">Quanto do papel de parede aparece.</string>
<string name="setup_frost_card_transparency">Transparência dos cartões</string>
<string name="setup_frost_card_transparency_hint">Quanto do papel de parede aparece através dos cartões.</string>
<string name="setup_low_storage_warning">Avisar quando o armazenamento estiver baixo</string>
<string name="setup_low_storage_warning_hint">Perguntar antes de iniciar o Steam quando o espaço livre for inferior a 10 GB.</string>
<string name="ctrl_layout">Layout</string>
@@ -2500,8 +2487,6 @@
<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_title_uncounted">Limite de processos filhos gerenciado pelo DroidDeck</string>
<string name="phantom_instructions_uncounted">O DroidDeck executa a maioria dos programas da sessão em processos que o Android não conta, o que mantém a sessão bem abaixo do limite, então as Opções do desenvolvedor podem continuar desativadas. O Steam e alguns dos seus processos auxiliares ainda contam.</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>
@@ -4218,7 +4203,4 @@
<string name="steam_store_close_steam">Feche o Steam primeiro</string>
<string name="steam_store_session_wait">Pause o download do Steam primeiro</string>
<string name="steam_store_linux_build">Este jogo instala sua versão para Linux. Instale-o pelo Steam.</string>
<string name="glasses_shortcut_group">Atalho durante o jogo</string>
<string name="glasses_show_shortcut">Mostrar atalho do Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Mostrar o botão flutuante do Smart Glasses sobre o jogo.</string>
</resources>
-18
View File
@@ -648,9 +648,6 @@
<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_desktop_as_user">Desktopul rulează ca utilizator</string>
<string name="perf_desktop_as_user_hint">Desktopul, aplicațiile și terminalele sale rulează ca utilizatorul obișnuit deck în loc de root, pentru aplicațiile care refuză root. sudo funcționează în continuare. Se aplică la următorul desktop.</string>
<string name="perf_desktop_as_user_needs_native">Necesită Rulează fără proot.</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>
@@ -1329,16 +1326,6 @@
<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="setup_frosted_background">Mat</string>
<string name="setup_frosted_background_hint">Afișează imaginea de fundal estompată în spatele launcherului. Consumă mai multă baterie.</string>
<string name="setup_frosted_wallpaper">Imagine de fundal mată</string>
<string name="setup_frosted_cards">Carduri mate</string>
<string name="setup_frosted_cards_hint">Cardurile și grupurile lasă să se vadă puțin din imaginea de fundal. Meniurile și dialogurile rămân opace.</string>
<string name="setup_frosted_cards_needs_wallpaper">Necesită imaginea de fundal mată.</string>
<string name="setup_frost_transparency">Transparența imaginii de fundal</string>
<string name="setup_frost_transparency_hint">Cât din imaginea de fundal se vede.</string>
<string name="setup_frost_card_transparency">Transparența cardurilor</string>
<string name="setup_frost_card_transparency_hint">Cât din imaginea de fundal se vede prin carduri.</string>
<string name="setup_low_storage_warning">Avertizează când spațiul de stocare este redus</string>
<string name="setup_low_storage_warning_hint">Întreabă înainte de pornirea Steam când spațiul liber este sub 10 GB.</string>
<string name="ctrl_layout">Aranjament</string>
@@ -2486,8 +2473,6 @@
<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_title_uncounted">Limita proceselor copil este gestionată de DroidDeck</string>
<string name="phantom_instructions_uncounted">DroidDeck rulează majoritatea programelor sesiunii în procese pe care Android nu le numără, astfel încât sesiunea rămâne mult sub limită, iar Opțiunile pentru dezvoltatori pot rămâne dezactivate. Steam și unele dintre procesele sale auxiliare sunt încă numărate.</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>
@@ -4211,7 +4196,4 @@
<string name="steam_store_linux_build">Acest joc își instalează versiunea pentru Linux. Instalează-l din Steam.</string>
<string name="game_zoom_title">Zoom joc</string>
<string name="game_zoom_hint">Reglați mărirea jocului între 100% și 300%</string>
<string name="glasses_shortcut_group">Comandă rapidă în joc</string>
<string name="glasses_show_shortcut">Afișează comanda rapidă Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Afișează butonul plutitor Smart Glasses peste joc.</string>
</resources>
-18
View File
@@ -650,9 +650,6 @@
<string name="perf_hostname">Имя хоста</string>
<string name="perf_hostname_hint">Имя, под которым Steam видит это устройство. Оставьте пустым, чтобы вернуть %1$s.</string>
<string name="perf_hostname_invalid">Только буквы, цифры и дефисы посередине, до 63 символов.</string>
<string name="perf_desktop_as_user">Рабочий стол от имени пользователя</string>
<string name="perf_desktop_as_user_hint">Рабочий стол, его приложения и терминалы работают от имени обычного пользователя deck вместо root — для приложений, которые отказываются работать от root. sudo по-прежнему работает. Применяется к следующему запуску рабочего стола.</string>
<string name="perf_desktop_as_user_needs_native">Требуется «Запуск без proot».</string>
<string name="perf_phantom_warning">Android настроен на завершение этой сессии</string>
<string name="driver_installed">Установлен</string>
<string name="driver_available">Доступен для скачивания</string>
@@ -1336,16 +1333,6 @@
<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="setup_frosted_background">Матовое стекло</string>
<string name="setup_frosted_background_hint">Показывает размытые обои за лаунчером. Расходует больше заряда.</string>
<string name="setup_frosted_wallpaper">Матовые обои</string>
<string name="setup_frosted_cards">Матовые карточки</string>
<string name="setup_frosted_cards_hint">Сквозь карточки и группы немного просвечивают обои. Меню и диалоги остаются непрозрачными.</string>
<string name="setup_frosted_cards_needs_wallpaper">Нужны матовые обои.</string>
<string name="setup_frost_transparency">Прозрачность обоев</string>
<string name="setup_frost_transparency_hint">Насколько просвечивают обои.</string>
<string name="setup_frost_card_transparency">Прозрачность карточек</string>
<string name="setup_frost_card_transparency_hint">Насколько обои просвечивают сквозь карточки.</string>
<string name="setup_low_storage_warning">Предупреждать о нехватке места</string>
<string name="setup_low_storage_warning_hint">Спрашивать перед запуском Steam, если свободно меньше 10 ГБ.</string>
<string name="ctrl_layout">Раскладка</string>
@@ -2513,8 +2500,6 @@
<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_title_uncounted">Ограничение дочерних процессов обходит DroidDeck</string>
<string name="phantom_instructions_uncounted">DroidDeck запускает большинство программ сеанса в процессах, которые Android не учитывает, поэтому сеанс остаётся намного ниже лимита и параметры разработчика можно не включать. Steam и некоторые его вспомогательные процессы по-прежнему учитываются.</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>
@@ -4252,7 +4237,4 @@
<string name="steam_store_linux_build">Эта игра устанавливает свою версию для Linux. Установите её из Steam.</string>
<string name="game_zoom_title">Масштаб игры</string>
<string name="game_zoom_hint">Настройте увеличение игры от 100% до 300%</string>
<string name="glasses_shortcut_group">Ярлык в игре</string>
<string name="glasses_show_shortcut">Показывать ярлык Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Показывать плавающую кнопку Smart Glasses поверх игры.</string>
</resources>
-18
View File
@@ -646,9 +646,6 @@
<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_desktop_as_user">Skrivbordet körs som användare</string>
<string name="perf_desktop_as_user_hint">Skrivbordet, dess appar och terminaler körs som den vanliga användaren deck i stället för root, för appar som vägrar root. sudo fungerar fortfarande. Gäller från nästa skrivbord.</string>
<string name="perf_desktop_as_user_needs_native">Kräver Kör utan proot.</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>
@@ -1322,16 +1319,6 @@
<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="setup_frosted_background">Frostat</string>
<string name="setup_frosted_background_hint">Visar din bakgrundsbild suddig bakom startprogrammet. Drar mer batteri.</string>
<string name="setup_frosted_wallpaper">Frostad bakgrundsbild</string>
<string name="setup_frosted_cards">Frostade kort</string>
<string name="setup_frosted_cards_hint">Kort och grupper släpper igenom lite av bakgrundsbilden. Menyer och dialogrutor förblir täckande.</string>
<string name="setup_frosted_cards_needs_wallpaper">Kräver frostad bakgrundsbild.</string>
<string name="setup_frost_transparency">Bakgrundsbildens genomskinlighet</string>
<string name="setup_frost_transparency_hint">Hur mycket av bakgrundsbilden som syns igenom.</string>
<string name="setup_frost_card_transparency">Kortens genomskinlighet</string>
<string name="setup_frost_card_transparency_hint">Hur mycket av bakgrundsbilden som syns genom korten.</string>
<string name="setup_low_storage_warning">Varna när lagringsutrymmet är lågt</string>
<string name="setup_low_storage_warning_hint">Fråga innan Steam startas när det lediga utrymmet är under 10 GB.</string>
<string name="ctrl_layout">Layout</string>
@@ -2460,8 +2447,6 @@
<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_title_uncounted">DroidDeck hanterar gränsen för underprocesser</string>
<string name="phantom_instructions_uncounted">DroidDeck kör de flesta av sessionens program i processer som Android inte räknar, så sessionen håller sig långt under gränsen och Utvecklaralternativ kan vara avstängda. Steam och några av dess hjälpprocesser räknas fortfarande.</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>
@@ -4171,7 +4156,4 @@
<string name="steam_store_linux_build">Det här spelet installerar sin Linux-version. Installera det från Steam.</string>
<string name="game_zoom_title">Spelzoom</string>
<string name="game_zoom_hint">Justera spelförstoringen från 100 % till 300 %</string>
<string name="glasses_shortcut_group">Genväg i spelet</string>
<string name="glasses_show_shortcut">Visa Smart Glasses-genväg</string>
<string name="glasses_show_shortcut_hint">Visa den flytande Smart Glasses-knappen ovanpå spelet.</string>
</resources>
-18
View File
@@ -644,9 +644,6 @@
<string name="perf_hostname">ชื่อโฮสต์</string>
<string name="perf_hostname_hint">ชื่อที่ Steam มองเห็นสำหรับอุปกรณ์นี้ เว้นว่างไว้เพื่อคืนค่าเป็น %1$s</string>
<string name="perf_hostname_invalid">ใช้ได้เฉพาะตัวอักษร ตัวเลข และยัติภังค์ตรงกลาง ไม่เกิน 63 ตัวอักษร</string>
<string name="perf_desktop_as_user">เดสก์ท็อปทำงานในฐานะผู้ใช้</string>
<string name="perf_desktop_as_user_hint">เดสก์ท็อป แอป และเทอร์มินัลจะทำงานในฐานะผู้ใช้ทั่วไป deck แทน root สำหรับแอปที่ไม่ยอมทำงานด้วย root sudo ยังใช้งานได้ มีผลกับเดสก์ท็อปครั้งถัดไป</string>
<string name="perf_desktop_as_user_needs_native">ต้องเปิด เรียกใช้โดยไม่มี proot</string>
<string name="perf_phantom_warning">Android ถูกตั้งให้ปิดเซสชันนี้</string>
<string name="driver_installed">ติดตั้งแล้ว</string>
<string name="driver_available">พร้อมดาวน์โหลด</string>
@@ -1316,16 +1313,6 @@
<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="setup_frosted_background">แบบฝ้า</string>
<string name="setup_frosted_background_hint">แสดงวอลเปเปอร์แบบเบลอไว้ด้านหลังตัวเปิดแอป ใช้แบตเตอรี่มากขึ้น</string>
<string name="setup_frosted_wallpaper">วอลเปเปอร์แบบฝ้า</string>
<string name="setup_frosted_cards">การ์ดแบบฝ้า</string>
<string name="setup_frosted_cards_hint">การ์ดและกลุ่มจะเห็นวอลเปเปอร์เล็กน้อย เมนูและกล่องโต้ตอบยังคงทึบ</string>
<string name="setup_frosted_cards_needs_wallpaper">ต้องเปิดวอลเปเปอร์แบบฝ้า</string>
<string name="setup_frost_transparency">ความโปร่งใสของวอลเปเปอร์</string>
<string name="setup_frost_transparency_hint">ปริมาณวอลเปเปอร์ที่มองทะลุได้</string>
<string name="setup_frost_card_transparency">ความโปร่งใสของการ์ด</string>
<string name="setup_frost_card_transparency_hint">ปริมาณวอลเปเปอร์ที่มองทะลุการ์ดได้</string>
<string name="setup_low_storage_warning">เตือนเมื่อพื้นที่เก็บข้อมูลเหลือน้อย</string>
<string name="setup_low_storage_warning_hint">ถามก่อนเริ่ม Steam เมื่อพื้นที่ว่างน้อยกว่า 10 GB</string>
<string name="ctrl_layout">การจัดวาง</string>
@@ -2435,8 +2422,6 @@
<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_title_uncounted">DroidDeck จัดการขีดจำกัดโปรเซสลูกให้</string>
<string name="phantom_instructions_uncounted">DroidDeck เรียกใช้โปรแกรมส่วนใหญ่ของเซสชันในโปรเซสที่ Android ไม่นับ เซสชันจึงต่ำกว่าขีดจำกัดมาก และปิดตัวเลือกสำหรับนักพัฒนาซอฟต์แวร์ไว้ได้ Steam และโปรเซสตัวช่วยบางตัวของ Steam ยังคงถูกนับ</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>
@@ -4141,7 +4126,4 @@
<string name="steam_store_linux_build">เกมนี้ติดตั้งเวอร์ชัน Linux ของตัวเอง ให้ติดตั้งจาก Steam</string>
<string name="game_zoom_title">ซูมเกม</string>
<string name="game_zoom_hint">ปรับการขยายเกมตั้งแต่ 100% ถึง 300%</string>
<string name="glasses_shortcut_group">ทางลัดในเกม</string>
<string name="glasses_show_shortcut">แสดงทางลัด Smart Glasses</string>
<string name="glasses_show_shortcut_hint">แสดงปุ่ม Smart Glasses แบบลอยทับบนเกม</string>
</resources>
-18
View File
@@ -646,9 +646,6 @@
<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_desktop_as_user">Masaüstü kullanıcı olarak çalışır</string>
<string name="perf_desktop_as_user_hint">Masaüstü, uygulamaları ve terminalleri root yerine sıradan kullanıcı deck olarak çalışır; root’u reddeden uygulamalar içindir. sudo çalışmaya devam eder. Bir sonraki masaüstünde geçerli olur.</string>
<string name="perf_desktop_as_user_needs_native">proot olmadan çalıştır gerekir.</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>
@@ -1314,16 +1311,6 @@
<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="setup_frosted_background">Buzlu</string>
<string name="setup_frosted_background_hint">Duvar kâğıdınızı başlatıcının arkasında bulanık gösterir. Daha fazla pil kullanır.</string>
<string name="setup_frosted_wallpaper">Buzlu duvar kâğıdı</string>
<string name="setup_frosted_cards">Buzlu kartlar</string>
<string name="setup_frosted_cards_hint">Kartlar ve gruplar duvar kâğıdının bir kısmını gösterir. Menüler ve iletişim kutuları opak kalır.</string>
<string name="setup_frosted_cards_needs_wallpaper">Buzlu duvar kâğıdı gerekir.</string>
<string name="setup_frost_transparency">Duvar kâğıdı saydamlığı</string>
<string name="setup_frost_transparency_hint">Duvar kâğıdının ne kadar göründüğü.</string>
<string name="setup_frost_card_transparency">Kart saydamlığı</string>
<string name="setup_frost_card_transparency_hint">Duvar kâğıdının kartların ardından ne kadar göründüğü.</string>
<string name="setup_low_storage_warning">Depolama azaldığında uyar</string>
<string name="setup_low_storage_warning_hint">Boş alan 10 GB\'ın altındayken Steam\'i başlatmadan önce sor.</string>
<string name="ctrl_layout">Düzen</string>
@@ -2452,8 +2439,6 @@
<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_title_uncounted">Alt işlem sınırını DroidDeck yönetiyor</string>
<string name="phantom_instructions_uncounted">DroidDeck oturumun programlarının çoğunu Android\'in saymadığı işlemlerde çalıştırır; böylece oturum sınırın çok altında kalır ve Geliştirici seçenekleri kapalı kalabilir. Steam ve bazı yardımcı işlemleri hâlâ sayılır.</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>
@@ -4171,7 +4156,4 @@
<string name="steam_store_linux_build">Bu oyun Linux sürümünü yükler. Steam\'den yükleyin.</string>
<string name="game_zoom_title">Oyun yakınlaştırma</string>
<string name="game_zoom_hint">Oyun yakınlaştırmasını %100 ile %300 arasında ayarlayın</string>
<string name="glasses_shortcut_group">Oyun içi kısayol</string>
<string name="glasses_show_shortcut">Smart Glasses kısayolunu göster</string>
<string name="glasses_show_shortcut_hint">Oyun üzerinde yüzen Smart Glasses düğmesini göster.</string>
</resources>
-18
View File
@@ -650,9 +650,6 @@
<string name="perf_hostname">Ім’я хоста</string>
<string name="perf_hostname_hint">Ім’я, яке Steam бачить для цього пристрою. Порожнє значення відновлює %1$s.</string>
<string name="perf_hostname_invalid">Лише літери, цифри та дефіси всередині, до 63 символів.</string>
<string name="perf_desktop_as_user">Робочий стіл від імені користувача</string>
<string name="perf_desktop_as_user_hint">Робочий стіл, його застосунки й термінали працюють від імені звичайного користувача deck замість root — для застосунків, які відмовляються працювати від root. sudo і далі працює. Застосовується до наступного запуску робочого столу.</string>
<string name="perf_desktop_as_user_needs_native">Потрібен «Запуск без proot».</string>
<string name="perf_phantom_warning">Android налаштовано завершувати цей сеанс</string>
<string name="driver_installed">Встановлено</string>
<string name="driver_available">Доступно для завантаження</string>
@@ -1336,16 +1333,6 @@
<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="setup_frosted_background">Матове скло</string>
<string name="setup_frosted_background_hint">Показує розмиті шпалери за лаунчером. Витрачає більше заряду.</string>
<string name="setup_frosted_wallpaper">Матові шпалери</string>
<string name="setup_frosted_cards">Матові картки</string>
<string name="setup_frosted_cards_hint">Крізь картки та групи трохи просвічують шпалери. Меню й діалоги лишаються непрозорими.</string>
<string name="setup_frosted_cards_needs_wallpaper">Потрібні матові шпалери.</string>
<string name="setup_frost_transparency">Прозорість шпалер</string>
<string name="setup_frost_transparency_hint">Наскільки просвічують шпалери.</string>
<string name="setup_frost_card_transparency">Прозорість карток</string>
<string name="setup_frost_card_transparency_hint">Наскільки шпалери просвічують крізь картки.</string>
<string name="setup_low_storage_warning">Попереджати про брак місця</string>
<string name="setup_low_storage_warning_hint">Питати перед запуском Steam, якщо вільно менше 10 ГБ.</string>
<string name="ctrl_layout">Розкладка</string>
@@ -2512,8 +2499,6 @@
<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_title_uncounted">Обмеження дочірніх процесів обходить DroidDeck</string>
<string name="phantom_instructions_uncounted">DroidDeck запускає більшість програм сеансу в процесах, які Android не враховує, тож сеанс залишається значно нижче ліміту і параметри розробника можна не вмикати. Steam і деякі його допоміжні процеси все ще враховуються.</string>
<string name="phantom_fix_toggle">Увімкніть «Вимкнути обмеження для дочірніх процесів» у розділі «Параметри розробника» і залишіть «Параметри розробника» увімкненими після цього.</string>
<string name="phantom_fix_no_toggle">У цій версії Android немає перемикача для цього. Змініть це з цього пристрою за допомогою бездротового налагодження.</string>
<string name="upd_block_no_apk">У цій збірці немає завантаження для цієї копії DroidDeck.</string>
@@ -4251,7 +4236,4 @@
<string name="steam_store_linux_build">Ця гра встановлює свою версію для Linux. Установіть її зі Steam.</string>
<string name="game_zoom_title">Масштаб гри</string>
<string name="game_zoom_hint">Налаштуйте збільшення гри від 100% до 300%</string>
<string name="glasses_shortcut_group">Ярлик у грі</string>
<string name="glasses_show_shortcut">Показувати ярлик Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Показувати плаваючу кнопку Smart Glasses поверх гри.</string>
</resources>
-18
View File
@@ -644,9 +644,6 @@
<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_desktop_as_user">Màn hình nền chạy dưới dạng người dùng</string>
<string name="perf_desktop_as_user_hint">Màn hình nền, các ứng dụng và terminal của nó chạy dưới người dùng thường deck thay vì root, cho các ứng dụng từ chối root. sudo vẫn hoạt động. Áp dụng cho lần mở màn hình nền tiếp theo.</string>
<string name="perf_desktop_as_user_needs_native">Cần bật Chạy không cần proot.</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>
@@ -1316,16 +1313,6 @@
<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="setup_frosted_background">Mờ</string>
<string name="setup_frosted_background_hint">Hiển thị hình nền được làm mờ phía sau launcher. Tốn pin hơn.</string>
<string name="setup_frosted_wallpaper">Hình nền mờ</string>
<string name="setup_frosted_cards">Thẻ mờ</string>
<string name="setup_frosted_cards_hint">Thẻ và nhóm để lộ một chút hình nền. Menu và hộp thoại vẫn đặc.</string>
<string name="setup_frosted_cards_needs_wallpaper">Cần bật Hình nền mờ.</string>
<string name="setup_frost_transparency">Độ trong suốt của hình nền</string>
<string name="setup_frost_transparency_hint">Mức hình nền hiện qua.</string>
<string name="setup_frost_card_transparency">Độ trong suốt của thẻ</string>
<string name="setup_frost_card_transparency_hint">Mức hình nền hiện qua các thẻ.</string>
<string name="setup_low_storage_warning">Cảnh báo khi dung lượng lưu trữ thấp</string>
<string name="setup_low_storage_warning_hint">Hỏi trước khi khởi động Steam khi dung lượng trống dưới 10 GB.</string>
<string name="ctrl_layout">Bố cục</string>
@@ -2435,8 +2422,6 @@
<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_title_uncounted">DroidDeck xử lý giới hạn tiến trình con</string>
<string name="phantom_instructions_uncounted">DroidDeck chạy hầu hết các chương trình của phiên trong những tiến trình mà Android không tính, nên phiên luôn ở dưới giới hạn khá xa và có thể để tắt Tùy chọn cho nhà phát triển. Steam và một số tiến trình phụ trợ của nó vẫn được tính.</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>
@@ -4141,7 +4126,4 @@
<string name="steam_store_linux_build">Trò chơi này cài bản dành cho Linux. Hãy cài từ Steam.</string>
<string name="game_zoom_title">Thu phóng trò chơi</string>
<string name="game_zoom_hint">Điều chỉnh độ phóng đại trò chơi từ 100% đến 300%</string>
<string name="glasses_shortcut_group">Lối tắt trong trò chơi</string>
<string name="glasses_show_shortcut">Hiển thị lối tắt Smart Glasses</string>
<string name="glasses_show_shortcut_hint">Hiển thị nút Smart Glasses nổi phía trên trò chơi.</string>
</resources>
@@ -644,9 +644,6 @@
<string name="perf_hostname">主机名</string>
<string name="perf_hostname_hint">Steam 看到的本设备名称。留空恢复为 %1$s。</string>
<string name="perf_hostname_invalid">仅限字母、数字,连字符只能位于中间,最多 63 个字符。</string>
<string name="perf_desktop_as_user">桌面以普通用户运行</string>
<string name="perf_desktop_as_user_hint">桌面及其应用和终端以普通用户 deck 而非 root 运行,适用于拒绝以 root 运行的应用。sudo 仍可使用。下次启动桌面时生效。</string>
<string name="perf_desktop_as_user_needs_native">需要开启“不使用 proot 运行”。</string>
<string name="perf_phantom_warning">Android 将会终止此会话</string>
<string name="driver_installed">已安装</string>
<string name="driver_available">可下载</string>
@@ -1399,16 +1396,6 @@
<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="setup_frosted_background">毛玻璃</string>
<string name="setup_frosted_background_hint">在启动器后方显示模糊的壁纸。耗电更多。</string>
<string name="setup_frosted_wallpaper">毛玻璃壁纸</string>
<string name="setup_frosted_cards">毛玻璃卡片</string>
<string name="setup_frosted_cards_hint">卡片和分组会透出少许壁纸。菜单和对话框保持不透明。</string>
<string name="setup_frosted_cards_needs_wallpaper">需要开启毛玻璃壁纸。</string>
<string name="setup_frost_transparency">壁纸透明度</string>
<string name="setup_frost_transparency_hint">壁纸透出的程度。</string>
<string name="setup_frost_card_transparency">卡片透明度</string>
<string name="setup_frost_card_transparency_hint">卡片透出壁纸的程度。</string>
<string name="setup_low_storage_warning">存储空间不足时提醒</string>
<string name="setup_low_storage_warning_hint">可用空间不足 10 GB 时,启动 Steam 前先询问。</string>
<string name="ctrl_layout">布局</string>
@@ -2512,8 +2499,6 @@
<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_title_uncounted">子进程限制由 DroidDeck 处理</string>
<string name="phantom_instructions_uncounted">DroidDeck 在 Android 不计数的进程中运行大部分会话程序,使会话远低于上限,因此开发者选项可以保持关闭。Steam 及其部分辅助进程仍会被计数。</string>
<string name="phantom_fix_toggle">在开发者选项中打开“停止限制子进程”,之后请保持开发者选项开启。</string>
<string name="phantom_fix_no_toggle">此 Android 版本没有该开关。请使用无线调试在此设备上更改。</string>
<string name="upd_block_no_apk">此构建没有适用于此 DroidDeck 副本的下载。</string>
@@ -4139,7 +4124,4 @@
<string name="steam_store_close_steam">请先关闭 Steam</string>
<string name="steam_store_session_wait">请先暂停 Steam 下载</string>
<string name="steam_store_linux_build">此游戏会安装其 Linux 版本。请通过 Steam 安装。</string>
<string name="glasses_shortcut_group">游戏内快捷方式</string>
<string name="glasses_show_shortcut">显示 Smart Glasses 快捷方式</string>
<string name="glasses_show_shortcut_hint">在游戏画面上显示悬浮的 Smart Glasses 按钮。</string>
</resources>
@@ -644,9 +644,6 @@
<string name="perf_hostname">主機名稱</string>
<string name="perf_hostname_hint">Steam 看到的此裝置名稱。留空則還原為 %1$s。</string>
<string name="perf_hostname_invalid">只可使用字母、數字和中間的連字號,最多 63 個字元。</string>
<string name="perf_desktop_as_user">桌面以普通用戶執行</string>
<string name="perf_desktop_as_user_hint">桌面及其應用程式和終端機會以普通用戶 deck 而非 root 執行,適用於拒絕以 root 執行的應用程式。sudo 仍可使用。下次開啟桌面時生效。</string>
<string name="perf_desktop_as_user_needs_native">需要開啟「不使用 proot 執行」。</string>
<string name="perf_phantom_warning">Android 已設定為終止此會話</string>
<string name="driver_installed">已安裝</string>
<string name="driver_available">可供下載</string>
@@ -1315,16 +1312,6 @@
<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="setup_frosted_background">毛玻璃</string>
<string name="setup_frosted_background_hint">在啟動器後方顯示模糊的桌布。耗電較多。</string>
<string name="setup_frosted_wallpaper">毛玻璃桌布</string>
<string name="setup_frosted_cards">毛玻璃卡片</string>
<string name="setup_frosted_cards_hint">卡片和群組會透出少許桌布。選單和對話框保持不透明。</string>
<string name="setup_frosted_cards_needs_wallpaper">需要開啟毛玻璃桌布。</string>
<string name="setup_frost_transparency">桌布透明度</string>
<string name="setup_frost_transparency_hint">桌布透出的程度。</string>
<string name="setup_frost_card_transparency">卡片透明度</string>
<string name="setup_frost_card_transparency_hint">卡片透出桌布的程度。</string>
<string name="setup_low_storage_warning">儲存空間不足時提醒</string>
<string name="setup_low_storage_warning_hint">可用空間少於 10 GB 時,啟動 Steam 前先詢問。</string>
<string name="ctrl_layout">佈局</string>
@@ -2432,8 +2419,6 @@
<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_title_uncounted">子程序限制由 DroidDeck 處理</string>
<string name="phantom_instructions_uncounted">DroidDeck 在 Android 不計算的程序中執行工作階段的大部分程式,讓工作階段遠低於上限,因此開發人員選項可以保持關閉。Steam 及其部分輔助程序仍會被計算。</string>
<string name="phantom_fix_toggle">在開發人員選項中開啟「停用對子處理過程的限制」,之後請保持開發人員選項開啟。</string>
<string name="phantom_fix_no_toggle">此 Android 版本沒有此開關。請使用無線偵錯,直接在此裝置上更改。</string>
<string name="upd_block_no_apk">此版本沒有適用於此 DroidDeck 版本的下載。</string>
@@ -4139,7 +4124,4 @@
<string name="steam_store_close_steam">請先關閉 Steam</string>
<string name="steam_store_session_wait">請先暫停 Steam 下載</string>
<string name="steam_store_linux_build">此遊戲會安裝其 Linux 版本。請透過 Steam 安裝。</string>
<string name="glasses_shortcut_group">遊戲內捷徑</string>
<string name="glasses_show_shortcut">顯示 Smart Glasses 捷徑</string>
<string name="glasses_show_shortcut_hint">在遊戲畫面上顯示浮動的 Smart Glasses 按鈕。</string>
</resources>
@@ -644,9 +644,6 @@
<string name="perf_hostname">主機名稱</string>
<string name="perf_hostname_hint">Steam 看到的此裝置名稱。留空可還原為 %1$s。</string>
<string name="perf_hostname_invalid">只能包含字母、數字和中間的連字號,最多 63 個字元。</string>
<string name="perf_desktop_as_user">桌面以一般使用者執行</string>
<string name="perf_desktop_as_user_hint">桌面及其應用程式和終端機會以一般使用者 deck 而非 root 執行,適用於拒絕以 root 執行的應用程式。sudo 仍可使用。下次開啟桌面時生效。</string>
<string name="perf_desktop_as_user_needs_native">需要開啟「不使用 proot 執行」。</string>
<string name="perf_phantom_warning">Android 已設定為結束此工作階段</string>
<string name="driver_installed">已安裝</string>
<string name="driver_available">可下載</string>
@@ -1315,16 +1312,6 @@
<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="setup_frosted_background">毛玻璃</string>
<string name="setup_frosted_background_hint">在啟動器後方顯示模糊的桌布。較為耗電。</string>
<string name="setup_frosted_wallpaper">毛玻璃桌布</string>
<string name="setup_frosted_cards">毛玻璃卡片</string>
<string name="setup_frosted_cards_hint">卡片和群組會透出少許桌布。選單和對話方塊保持不透明。</string>
<string name="setup_frosted_cards_needs_wallpaper">需要開啟毛玻璃桌布。</string>
<string name="setup_frost_transparency">桌布透明度</string>
<string name="setup_frost_transparency_hint">桌布透出的程度。</string>
<string name="setup_frost_card_transparency">卡片透明度</string>
<string name="setup_frost_card_transparency_hint">卡片透出桌布的程度。</string>
<string name="setup_low_storage_warning">儲存空間不足時提醒</string>
<string name="setup_low_storage_warning_hint">可用空間少於 10 GB 時,啟動 Steam 前先詢問。</string>
<string name="ctrl_layout">版面配置</string>
@@ -2432,8 +2419,6 @@
<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_title_uncounted">子程序限制由 DroidDeck 處理</string>
<string name="phantom_instructions_uncounted">DroidDeck 在 Android 不計算的程序中執行工作階段的大部分程式,讓工作階段遠低於上限,因此開發人員選項可以保持關閉。Steam 及其部分輔助程序仍會被計算。</string>
<string name="phantom_fix_toggle">在開發人員選項中開啟「停止限制子程序」,之後請保持開發人員選項開啟。</string>
<string name="phantom_fix_no_toggle">此 Android 版本沒有這個開關。請使用無線偵錯,直接在此裝置上變更。</string>
<string name="upd_block_no_apk">此組建版本沒有適用於此 DroidDeck 複本的下載檔案。</string>
@@ -4139,7 +4124,4 @@
<string name="steam_store_close_steam">請先關閉 Steam</string>
<string name="steam_store_session_wait">請先暫停 Steam 下載</string>
<string name="steam_store_linux_build">此遊戲會安裝其 Linux 版本。請透過 Steam 安裝。</string>
<string name="glasses_shortcut_group">遊戲內捷徑</string>
<string name="glasses_show_shortcut">顯示 Smart Glasses 捷徑</string>
<string name="glasses_show_shortcut_hint">在遊戲畫面上顯示浮動的 Smart Glasses 按鈕。</string>
</resources>
+1 -34
View File
@@ -678,9 +678,6 @@
<string name="perf_hostname">Host name</string>
<string name="perf_hostname_hint">The name Steam sees for this device. Blank restores %1$s.</string>
<string name="perf_hostname_invalid">Letters, digits and inner hyphens only, up to 63 characters.</string>
<string name="perf_desktop_as_user">Desktop runs as a user</string>
<string name="perf_desktop_as_user_hint">The desktop, its apps and its terminals run as the ordinary user deck instead of root, for apps that refuse root. sudo still works. Applies to the next desktop.</string>
<string name="perf_desktop_as_user_needs_native">Needs Run without proot.</string>
<string name="perf_phantom_warning">Android is set to kill this session</string>
<string name="driver_installed">Installed</string>
<string name="driver_available">Available to download</string>
@@ -710,22 +707,7 @@
<string name="drawer_next_page">Next page</string>
<string name="drawer_manage_pages">Arrange pages</string>
<string name="drawer_page_more">More</string>
<string name="drawer_page_performance">Performance</string>
<string name="drawer_page_game">Game</string>
<string name="drawer_page_vr">VR &amp; glasses</string>
<string name="drawer_section_pacing">Frame pacing</string>
<string name="drawer_section_mouse">Mouse</string>
<string name="drawer_section_keyboard_layout">Keyboard layout</string>
<string name="drawer_section_input">Input profile</string>
<string name="drawer_section_compat">Compatibility</string>
<string name="drawer_section_tuning">Fine tuning</string>
<string name="drawer_tag_controller">controller connected</string>
<string name="drawer_tag_no_controller">no controller</string>
<string name="drawer_tag_running">running</string>
<string name="drawer_tag_custom">custom look</string>
<string name="drawer_tag_attached">attached</string>
<string name="drawer_tag_downloading">downloading</string>
<string name="drawer_pause_game">Pause game</string> <string name="drawer_more_back">Back to %1$s</string>
<string name="drawer_more_back">Back to %1$s</string>
<string name="drawer_more_empty">Nothing is kept here. Arrange pages and move one below the More row.</string>
<string name="drawer_pages_reset">Reset</string>
<string name="drawer_pages_done">Done</string>
@@ -1493,16 +1475,6 @@
<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="setup_frosted_background">Frosted</string>
<string name="setup_frosted_background_hint">Shows your wallpaper, blurred, behind the launcher. Uses more battery.</string>
<string name="setup_frosted_wallpaper">Frosted wallpaper</string>
<string name="setup_frosted_cards">Frosted cards</string>
<string name="setup_frosted_cards_hint">Cards and groups let a little of the wallpaper through. Menus and dialogs stay solid.</string>
<string name="setup_frosted_cards_needs_wallpaper">Needs Frosted wallpaper.</string>
<string name="setup_frost_transparency">Wallpaper transparency</string>
<string name="setup_frost_transparency_hint">How much of the wallpaper shows through.</string>
<string name="setup_frost_card_transparency">Card transparency</string>
<string name="setup_frost_card_transparency_hint">How much of the wallpaper shows through cards.</string>
<string name="setup_low_storage_warning">Warn when storage is low</string>
<string name="setup_low_storage_warning_hint">Ask before starting Steam when free space is under 10 GB.</string>
<string name="ctrl_layout">Layout</string>
@@ -2778,8 +2750,6 @@
<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_title_uncounted">Child-process limit handled by DroidDeck</string>
<string name="phantom_instructions_uncounted">DroidDeck runs most of the session\'s programs in processes Android does not count, which keeps the session well under the limit, so Developer options can stay off. Steam and some of its helpers still count.</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>
@@ -3419,9 +3389,6 @@
<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_shortcut_group">In-game shortcut</string>
<string name="glasses_show_shortcut">Show Smart Glasses shortcut</string>
<string name="glasses_show_shortcut_hint">Show the floating Smart Glasses button over the game.</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>
@@ -176,68 +176,4 @@ class PulseAudioComponentTest {
pool.shutdownNow()
}
}
@Test
fun startupCrashDowngradesToStandardModeAndCapsRestartLoop() {
val host = PulseAudioComponent.HostLifecycle { }
val generation = host.begin()
assertFalse(host.preferStandardPerformanceMode())
var pid = 31500
for (i in 0 until PulseAudioComponent.HostLifecycle.MAX_STARTUP_CRASH_RESTARTS) {
assertTrue(host.launch(generation) { pid++ })
assertTrue(host.exited(generation))
val delay = host.nextRestartDelayMs(generation)
assertTrue("expected positive backoff on startup crash #$i, got $delay", delay > 0L)
assertTrue(host.preferStandardPerformanceMode())
}
// One more crash before any sink comes up must stop the hot crash-restart loop.
assertTrue(host.launch(generation) { pid++ })
assertTrue(host.exited(generation))
assertEquals(-1L, host.nextRestartDelayMs(generation))
// A fresh session resets both the fallback preference and the crash counter.
val next = host.begin()
assertFalse(host.preferStandardPerformanceMode())
assertTrue(host.launch(next) { pid++ })
assertTrue(host.exited(next))
assertTrue(host.nextRestartDelayMs(next) > 0L)
}
@Test
fun healthySinkResetsCrashCounterAndRestartsImmediately() {
val host = PulseAudioComponent.HostLifecycle { }
val generation = host.begin()
// First startup crashes -> switches to standard mode with backoff.
assertTrue(host.launch(generation) { 31600 })
assertTrue(host.exited(generation))
assertTrue(host.nextRestartDelayMs(generation) > 0L)
assertTrue(host.preferStandardPerformanceMode())
// Replacement host brings up a working sink -> later runtime exit restarts immediately.
assertTrue(host.launch(generation) { 31601 })
host.markSinkReady(host.token())
assertTrue(host.exited(generation))
assertEquals(0L, host.nextRestartDelayMs(generation))
assertTrue(host.preferStandardPerformanceMode())
}
@Test
fun markLowLatencyFailedIgnoresStaleTokens() {
val host = PulseAudioComponent.HostLifecycle { }
val generation = host.begin()
assertTrue(host.launch(generation) { 31700 })
val first = host.token()
val next = host.begin()
// Before the replacement launches, token still equals launches, but pid is stopped.
host.markLowLatencyFailed(first)
assertFalse(host.preferStandardPerformanceMode())
assertTrue(host.launch(next) { 31701 })
host.markLowLatencyFailed(first)
assertFalse(host.preferStandardPerformanceMode())
host.markLowLatencyFailed(host.token())
assertTrue(host.preferStandardPerformanceMode())
}
}
@@ -81,10 +81,4 @@ class PhantomProcessLimitTest {
assertFalse(PhantomProcessLimit.hasDeveloperToggle(33))
assertTrue(PhantomProcessLimit.hasDeveloperToggle(34))
}
@Test
fun theLimitOnDoesNotBlockSteamWhenTheSessionStaysOutOfItsCount() {
assertFalse(PhantomProcessLimit.blocksSteam(PhantomProcessStatus.UNCOUNTED))
assertTrue(PhantomProcessLimit.blocksSteam(PhantomProcessStatus.ENABLED))
}
}
@@ -44,40 +44,6 @@ class ElfSeccompPatchTest {
}
}
@Test
fun terminalRequestsUseTheOnesAndroidAllowsOnAPseudoTerminal() {
// glibc 2.43's tcsetattr: TCSETS2 into x0, TCGETS2 into x1, with an unrelated instruction between
val data = elfWith(
0xd28a8560.toInt(), 0x910123e2.toInt(), 0xf2a80580.toInt(),
0xd28a8541.toInt(), 0x93407ea0.toInt(), 0xf2b00581.toInt(),
0x528a85a3.toInt(), 0x72a80583.toInt(),
)
assertEquals(3, ElfSeccompPatch.patch(data))
val b = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN)
val nop = 0xd503201f.toInt()
assertEquals(0xd28a8040.toInt(), b.getInt(0x100)) // mov x0, #0x5402 (TCSETS)
assertEquals(nop, b.getInt(0x108))
assertEquals(0xd28a8021.toInt(), b.getInt(0x10c)) // mov x1, #0x5401 (TCGETS)
assertEquals(nop, b.getInt(0x114))
assertEquals(0x528a8083.toInt(), b.getInt(0x118)) // mov w3, #0x5404 (TCSETSF)
assertEquals(nop, b.getInt(0x11c))
assertEquals(0, ElfSeccompPatch.patch(data))
}
@Test
fun aLookalikeConstantIsLeftAlone() {
// 0x542a with another high half, and one whose high half goes to another register
val data = elfWith(0xd28a8541.toInt(), 0xf2a00021.toInt(), 0xd28a8541.toInt(), 0xf2b00582.toInt())
assertEquals(0, ElfSeccompPatch.patch(data))
}
@Test
fun aSiteWhoseRegisterIsReadBeforeTheHighHalfIsLeftAlone() {
// movz x1, #0x542a; add x2, x1, #1; movk x1, #0x802c, lsl #16; movk x2, #0x402c, lsl #16
val data = elfWith(0xd28a8541.toInt(), 0x91000422.toInt(), 0xf2b00581.toInt(), 0xf2a80582.toInt())
assertEquals(0, ElfSeccompPatch.patch(data))
}
@Test
fun otherSystemCallsAreLeftAlone() {
val svc = 0xd4000001.toInt()
@@ -80,24 +80,6 @@ class OrientationTest {
assertFalse(SessionPrefs.portrait(landscape))
}
@Test fun modeOrientationControlsWindowFollowAndPortraitResolution() {
SessionPrefs.setOrientation(context, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
assertEquals(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT, SessionPrefs.windowOrientation(context, true, 700, SessionService.MODE_STEAM))
SessionPrefs.setOrientation(context, "steam", ActivityInfo.SCREEN_ORIENTATION_USER)
assertEquals(ActivityInfo.SCREEN_ORIENTATION_USER, SessionPrefs.windowOrientation(context, true, 700, SessionService.MODE_STEAM))
assertEquals(ActivityInfo.SCREEN_ORIENTATION_USER, SessionPrefs.windowOrientation(context, false, 400, SessionService.MODE_RUN))
val config = android.content.res.Configuration(context.resources.configuration)
config.orientation = android.content.res.Configuration.ORIENTATION_PORTRAIT
val portrait = context.createConfigurationContext(config)
config.orientation = android.content.res.Configuration.ORIENTATION_LANDSCAPE
val landscape = context.createConfigurationContext(config)
assertTrue(SessionPrefs.portrait(portrait, SessionService.MODE_STEAM))
assertFalse(SessionPrefs.portrait(landscape, SessionService.MODE_STEAM))
assertTrue(SessionPrefs.portrait(landscape, SessionService.MODE_DESKTOP))
}
@Test fun invalidLauncherOrientationFallsBackAndInvalidChoicePreservesPreference() {
context.getSharedPreferences("app-ui", Context.MODE_PRIVATE).edit().putInt("orientation", 999).commit()
assertEquals(ActivityInfo.SCREEN_ORIENTATION_USER, AppUiPrefs.orientation(context))
@@ -106,20 +88,4 @@ class OrientationTest {
assertEquals(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT, AppUiPrefs.orientation(context))
}
@Test fun steamAndDesktopOrientationsAreIndependentAndFallBackToLegacyChoice() {
assertEquals(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE, SessionPrefs.orientation(context, "steam"))
assertEquals(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE, SessionPrefs.orientation(context, "desktop"))
SessionPrefs.setOrientation(context, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
SessionPrefs.setOrientation(context, "steam", ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
SessionPrefs.setOrientation(context, "desktop", ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE)
assertEquals(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE, SessionPrefs.orientation(context, "steam"))
assertEquals(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE, SessionPrefs.orientation(context, SessionService.MODE_STEAM))
assertEquals(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE, SessionPrefs.orientation(context, SessionService.MODE_RUN))
assertEquals(ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE, SessionPrefs.orientation(context, "desktop"))
assertEquals(ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE, SessionPrefs.orientation(context, SessionService.MODE_DESKTOP))
assertEquals(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT, SessionPrefs.orientation(context))
}
}
@@ -30,16 +30,4 @@ class OutputPacingTest {
@Test fun mirroringKeepsTheGlassesRate() {
assertEquals(60, SessionPrefs.compositorFpsLimit(60))
}
@Test fun gameModeOverrideCapsAPanelThatRunsFaster() {
assertEquals(60, SessionPrefs.hostFrameCap(60.000004f, 120.00001f))
assertEquals(0, SessionPrefs.hostFrameCap(120.00001f, 120.00001f))
assertEquals(0, SessionPrefs.hostFrameCap(0f, 120f))
}
@Test fun hostCapPacesSteamSessionsAndYieldsToLowerLimits() {
assertEquals(60, SessionPrefs.compositorFpsLimit(0, 0, hostCap = 60))
assertEquals(45, SessionPrefs.compositorFpsLimit(0, 45, hostCap = 60))
assertEquals(SessionPrefs.PIP_FPS, SessionPrefs.compositorFpsLimit(0, 0, pip = true, hostCap = 60))
}
}
@@ -132,45 +132,6 @@ class EaTest {
dir.deleteRecursively()
}
private object LsxAccount : EaLsx.Account {
override val userId = "1000000000042"
override val personaId = "1000000000043"
override val persona = "Player"
override fun authCode(clientId: String, scope: String?) = "code"
override fun license(contentId: String, requestTicket: String, ticketEngine: String) = "licence"
override fun entitlements(group: String) = emptyList<Map<String, String>>()
override fun token() = "token"
}
private fun lsx(body: String) = EaLsx.parse("<LSX><Request recipient=\"EbisuSDK\" id=\"5\">$body</Request></LSX>")!!
@Test fun theGamesSecondSessionGetsTheProfileButNoSecrets() {
EaLsx.account = LsxAccount
try {
val sdk = EaLsx.Session(java.net.Socket(), java.io.ByteArrayOutputStream(), false, unverifiable = true).apply { claimed = true }
val profile = EaLsx.answer(sdk, lsx("<GetProfile index=\"0\"/>"))!!
assertTrue(profile, profile.contains("UserId=\"1000000000042\""))
assertTrue(profile, profile.contains("PersonaId=\"1000000000043\""))
assertTrue(profile, profile.contains("Persona=\"Player\""))
assertTrue(EaLsx.answer(sdk, lsx("<GetPresence/>"))!!.contains("UserId=\"1000000000042\""))
assertEquals("<AuthToken value=\"\"/>", EaLsx.answer(sdk, lsx("<GetAuthToken/>")))
assertEquals("<AuthCode value=\"invalid\"/>", EaLsx.answer(sdk, lsx("<GetAuthCode ClientId=\"x\"/>")))
val stranger = EaLsx.Session(java.net.Socket(), java.io.ByteArrayOutputStream(), false, unverifiable = true)
assertTrue(EaLsx.answer(stranger, lsx("<GetProfile index=\"0\"/>"))!!.contains("UserId=\"\""))
} finally {
EaLsx.account = null
}
}
@Test fun getSettingsAnswersWithTheSdksSettingsType() {
val session = EaLsx.Session(java.net.Socket(), java.io.ByteArrayOutputStream(), false)
assertEquals(
"<GetSettingsResponse IsIGOAvailable=\"false\" IsIGOEnabled=\"false\" IsTelemetryEnabled=\"false\" IsManualOffline=\"false\"/>",
EaLsx.answer(session, lsx("<GetSettings/>")),
)
}
@Test fun lsxRequestsAreParsed() {
val m = EaLsx.parse("<LSX><Request recipient=\"EbisuSDK\" id=\"4\"><GetSetting SettingId=\"ENVIRONMENT\" version=\"\"/></Request></LSX>")!!
assertEquals("GetSetting", m.name)
@@ -1,12 +0,0 @@
package com.droiddeck.launcher.ui
import androidx.compose.ui.test.SemanticsNodeInteractionsProvider
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.performScrollTo
/** Session menu groups start folded; a test opens the one whose rows it checks. */
internal fun SemanticsNodeInteractionsProvider.openSection(key: String) {
if (DrawerSectionState.isOpen(key)) return
onNodeWithTag("drawer-section-$key").performScrollTo().performClick()
}
@@ -16,7 +16,6 @@ import com.droiddeck.launcher.R
import com.droiddeck.launcher.glasses.Glasses
import com.droiddeck.launcher.glasses.GlassesSettings
import com.droiddeck.launcher.glasses.GlassesState
import com.droiddeck.launcher.session.SessionPrefs
import kotlinx.coroutines.flow.MutableStateFlow
import org.junit.After
import org.junit.Assert.assertEquals
@@ -72,7 +71,6 @@ class GlobalGlassesSettingsTest {
compose.onNodeWithText(text(R.string.setup_glasses_scope)).assertExists()
compose.onNodeWithText(text(R.string.setup_glasses_connect)).assertExists()
compose.onNodeWithTag("setting-glasses-shortcut").assertExists()
compose.onNodeWithTag("setting-glasses-game").assertDoesNotExist()
compose.onNodeWithTag("play-steamvr").assertDoesNotExist()
@@ -105,29 +103,6 @@ class GlobalGlassesSettingsTest {
assertEquals(saved, Glasses.settings.value)
}
@Test fun globalShortcutVisibilitySettingIsSavedAndDefaultsToVisible() {
state().value = connected
val app = RuntimeEnvironment.getApplication()
val prefs = app.getSharedPreferences("session", Context.MODE_PRIVATE)
val hadValue = prefs.contains("showGlassesShortcut")
val previous = prefs.getBoolean("showGlassesShortcut", true)
prefs.edit().remove("showGlassesShortcut").commit()
try {
assertTrue(SessionPrefs.showGlassesShortcut(app))
show()
openGlasses()
compose.onNodeWithTag("setting-glasses-shortcut").performScrollTo().assert(
SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_on)))
compose.onNodeWithTag("setting-glasses-shortcut").performClick()
assertEquals(false, SessionPrefs.showGlassesShortcut(app))
compose.onNodeWithTag("setting-glasses-shortcut").assert(
SemanticsMatcher.expectValue(SemanticsProperties.StateDescription, text(R.string.widgets_off)))
} finally {
if (hadValue) prefs.edit().putBoolean("showGlassesShortcut", previous).commit()
else prefs.edit().remove("showGlassesShortcut").commit()
}
}
@Test fun globalScreenTrackingUsesTheExistingSavedSettings() {
state().value = connected
settings().value = GlassesSettings(gameOnGlasses = false, headTracking = false)
@@ -227,81 +227,6 @@ class InputSurfaceTouchTest {
touch(MotionEvent.ACTION_UP, 1 to (750f to 285f))
}
@Test fun theMiddleOfACrossedDpadPressesTheNearestArmInsteadOfFallingThrough() {
val up = InputSurfaceElement(InputControl.UP, .45f, .1f, .1f, .15f)
val down = InputSurfaceElement(InputControl.DOWN, .45f, .45f, .1f, .15f)
show(up, down, InputSurfaceElement(InputControl.LEFT, .3f, .25f, .15f, .2f),
InputSurfaceElement(InputControl.RIGHT, .55f, .25f, .15f, .2f), a)
val missed = mutableListOf<Int>()
view.onTouchMiss = { missed += it.actionMasked }
touch(MotionEvent.ACTION_DOWN, 1 to (500f to 170f))
assertEquals(-1, state().hatY())
touch(MotionEvent.ACTION_MOVE, 1 to (540f to 215f))
assertEquals(1, state().hatX())
assertEquals(0, state().hatY())
touch(MotionEvent.ACTION_UP, 1 to (540f to 215f))
assertEquals(0, state().hatX())
assertTrue(missed.isEmpty())
assertFalse(view.takesTouchAt(250f, 210f))
assertFalse(view.takesTouchAt(800f, 500f))
assertFalse(view.takesTouchAt(350f, 100f))
show(up, down)
assertFalse(view.takesTouchAt(500f, 210f))
view.onTouchMiss = null
}
@Test fun aHandPlacedDpadWithOffArmsStillTakesItsMiddle() {
show(InputSurfaceElement(InputControl.UP, .42f, .1f, .1f, .15f),
InputSurfaceElement(InputControl.DOWN, .42f, .45f, .1f, .15f),
InputSurfaceElement(InputControl.LEFT, .3f, .27f, .15f, .15f),
InputSurfaceElement(InputControl.RIGHT, .5f, .25f, .15f, .2f))
touch(MotionEvent.ACTION_DOWN, 1 to (475f to 225f))
assertTrue(state().hatX() != 0 || state().hatY() != 0)
touch(MotionEvent.ACTION_UP, 1 to (475f to 225f))
assertFalse(view.takesTouchAt(750f, 225f))
}
@Test fun aTallGapPicksTheNearestArmAndSplitArmsAreNoCross() {
show(InputSurfaceElement(InputControl.UP, .45f, .1f, .1f, .15f),
InputSurfaceElement(InputControl.DOWN, .45f, .65f, .1f, .15f),
InputSurfaceElement(InputControl.LEFT, .3f, .35f, .15f, .2f),
InputSurfaceElement(InputControl.RIGHT, .55f, .35f, .15f, .2f))
touch(MotionEvent.ACTION_DOWN, 1 to (530f to 290f))
assertEquals(1, state().hatX())
assertEquals(0, state().hatY())
touch(MotionEvent.ACTION_UP, 1 to (530f to 290f))
touch(MotionEvent.ACTION_DOWN, 1 to (530f to 180f))
assertEquals(-1, state().hatY())
assertEquals(0, state().hatX())
touch(MotionEvent.ACTION_UP, 1 to (530f to 180f))
show(InputSurfaceElement(InputControl.UP, .2f, .1f, .1f, .15f),
InputSurfaceElement(InputControl.DOWN, .7f, .6f, .1f, .15f),
InputSurfaceElement(InputControl.LEFT, .1f, .35f, .15f, .2f),
InputSurfaceElement(InputControl.RIGHT, .8f, .35f, .15f, .2f))
assertFalse(view.takesTouchAt(500f, 300f))
}
@Test fun aSecondUpButtonDoesNotHideTheCross() {
show(InputSurfaceElement(InputControl.UP, .1f, .7f, .1f, .15f, "extra-up"),
InputSurfaceElement(InputControl.UP, .45f, .1f, .1f, .15f),
InputSurfaceElement(InputControl.DOWN, .45f, .45f, .1f, .15f),
InputSurfaceElement(InputControl.LEFT, .3f, .25f, .15f, .2f),
InputSurfaceElement(InputControl.RIGHT, .55f, .25f, .15f, .2f))
touch(MotionEvent.ACTION_DOWN, 1 to (500f to 170f))
assertEquals(-1, state().hatY())
touch(MotionEvent.ACTION_UP, 1 to (500f to 170f))
assertEquals(0, state().hatY())
show(InputSurfaceElement(InputControl.UP, .45f, 0f, .1f, .05f, "extra-up"),
InputSurfaceElement(InputControl.UP, .45f, .1f, .1f, .15f),
InputSurfaceElement(InputControl.DOWN, .45f, .45f, .1f, .15f),
InputSurfaceElement(InputControl.LEFT, .3f, .25f, .15f, .2f),
InputSurfaceElement(InputControl.RIGHT, .55f, .25f, .15f, .2f))
touch(MotionEvent.ACTION_DOWN, 1 to (490f to 170f))
assertEquals(-1, state().hatY())
assertEquals(0, state().hatX())
touch(MotionEvent.ACTION_UP, 1 to (490f to 170f))
}
@Test fun adaptiveSticksCaptureAroundThemAndTheLeftOneToTheEdge() {
val left = InputSurfaceElement(InputControl.LS, .3f, .3f, .2f, .4f, hideWhenIdle = true)
val right = InputSurfaceElement(InputControl.RS, .6f, .3f, .2f, .4f, hideWhenIdle = true)
@@ -1,166 +0,0 @@
package com.droiddeck.launcher.ui
import android.app.Activity
import android.content.Context
import android.view.WindowManager
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.compositeOver
import androidx.compose.ui.graphics.luminance
import com.droiddeck.launcher.session.SessionPrefs
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.Robolectric
import org.robolectric.RobolectricTestRunner
import org.robolectric.RuntimeEnvironment
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [34])
class LauncherFrostTest {
private val app get() = RuntimeEnvironment.getApplication()
private val graphite get() = Themes.byId(Themes.GRAPHITE)
private val whiteRed get() = Themes.byId(Themes.WHITE_RED)
@Before fun clear() {
app.getSharedPreferences("session", Context.MODE_PRIVATE).edit().clear().commit()
}
private fun contrast(a: Color, b: Color) = (maxOf(a.luminance(), b.luminance()) + 0.05f) / (minOf(a.luminance(), b.luminance()) + 0.05f)
private val wallpapers = listOf(Color.White, Color.Black, Color(0xFF808080), Color(0xFFFFE600), Color(0xFF00008B), Color(0xFF20AA96), Color(0xFFE2725B))
private val steps = (0..FROST_MAX step FROST_STEP).toList()
private fun look(theme: Palette, transparency: Int = FROST_WALLPAPER_DEFAULT, cards: Boolean = false, cardTransparency: Int = FROST_DEFAULT) =
frostLook(theme, FrostChoice(transparency, cards, cardTransparency))
@Test fun hintTextStaysReadableOnThePageAndOnCardsOverAnyPartOfAnyWallpaper() {
for (theme in Themes.all) for (t in steps) for (c in listOf(0, FROST_DEFAULT, FROST_MAX)) {
val look = look(theme, t, cards = true, cardTransparency = c)
val frosted = theme.frosted(look)
assertTrue("${theme.id} $t/$c veil ${look.veil.alpha}", look.veil.alpha in 0.31f..0.95f)
for (wallpaper in wallpapers) {
val page = look.veil.compositeOver(wallpaper)
val card = frosted.surface.compositeOver(page)
val at = "${theme.id} $t/$c over $wallpaper"
assertTrue("$at page", contrast(frosted.onSurfaceVariant, page) >= 4.5f)
assertTrue("$at card", contrast(frosted.onSurfaceVariant, card) >= 4.5f)
}
}
}
private fun custom(bg: Color, text: Color) = Palette(
"custom", graphite.label, graphite.detail,
background = bg, surface = bg, surfaceVariant = bg, line = bg, line2 = bg,
onBackground = text, onSurfaceVariant = text,
primary = text, primary2 = text, onPrimary = bg, signal = text, good = text,
)
@Test fun aMidGreyCustomPaletteStaysReadableOverBlackAndWhiteWallpaper() {
val grey = custom(Color(0xFF999999), Color.Black)
val look = look(grey, cards = false)
for (wallpaper in listOf(Color.Black, Color.White)) {
assertTrue("over $wallpaper", contrast(Color.Black, look.veil.compositeOver(wallpaper)) >= 4.5f)
}
}
@Test fun whenNoTintIsReadableTheVeilTurnsSolid() {
val dim = custom(Color.Black, Color(0xFF777777))
assertEquals(1f, look(dim, cards = false).veil.alpha)
}
@Test fun aTintThatLosesTheTextOverOneWallpaperTurnsSolid() {
val grey = custom(Color.Black, Color(0xFF757575))
val look = look(grey, cards = false)
for (wallpaper in listOf(Color.Black, Color.White)) {
assertTrue("over $wallpaper", contrast(Color(0xFF757575), look.veil.compositeOver(wallpaper)) >= 4.5f)
}
}
@Test fun atTheDefaultTransparencyTheVeilStaysUnderThreeQuarters() {
for (theme in Themes.all) assertTrue(theme.id, look(theme, cards = true).veil.alpha <= 0.75f)
}
@Test fun moreTransparencyNeverThickensTheVeilOrTheCards() {
for (theme in Themes.all) {
val veils = steps.map { look(theme, it).veil.alpha }
assertTrue("${theme.id}: $veils", veils.zipWithNext().all { (a, b) -> b <= a + 0.005f })
val cards = steps.map { look(theme, cards = true, cardTransparency = it).cardAlpha }
assertTrue("${theme.id} cards: $cards", cards.zipWithNext().all { (a, b) -> b <= a })
}
assertTrue(look(graphite, FROST_MAX).veil.alpha < look(graphite).veil.alpha)
assertTrue(look(whiteRed, FROST_MAX).veil.alpha < look(whiteRed).veil.alpha)
}
@Test fun withoutCardsTheFrostOnlyMovesHintTextTowardTheMainText() {
val frosted = graphite.frosted(look(graphite))
assertEquals(graphite.background, frosted.background)
assertEquals(graphite.surface, frosted.surface)
assertEquals(graphite.surfaceVariant, frosted.surfaceVariant)
assertEquals(graphite.onBackground, frosted.onBackground)
assertTrue(frosted.onSurfaceVariant.luminance() > graphite.onSurfaceVariant.luminance())
assertTrue(frosted.onSurfaceVariant.luminance() < graphite.onBackground.luminance())
}
@Test fun cardsGoSeeThroughByTheirOwnTransparencyAndAreSolidAtZero() {
for (theme in Themes.all) {
val frosted = theme.frosted(look(theme, cards = true))
assertTrue(theme.id, frosted.surface.alpha in 0.5f..0.8f && frosted.surfaceVariant.alpha == frosted.surface.alpha)
assertEquals(theme.surface, frosted.surface.copy(alpha = 1f))
assertEquals(theme.background, frosted.background)
assertEquals(1f, look(theme, cards = true, cardTransparency = 0).cardAlpha)
}
}
@Test fun firstTurningTheFrostOnFrostsTheWallpaperAndCardsAtTheDefaults() {
assertFalse(SessionPrefs.launcherFrost(app))
assertTrue(SessionPrefs.frostWallpaper(app))
assertTrue(SessionPrefs.frostCards(app))
assertEquals(FROST_WALLPAPER_DEFAULT, SessionPrefs.frostTransparency(app))
assertEquals(FROST_DEFAULT, SessionPrefs.frostCardTransparency(app))
SessionPrefs.setLauncherFrost(app, true)
SessionPrefs.setFrostWallpaper(app, false)
SessionPrefs.setFrostCards(app, false)
SessionPrefs.setFrostTransparency(app, 999)
SessionPrefs.setFrostCardTransparency(app, -5)
assertTrue(SessionPrefs.launcherFrost(app))
assertFalse(SessionPrefs.frostWallpaper(app))
assertFalse(SessionPrefs.frostCards(app))
assertEquals(FROST_MAX, SessionPrefs.frostTransparency(app))
assertEquals(0, SessionPrefs.frostCardTransparency(app))
}
@Test fun searchFindsTheFrostOnlyWhereSettingsShowsIt() {
val frosted = SettingsIndex.entries.single { it.frost }
assertTrue(frosted in SettingsIndex.search(app, "transparency", frost = true))
assertFalse(frosted in SettingsIndex.search(app, "transparency", frost = false))
assertTrue(SettingsIndex.search(app, "theme", frost = false).isNotEmpty())
}
@Test fun theWindowIsPreparedWhileBlurIsOffAndShowsNoWallpaperUntilShown() {
val activity = Robolectric.buildActivity(Activity::class.java).setup().get()
val frost = LauncherFrost(activity)
val flags = WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER or WindowManager.LayoutParams.FLAG_BLUR_BEHIND
frost.prepare(true)
assertFalse(frost.available)
assertTrue(frost.prepared)
assertEquals(0, activity.window.attributes.flags and flags)
frost.show(true)
assertEquals(flags, activity.window.attributes.flags and flags)
}
@Test fun aWindowThatWasNotPreparedKeepsItsBackgroundAndShowsNoWallpaper() {
val activity = Robolectric.buildActivity(Activity::class.java).setup().get()
val before = activity.window.decorView.background
val frost = LauncherFrost(activity)
frost.prepare(false)
frost.show(true)
assertFalse(frost.prepared)
assertEquals(before, activity.window.decorView.background)
assertEquals(0, activity.window.attributes.flags and (WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER or WindowManager.LayoutParams.FLAG_BLUR_BEHIND))
}
}
@@ -77,17 +77,6 @@ class NavTabsTest {
assertFalse("desktop" in navigationKeys(s))
}
@Test fun moreStaysOnTheBarWhenNoTabIsShelvedSoTabsCanStillBeEdited() {
NavTabs.more(state()).forEach { place(it, TabPlace.HIDDEN) }
assertTrue(NavTabs.more(state()).isEmpty())
assertEquals(NavTabs.MORE, navigationKeys(state()).last())
NavTabs.reset(ctx)
NavTabs.more(state()).forEach { place(it, TabPlace.BAR) }
assertTrue(NavTabs.more(state()).isEmpty())
assertEquals(NavTabs.MORE, navigationKeys(state()).last())
assertEquals(1, navigationKeys(state()).count { it == NavTabs.MORE })
}
@Test fun appsAndTheDevHarnessCanBeShownWithoutHomeScreenOrDeveloperTools() {
place("android-apps", TabPlace.MORE)
assertTrue("android-apps" in NavTabs.more(state()))
@@ -31,9 +31,7 @@ class PenSettingsGroupTest {
@Test fun theDrawerHasNoPenGroupUntilAPenIsKnown() {
compose.setContent { DroidDeckTheme { SessionDrawer(true, SessionDrawerPage.CONTROLLER, false, {}, actions(pen = null)) } }
compose.openSection("controller-touch")
compose.onNodeWithTag("setting-touch").assertExists()
compose.onNodeWithTag("drawer-section-controller-pen").assertDoesNotExist()
compose.onNodeWithTag("setting-pen").assertDoesNotExist()
compose.onNodeWithTag("setting-pen-button").assertDoesNotExist()
}
@@ -45,7 +43,6 @@ class PenSettingsGroupTest {
SessionDrawer(true, SessionDrawerPage.CONTROLLER, false, {}, actions(SessionPrefs.Pen()) { k, v -> picks += k to v })
}
}
compose.openSection("controller-pen")
compose.onNodeWithTag("setting-pen-button").performScrollTo().performClick()
compose.onNodeWithText(context.getString(R.string.gesture_middle_click)).performScrollTo().performClick()
compose.onNodeWithTag("setting-pen").performScrollTo().performClick()
Loaded 100 of 178 files, more files were not shown because too many files have changed in this diff. Show more