Compare commits

...
Author SHA1 Message Date
maxjivi05 d0ac30c6a8 Merge main into feat/desktop-pacman 2026-10-30 15:26:05 -04:00
Kurt Himebauch a5b035b247 test: the required-status gate expects the skip-on-superseded condition (#1866) 2026-10-30 15:25:28 -04:00
MaxsTechReview a8cebd024b fix(ci): required-check test matches the gate's !cancelled() condition (#1864)
fix(ci): the required-check test expects the gate's !cancelled() condition
2026-10-30 15:20:30 -04:00
maxjivi05 83efbe3987 Set the scroll midpoint as soon as a finger lands or lifts so the next move still scrolls 2026-10-30 15:05:03 -04:00
MaxsTechReview 7c49eef79f fix(dual-screen): keep the bottom-screen controls up while a game loads (#1840)
* fix(dual-screen): keep the bottom-screen controls up while a game loads

The session opened its bottom-screen trackpad only at the game's first frame. The launcher's bottom menu closes when a game starts, so on dual-screen handhelds the bottom screen showed whatever Android app was behind it for the whole load, which is long for Xbox games while Xodus prepares them. The controls now open when the session starts. Devices without a built-in second screen, and players who turned the in-game controls off, are unchanged.

* fix(dual-screen): pick the bottom-screen panel again once the session's controller is known

Opening the bottom-screen controls at session start can run before SessionService has prepared the Steam Deck pad, while SessionState.deckPad is still false, so the trackpad could be chosen where the Deck controls belong. That early choice is now provisional: at the game's first frame it switches to the panel the remembered choice and the real deckPad give, unless the player has already picked one.

* fix(dual-screen): keep the loading-time panel choice through PiP, background and new sessions

* fix(dual-screen): retry a terminal panel opened before it was ready and keep a manual close made during loading
2026-10-30 14:32:34 -04:00
Kurt Himebauch c8c5e22a34 fix: new Steam installs start with shader pre-caching off (#1861) 2026-10-30 14:17:45 -04:00
Kurt Himebauch fa4a54f64a Default game library to vertical covers (#1857) 2026-10-30 14:09:44 -04:00
maxjivi05 10618b0f60 Keep a scroll steady when a finger lands again, keep the clipboard echo for repeat callbacks, and never follow a linked pacman sync folder 2026-10-30 14:04:06 -04:00
maxjivi05 801e434345 Merge main into feat/desktop-pacman 2026-10-30 14:02:17 -04:00
MaxsTechReview 83980035c6 fix(desktop): video wallpapers no longer race ahead after DroidDeck returns from the background (#1833)
* fix(desktop): video wallpapers no longer race ahead after DroidDeck returns from the background

* test: give the vrclient loader harness the clock syscall hook
2026-10-30 13:58:49 -04:00
MaxsTechReview 8f7cdb7106 fix: Battle.net scales its windows to large desktops instead of opening tiny on high-resolution screens (#1832) 2026-10-30 13:58:44 -04:00
MaxsTechReview 9a1334b73b fix: on dual-screen handhelds DroidDeck no longer jumps back over apps opened from outside it (#1828)
fix: the bottom-screen panel no longer pulls DroidDeck back over an app opened on the main screen from outside DroidDeck

On dual-screen handhelds the panel took focus and moved DroidDeck's task forward whenever another app opened over it on the main screen, unless DroidDeck had opened that app itself. A frontend such as iisu, or Settings opened from a shortcut, was covered again within a fraction of a second. The panel now stops reclaiming once the launcher is paused, and starts again when it resumes.
2026-10-30 13:58:40 -04:00
MaxsTechReview ab949a4a5a fix(runtime): the x86-64 Steam client starts again on the Ubuntu runtime (liblzo2-2 for FEX) (#1825)
* fix(runtime): ship liblzo2-2 so the x86-64 Steam client can install FEX

FEX's unsquashfs links liblzo2. The Ubuntu runtime did not ship it, so the FEX check failed on every build, the x86-64 client was never set up, and the session went straight back to the home screen. Only phones with the desktop installed had it.

* fix: the x86-64 Steam client starts again after it updates itself under FEX

On its first start the x86-64 client downloads a 500 MB update and, under FEX, ends on an illegal instruction (rc=132) instead of asking for a restart with rc=42, so the session ended there. The client is started again once.
2026-10-30 13:58:35 -04:00
MaxsTechReview b91e8fdeab fix: a session in picture-in-picture draws at 30 fps instead of the full refresh (#1842)
* fix: a session in picture-in-picture draws at 30 fps instead of the full refresh

Since auto picture-in-picture became the default (#1727), pressing Home leaves the session running in a small window that takes no input. A game kept drawing at its full rate there: on a REDMAGIC Astra 2 Among Us in picture-in-picture drew 3.31 W, the same as playing it and about 1.05 W more than a suspended session. While in picture-in-picture the compositor now paces the session at 30 fps (or a lower limit already set). Mirroring to glasses keeps the glasses rate, and the display mode request ignores the picture-in-picture limit so the app in front is not slowed.

* fix: keep the no-argument output limit the glasses pacing tests read

* fix: hold scene renders to the output limit and keep frame generation off in picture-in-picture

A frame limit only paced dmabuf buffer releases, so a shared-memory client was still drawn on every vsync with its frame callbacks sent at the panel's rate. The vsync tick now waits until the limit's interval, less half a refresh, has passed since the last scene. Frame generation is disarmed while picture-in-picture is shown and armed again when it ends; frame generation requests are applied in order.

* Give the commit render harness the frame limit hold

* Hold scene renders to a frame limit deadline, also on the fallback timer, and keep frame generation for glasses mirroring in picture in picture
2026-10-30 13:29:10 -04:00
MaxsTechReview 021e7153fa fix: Automatic dual screen needs a real second touch panel (Odin keeps its side rail) (#1801)
* fix: AYN Odin handhelds are single-screen in automatic dual-screen mode

* Use a second screen only when more than one physical screen is lit, instead of excluding AYN models

* fix: open the session panel when the second screen turns on, and keep the On mode's display choice

* fix: let the session panel open again after its screen goes away and returns

* fix: Automatic dual screen needs a touchscreen for the second panel instead of counting lit displays

* fix: check the second screen again when a touchscreen comes back after the display

* fix: check the second screen again when a touchscreen is added or removed, and on resume

* Keep the second screen panel closed once the session has ended
2026-10-30 13:19:21 -04:00
Kurt Himebauch 524292f457 fix: drop the runtime installs on first Play chip from the Steam home (#1854) 2026-10-30 13:04:16 -04:00
Kurt Himebauch 92c1560f63 feat: Steam's sleep-after timers start every session as Disabled (#1848) 2026-10-30 12:13:12 -04:00
MaxsTechReview 41615d2460 fix: Steam's UI runs at the panel's full refresh rate again (#1841)
#1809 held Steam's own UI to an even share of the refresh near 60 fps whenever it had focus. On 120 Hz and faster screens Big Picture then felt locked at 60 while games ran at the full rate, and players reported it as a regression. The compositor now releases Steam UI buffers unpaced again, like a game's. The larger swapchain stays limited to games, so the client UI still uses gamescope's default image count.
2026-10-30 11:10:03 -04:00
Kurt Himebauch bc1a010411 fix: launching a game from a frontend starts it instead of sitting on the home screen (#1844) 2026-10-30 10:34:30 -04:00
MaxsTechReview d31f234f74 fix(xbox): games run from their own folder on the short drive, not the drive root (#1804)
* fix(xbox): keep the game in its own folder on the short drive instead of at the drive root

* fix(xbox): SD card Xbox games can read their own package files

Xodus mounts a store library on the selected SD card at /mnt/droiddeck-stores/<card> and links the launch view to it, but game sessions only bound that library as /mnt/droiddeck-sd. The links were dangling inside the game, so MicrosoftGame.Config, appxmanifest.xml and XCurl.dll could not be read and GDK games stopped with "Failed to initialize GDK". Game sessions now bind the same store roots Xodus uses.

* fix(xbox): give the SD Steam library its own store path when another store root shares the card

externalRootsForXodus added the selected Steam library's Games folder with the card's guest path even when another store root on the same card already used it, so both bound to one destination. It now takes a path-derived suffix in that case, the same way externalRoots separates its own roots.
2026-10-30 10:10:23 -04:00
FX1922 6ffe675a57 fix: match the game page's check for updates, uninstall and edit art buttons to the frosted design (#1831) 2026-10-30 09:31:05 -04:00
MaxsTechReview fb5af9d35e fix(runtime): cutscenes and in-game videos play again with DroidDeck-Proton (libva-drm2, libva-x11-2) (#1823)
fix(runtime): ship libva-drm2 and libva-x11-2 so DroidDeck-Proton's video demuxer loads

DroidDeck-Proton's ffmpeg links libva-drm and libva-x11. The runtime only had libva2, so winedmo.so failed to load and Media Foundation video stopped: Resident Evil Revelations hung on its loading screen with "Failed to create demuxer, status 0xc000007a", and RE engine and Kingdom Hearts cutscenes broke. Installing the desktop hid it because Plasma pulls both in.
2026-10-30 09:18:09 -04:00
Kurt Himebauch b75060c280 feat: cap the frame rate in session for games launched without Steam (#1813) 2026-10-30 07:39:31 -04:00
FX1922 67d391958f feat: apply itch updates as butler patches (#1829) 2026-10-30 07:38:06 -04:00
4770d11e39 feat: Add physical controller button shortcuts (#1202)
* feat(controller): add physical button shortcuts

* fix(controller): improve shortcut capture and assignment feedback

* refactor(controller): simplify menu button assignment UI

* feat(controller): save menu assignments on button release

* refactor(controller): remove obsolete shortcut UI resources

* fix(controller): place drawer remaps below Back

* refactor(controller): simplify shortcut capture wording

* fix(controller): refresh active shortcut bindings on changes

* fix(controller): preserve drawer confirmation for mapped A

* fix: preserve controller shortcut navigation and cancel

* test: align shortcut dialog assertions

---------

Co-authored-by: xXJsonDeruloXx <danielhimebauch@gmail.com>
Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
2026-10-30 07:08:59 -04:00
MaxsTechReview f69e2d0171 fix: Steam's UI draws at an even share of the refresh near 60 fps instead of the panel's full rate (lag and heat since 0.6.7) (#1809) 2026-10-30 02:16:25 -04:00
MaxsTechReview b0a8c2065d fix: a folder of games on game storage lists each game instead of one combined game (#1808) 2026-10-30 02:01:56 -04:00
MaxsTechReview d4fd7ac5c3 fix: "DroidDeck isn't responding" on dual-screen handhelds when input reaches the bottom screen (#1806) 2026-10-30 01:56:44 -04:00
MaxsTechReview ed661d7007 fix: the performance HUD is off by default and keeps the user's own choice (#1807) 2026-10-30 00:10:06 -04:00
MaxsTechReview 265335d550 fix: the Stop button no longer wraps letter by letter on narrow bottom screens (#1805) 2026-10-30 00:09:53 -04:00
MaxsTechReview 2b0d633535 fix: the Duo's bottom screen keeps the panel you picked across games (#1803) 2026-10-29 23:45:06 -04:00
MaxsTechReview 3b917c0db3 fix(runtime): ship GTK 3 and the libraries Proton's arm64 builds need (#1802) 2026-10-29 23:44:50 -04:00
MaxsTechReview 58968c9286 fix: itch.io installs unpack a game archive nested inside the download (#1800) 2026-10-29 23:21:38 -04:00
Kurt Himebauch 5736297987 fix: keep the launcher from reclaiming focus when an app opens on the primary screen (#1797) 2026-10-29 21:58:23 -04:00
MaxsTechReview 26e2f26ec9 fix: Steam's Browse buttons work when another app holds port 8080 with Decky enabled (#1798) 2026-10-29 21:22:14 -04:00
MaxsTechReview 23bb361006 fix: Steam no longer restarts every launch to import added games, and asks first (#1795) 2026-10-29 21:14:11 -04:00
MaxsTechReview ee3876b965 Windows components: restore bundle parts, wait for restores and keep older picks (#1788) 2026-10-29 20:31:18 -04:00
Kurt Himebauch 5d6f9c7d74 feat: show the DroidDeck D mark as the fastfetch logo (#1778) 2026-10-29 20:21:49 -04:00
MaxsTechReview d5d3aa2ae4 fix: ARMSX2, melonDS and Cemu start without the desktop installed (#1793) 2026-10-29 20:16:55 -04:00
MaxsTechReview 31c943c82a fix: Windows installs to Android storage no longer ask for an administrator (#1791) 2026-10-29 19:12:22 -04:00
MaxsTechReview 3b9abf6302 Update the Linux runtime by itself when a new one is out (#1787) 2026-10-29 18:50:26 -04:00
MaxsTechReview 161a93a4b3 Session follows the Android time zone, and Teardown keeps its own vsync (#1790) 2026-10-29 18:49:11 -04:00
Kurt Himebauch 7d3d338fb9 Keep the manual second screen option when Dual screen is Off (#1777) 2026-10-29 18:39:17 -04:00
MaxsTechReview a3da6f0bda Launch frontend game links without a tap on dual-screen devices (#1789) 2026-10-29 18:37:52 -04:00
MaxsTechReview b726e19fa4 Keep Windows components across runtime updates and reinstall lost ones (#1786) 2026-10-29 17:48:04 -04:00
maxjivi05 fc8dad5944 Install desktop-kde-r3 2026-10-27 15:17:15 -04:00
maxjivi05 cf86daa154 Scroll two-finger swipes at touchpad speed 2026-10-27 15:17:15 -04:00
maxjivi05 541e2230df Fix the KDE 6.8 desktop on device and make touch scrolling feel like a touchpad
- KWin presents one composited buffer (no overlay layers), so the wallpaper and icons show
- KWin runs without Gallium's threaded context, which crashed it on window uploads
- KWin forwards the host's scroll source, wheel steps and scroll stops (patch 0003)
- Two-finger scrolling sends touchpad scrolling at finger speed and moves the pointer under the fingers
- The first finger is held back briefly so a two-finger gesture never starts a touch in the app
- pacman takes over files other DroidDeck software already installed and won't remove those packages
2026-10-27 15:17:15 -04:00
maxjivi05 2f71916019 Two-finger hold right-clicks and two-finger slide scrolls on the desktop
A two-finger tap or a still two-finger hold right-clicks where the first
finger landed; two fingers sliding together scroll like a mouse wheel,
while a pinch still reaches the app as touch so zooming works.

pacman's backup records take md5 from the package files, since Arch
Linux ARM's .MTREE only carries sha256 now. removal-manifests.py gains
--add to append a new desktop version without regenerating the older
inventories, and covers the overlay's symlinks and pacman files.
2026-10-27 15:17:15 -04:00
maxjivi05 49201e1afa Make the desktop a proper Arch desktop: pacman, sudo, utilities and touch right-click
The KDE desktop package now records every package it ships in pacman's
database and carries a pinned droiddeck repository built from the same
Arch Linux ARM snapshot, so pacman installs software that matches the
desktop's Qt and KDE versions and never upgrades what DroidDeck ships.
sudo, su and sudoedit run commands as root through a small preload, and
pacman hooks refuse to remove or replace DroidDeck's own packages and
remember user installs so they come back after runtime updates.

Adds zip, 7zip, unrar, less, man pages, htop, git, wget, wl-clipboard,
xclip, KCalc, Okular, Filelight, KFind, System Monitor, Elisa and
Discover, pins Kate to the panel, and hides technical menu entries.
Updates KWin to 6.8.1 to match the repository.

A two-finger tap now right-clicks on the desktop, and the Android
clipboard is only pushed into the session when it changed, so files
copied in Dolphin stay pasteable after leaving the app.
2026-10-27 15:17:15 -04:00
167 changed files with 4652 additions and 246 deletions

No files matched your search

+1 -1
View File
@@ -760,7 +760,7 @@ jobs:
checks:
name: Compile and test APK
needs: [build, python-tests]
if: ${{ always() && (github.event_name != 'pull_request' || !github.event.pull_request.draft) }}
if: ${{ !cancelled() && (github.event_name != 'pull_request' || !github.event.pull_request.draft) }}
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
+1 -1
View File
@@ -61,7 +61,7 @@ jobs:
jq -r --arg n "$2" '.assets // [] | .[] | select(.name == $n) | .digest // empty'
}
commit=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$BUILD_RUN" --jq .head_sha 2>/dev/null || echo "$GITHUB_SHA")
for name in proot directaudio tracking xbox comet; do
for name in proot directaudio tracking xbox comet butler; do
file="packs/$name.tar.zst"
[ -f "$file" ] || { echo "::error::$name.tar.zst is missing from Build APK run $BUILD_RUN"; exit 1; }
sha=$(sha256sum "$file" | cut -d' ' -f1)
+9 -1
View File
@@ -33,6 +33,14 @@ Use Android 9 or newer on a supported Adreno device (730 or newer, or 8xx). Adre
On Android 14 and newer, before Steam launches, you must turn on **Disable child process restrictions** in Developer options. If this option is not available in developer settings (Android 12 and 13 devices), first launch of Steam will present a "Fix it for me" button, which will help automate the setup process.
## Physical button shortcuts
Open the launcher's **Controls** settings, **Setup → Controller → Button mapping**, or the session drawer's **Controller** page. Each menu action has one row showing **Custom** or **Default**. Select the current value beside **Steam menu**, **Open Quick Access Menu**, or **DroidDeck menu**, then press and release a physical button. The assignment saves automatically on release; confirmation is only required if the button already opens another menu. Assignments are stored per controller; each action has one assigned button per controller. A mapped button performs the shortcut instead of sending its normal input to the game. Steam shortcuts only apply in Steam sessions, and shortcuts are inactive while loading, suspended, or using the on-screen keyboard or other input dialogs.
Unassigned buttons keep their existing behavior, including the Back button's single/double-press setting and Select-to-Steam option. While the session drawer is open, A selects the focused item even if it has a shortcut assignment. Select an action's current value and use **Reset** beside an assignment to restore that behavior without changing touch layouts or other controller settings. **Close** exits capture without changing an assignment; it does not undo an assignment already applied. The touchscreen remains available for configuration and recovery.
Extra buttons such as M1/M2 work only if Android exposes distinct key events to the app. Android Home, volume and other reserved system keys cannot be assigned; making DroidDeck the default launcher retains its existing Home-to-Steam behavior. Firmware that intercepts a button or makes it duplicate another button cannot be overridden here. During capture, the detected device and button name are shown. If a controller disconnects before release, use **Try another button** to restart capture; **Reset** remains available for existing assignments. Capture and shortcut-action diagnostics, including key and scan codes, are included in session logs when capture runs inside a session. If a button is not detected, record its physical label, firmware/controller mode, and whether it leaves the app, then share the session logs.
## Smart glasses
Use **Setup → Smart glasses** for app-wide virtual-screen settings across DroidDeck menus, launchers, desktop sessions, and games. Supported VITURE, RayNeo, XREAL, and Rokid connections provide 3DoF; Luma Ultra adds optional experimental 6DoF and stereo-assisted hand/Joy-Con tracking. Model support and SDK requirements differ: see the [smart-glasses support matrix](docs/smart-glasses-support.md) for supported devices, controls, setup, and limitations.
@@ -61,7 +69,7 @@ Compatibility and performance vary by device; hardware validation is limited. De
## Credits and licence
GPL-3.0. Runtime, shim, input, and controller work build on WinNative and Bannerlator (maxjivi05). Epic Games and GOG support build on [Phobos’s](https://github.com/phobos665) adaptation of [Legendary](https://github.com/legendary-gl/legendary) and [gogdl](https://github.com/Heroic-Games-Launcher/heroic-gogdl), respectively. Battle.net support is [@kayakyakr](https://github.com/kayakyakr)'s: it runs Blizzard's own Battle.net client, downloaded from Blizzard and not included, in Proton, and shows the key art from each game's [Battle.net Shop](https://shop.battle.net) page; without the Steam client its games see DroidDeck's pad as an Xbox 360 controller through `PROTON_SPOOF_STEAMINPUT_VIDPID` in [Proton](https://github.com/ValveSoftware/wine)'s `dlls/winebus.sys`. Its games install from Stores through Blizzard's own Agent and the local HTTP API it serves, driven the way [@barncastle](https://github.com/barncastle)'s [Battle.Net-Installer](https://github.com/barncastle/Battle.Net-Installer) drives it, with the requests described on [wowdev.wiki](https://wowdev.wiki/Agent); how other launchers find, install and start Blizzard games was read in [@mubaraknumann](https://github.com/mubaraknumann)'s [unifideck](https://github.com/mubaraknumann/unifideck), [@djmittens](https://github.com/djmittens)'s [neo-mittens](https://github.com/djmittens/neo-mittens) `bnetswitch`, [@BCD1210](https://github.com/BCD1210)'s [soju](https://github.com/BCD1210/soju) and [Lutris](https://github.com/lutris/lutris)'s `product.db` reader, without taking their code. The registry entries a GOG game's install script (`goggame-<id>.script`) sets are read the way [Heroic Games Launcher](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher)'s GOG setup (GPL-3.0) reads them. LSFG frame generation is from the work of Camille LaVey and the [Eden](https://eden-emu.dev) emulator project, following [lsfg-vk](https://github.com/PancakeTAS/lsfg-vk), ported to WinNative and DroidDeck by [@maxjivi05](https://github.com/maxjivi05); it needs your own copy of [Lossless Scaling](https://store.steampowered.com/app/993090/) and ships none of its shaders. x86 AppImages, and any whose own runtime cannot unpack them, are unpacked with [uruntime](https://github.com/VHSgunzo/uruntime) by VHSgunzo (MIT), shipped unmodified with its licence, which also starts the arm64 emulator AppImages whose own runtime cannot run its extractor on Android. x86 AppImages packed with [sharun](https://github.com/VHSgunzo/sharun) by VHSgunzo (MIT) start because DroidDeck's own [FEX](https://github.com/FEX-Emu/FEX) build (MIT) puts the platform name under `AT_PLATFORM`, which sharun's [userland-execve](https://crates.io/crates/userland-execve) loader (MIT) requires; FEX filed it under `AT_BASE_PLATFORM`. The Steam client's audio goes through [@The412Banner](https://github.com/The412Banner)'s [DirectAudio](https://github.com/The412Banner/directaudio) PulseAudio sink (LGPL-2.1-or-later), built from `tools/directaudio/sink` with its request size kept to its ring so clients are not asked to queue 100 ms ahead. The in-game performance HUD is [@The412Banner](https://github.com/The412Banner)'s [FusionHUD](https://github.com/The412Banner/FusionHUD) (GPL-3.0 with an attribution term), Bannerlator's HUD; its frame rate, frame times and readings are taken from the same sources, and worked out the same way, as Valve's [MangoHud](https://github.com/flightlessmango/MangoHud) build (MIT) that runs Steam's performance overlay in a DroidDeck session, with the frame times shared by gamescope patch 0125; when gamescope sends no frames for two seconds, the HUD counts the frames DroidDeck's compositor shows instead, which stop at the screen's refresh rate. mmap ring-buffer controller input was developed by ribbit384 ([WinNative #345](https://github.com/WinNative-Emu/WinNative/pull/345)). Why the x86-64 Steam client refused the arm64 client's sign-in was checked by reading Steam's saved token with the `ConnectCache` format from [deadlock-api-ingest](https://github.com/deadlock-api/deadlock-api-ingest). x86 programs that link OpenSSL 3 under FEX use the copy in the [Steam Linux Runtime 4.0](https://gitlab.steamos.cloud/steamrt/steamrt) platform. Hooks written with `WriteProcessMemory` into code [FEX](https://github.com/FEX-Emu/FEX) has translated go through `/proc/<pid>/mem` again when the kernel refuses `process_vm_writev`, as [Wine](https://gitlab.winehq.org/wine/wine)'s `server/ptrace.c` wrote them before Wine 11. x86 Linux games under FEX get the same `/etc/asound.conf` that [pressure-vessel](https://gitlab.steamos.cloud/steamrt/steam-runtime-tools) writes into the Steam Linux Runtime, so ALSA plays through PulseAudio. Games render with [Mesa](https://gitlab.freedesktop.org/mesa/mesa) Turnip's own per-render-pass choice between tile memory and system memory, while the Steam client keeps `TU_DEBUG=sysmem`; [FEX](https://github.com/FEX-Emu/FEX)'s code disk cache was checked in its source and isLine truncated
GPL-3.0. Runtime, shim, input, and controller work build on WinNative and Bannerlator (maxjivi05). Epic Games and GOG support build on [Phobos’s](https://github.com/phobos665) adaptation of [Legendary](https://github.com/legendary-gl/legendary) and [gogdl](https://github.com/Heroic-Games-Launcher/heroic-gogdl), respectively. Battle.net support is [@kayakyakr](https://github.com/kayakyakr)'s: it runs Blizzard's own Battle.net client, downloaded from Blizzard and not included, in Proton, and shows the key art from each game's [Battle.net Shop](https://shop.battle.net) page; without the Steam client its games see DroidDeck's pad as an Xbox 360 controller through `PROTON_SPOOF_STEAMINPUT_VIDPID` in [Proton](https://github.com/ValveSoftware/wine)'s `dlls/winebus.sys`. Its games install from Stores through Blizzard's own Agent and the local HTTP API it serves, driven the way [@barncastle](https://github.com/barncastle)'s [Battle.Net-Installer](https://github.com/barncastle/Battle.Net-Installer) drives it, with the requests described on [wowdev.wiki](https://wowdev.wiki/Agent); how other launchers find, install and start Blizzard games was read in [@mubaraknumann](https://github.com/mubaraknumann)'s [unifideck](https://github.com/mubaraknumann/unifideck), [@djmittens](https://github.com/djmittens)'s [neo-mittens](https://github.com/djmittens/neo-mittens) `bnetswitch`, [@BCD1210](https://github.com/BCD1210)'s [soju](https://github.com/BCD1210/soju) and [Lutris](https://github.com/lutris/lutris)'s `product.db` reader, without taking their code. The registry entries a GOG game's install script (`goggame-<id>.script`) sets are read the way [Heroic Games Launcher](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher)'s GOG setup (GPL-3.0) reads them. LSFG frame generation is from the work of Camille LaVey and the [Eden](https://eden-emu.dev) emulator project, following [lsfg-vk](https://github.com/PancakeTAS/lsfg-vk), ported to WinNative and DroidDeck by [@maxjivi05](https://github.com/maxjivi05); it needs your own copy of [Lossless Scaling](https://store.steampowered.com/app/993090/) and ships none of its shaders. x86 AppImages, and any whose own runtime cannot unpack them, are unpacked with [uruntime](https://github.com/VHSgunzo/uruntime) by VHSgunzo (MIT), shipped unmodified with its licence, which also starts the arm64 emulator AppImages whose own runtime cannot run its extractor on Android. x86 AppImages packed with [sharun](https://github.com/VHSgunzo/sharun) by VHSgunzo (MIT) start because DroidDeck's own [FEX](https://github.com/FEX-Emu/FEX) build (MIT) puts the platform name under `AT_PLATFORM`, which sharun's [userland-execve](https://crates.io/crates/userland-execve) loader (MIT) requires; FEX filed it under `AT_BASE_PLATFORM`. The Steam client's audio goes through [@The412Banner](https://github.com/The412Banner)'s [DirectAudio](https://github.com/The412Banner/directaudio) PulseAudio sink (LGPL-2.1-or-later), built from `tools/directaudio/sink` with its request size kept to its ring so clients are not asked to queue 100 ms ahead. The in-game performance HUD is [@The412Banner](https://github.com/The412Banner)'s [FusionHUD](https://github.com/The412Banner/FusionHUD) (GPL-3.0 with an attribution term), Bannerlator's HUD; its frame rate, frame times and readings are taken from the same sources, and worked out the same way, as Valve's [MangoHud](https://github.com/flightlessmango/MangoHud) build (MIT) that runs Steam's performance overlay in a DroidDeck session, with the frame times shared by gamescope patch 0125; when gamescope sends no frames for two seconds, the HUD counts the frames DroidDeck's compositor shows instead, which stop at the screen's refresh rate. mmap ring-buffer controller input was developed by ribbit384 ([WinNative #345](https://github.com/WinNative-Emu/WinNative/pull/345)). Why the x86-64 Steam client refused the arm64 client's sign-in was checked by reading Steam's saved token with the `ConnectCache` format from [deadlock-api-ingest](https://github.com/deadlock-api/deadlock-api-ingest). x86 programs that link OpenSSL 3 under FEX use the copy in the [Steam Linux Runtime 4.0](https://gitlab.steamos.cloud/steamrt/steamrt) platform. Hooks written with `WriteProcessMemory` into code [FEX](https://github.com/FEX-Emu/FEX) has translated go through `/proc/<pid>/mem` again when the kernel refuses `process_vm_writev`, as [Wine](https://gitlab.winehq.org/wine/wine)'s `server/ptrace.c` wrote them before Wine 11. x86 Linux games under FEX get the same `/etc/asound.conf` that [pressure-vessel](https://gitlab.steamos.cloud/steamrt/steam-runtime-tools) writes into the Steam Linux Runtime, so ALSA plays through PulseAudio. Games render with [Mesa](https://gitlab.freedesktop.org/mesa/mesa) Turnip's own per-render-pass choice between tile memory and system memory, while the Steam client keeps `TU_DEBUG=sysmem`; [FEX](https://github.com/FEX-Emu/FEX)'s code disk cache was checked in its source and isLine truncated
XR glasses support builds on WinNative's VITURE glasses work. VITURE protocol details were checked against [XRLinuxDriver](https://github.com/wheaney/XRLinuxDriver) by [@wheaney](https://github.com/wheaney), including the VITURE protocol header it ships, [ar-drivers-rs](https://github.com/badicsalex/ar-drivers-rs) by [@badicsalex](https://github.com/badicsalex) and the [go-macos/iokit VITURE package](https://pkg.go.dev/github.com/go-macos/iokit/viture); the optional VITURE SDK belongs to VITURE and is not included. RayNeo support adapts [@informalTechCode](https://github.com/informalTechCode)'s [RayNeo-Air-Series-3DoF-Scaffold](https://github.com/informalTechCode/RayNeo-Air-Series-3DoF-Scaffold) (Apache-2.0) and references [@verncat](https://github.com/verncat)'s [RayNeo-Air-3S-Pro-OpenVR](https://github.com/verncat/RayNeo-Air-3S-Pro-OpenVR) (MIT) and [Monado](https://gitlab.freedesktop.org/monado/monado) (BSL-1.0); see [docs/third-party/rayneo](docs/third-party/rayneo/README.md). XREAL 1S support references [XRLinuxDriver](https://github.com/wheaney/XRLinuxDriver) and [xrealOneDeviceKit](https://github.com/wheaney/xrealOneDeviceKit) by @wheaney, [xreal_one_driver](https://github.com/rohitsangwan01/xreal_one_driver) by [@rohitsangwan01](https://github.com/rohitsangwan01) (MIT) and [xr-tools](https://github.com/0xcaff/xr-tools) by [@0xcaff](https://github.com/0xcaff). Rokid support follows the Rokid protocol notes in [ar-drivers-rs](https://github.com/badicsalex/ar-drivers-rs) and @badicsalex's [Void Computing write-ups](https://voidcomputing.hu/blog/worse-better-prettier/), and [Monado](https://gitlab.freedesktop.org/monado/monado)'s Rokid driver. The REDMAGIC glasses-display findings draw on [@mekhontsev](https://github.com/mekhontsev)'s [MagicDesk investigation](https://github.com/mekhontsev/magicdesk/blob/main/docs/xr-resolution-fix.md) and [@Coding-BR](https://github.com/Coding-BR)'s [decompiled Nubia kernel](https://github.com/Coding-BR/android_kernel_nubia_sm8850_qwjujube). VITURE, RayNeo, XREAL, Rokid and REDMAGIC are trademarks of their owners; this project is not affiliated with them.
+1 -1
View File
@@ -90,7 +90,7 @@ def trackingPack = rootProject.file('tools/packs/tracking/release.env').readLine
def prootPackPin = rootProject.file('tools/packs/proot/release.env').readLines()
.findAll { it.contains('=') && !it.startsWith('#') }
.collectEntries { def kv = it.split('=', 2); [(kv[0].trim()): kv[1].trim()] }
def addonPacks = ['proot', 'directaudio', 'tracking', 'xbox', 'comet'].collectEntries { name ->
def addonPacks = ['proot', 'directaudio', 'tracking', 'xbox', 'comet', 'butler'].collectEntries { name ->
def pack = file("build/packs/${name}.tar.zst")
if (!pack.isFile()) {
if (ciBuild) throw new GradleException("Add-on pack ${pack} is missing: run tools/packs/build.sh app/build/packs")
+18 -1
View File
@@ -2124,7 +2124,21 @@ void droiddeck_stream_frame(AHardwareBuffer *ahb) {
unsigned droiddeck_stream_frames(void) { return atomic_load(&g_stream_frames); }
static int64_t g_scene_due_ns;
static int scene_held_for_limit(int64_t now, int64_t due, int limit, int unpaced) {
if (limit <= 0 || unpaced || due <= 0) return 0;
return now < due - 1000000LL;
}
static int64_t scene_next_due(int64_t now, int64_t due, int limit) {
if (limit <= 0) return 0;
const int64_t interval = 1000000000LL / limit;
return due > 0 && now - due < interval ? due + interval : now + interval;
}
static void render_scene(void) {
g_scene_due_ns = scene_next_due(now_ns(), g_scene_due_ns, g_fps_limit);
if (atomic_load(&g_stream_on)) { g_dirty_since_ns = 0; render_stream(); return; }
struct draw_list dl = {0};
struct surface *s;
@@ -2302,7 +2316,9 @@ static void render_scene(void) {
static int on_fallback_timer(void *data) {
g_fallback_armed = 0;
if (g_dirty) render_scene();
if (!g_dirty) return 0;
if (scene_held_for_limit(now_ns(), g_scene_due_ns, g_fps_limit, g_release_unpaced)) schedule_render();
else render_scene();
return 0;
}
@@ -2377,6 +2393,7 @@ static void on_vsync(int64_t frame_time_ns) {
g_tick_held = 1;
return;
}
if (g_dirty && scene_held_for_limit(now, g_scene_due_ns, g_fps_limit, g_release_unpaced)) return;
if (g_dirty && !scene_waits_for_game(now)) render_scene();
}
@@ -109,6 +109,8 @@ class FrontEndActivity : ComponentActivity() {
private var ready by mutableStateOf(false)
private var removalPending by mutableStateOf(false)
private var available by mutableStateOf<LinuxRuntimeInstaller.Release?>(null)
private var catalogFresh = false
private var componentsQueueBusy by mutableStateOf(false)
private var busy by mutableStateOf(false)
private var stage by mutableStateOf("")
private var percent by mutableIntStateOf(-1)
@@ -193,7 +195,7 @@ class FrontEndActivity : ComponentActivity() {
private var navRequest by mutableStateOf<String?>(null)
private var storesShowMature by mutableStateOf(false)
private var storesSort by mutableStateOf(SessionPrefs.STORES_SORTS.first())
private var storesView by mutableStateOf(SessionPrefs.STORES_VIEWS.first())
private var storesView by mutableStateOf(SessionPrefs.DEFAULT_STORES_VIEW)
private var mic by mutableStateOf(false)
private var wifiDiscovery by mutableStateOf(false)
private var wifiDiscoveryPermission by mutableStateOf(false)
@@ -537,6 +539,11 @@ class FrontEndActivity : ComponentActivity() {
override fun onDisplayRemoved(displayId: Int) = refreshSecondScreenDisplays()
override fun onDisplayChanged(displayId: Int) = refreshSecondScreenDisplays()
}
private val secondScreenTouchListener = object : android.hardware.input.InputManager.InputDeviceListener {
override fun onInputDeviceAdded(deviceId: Int) = refreshSecondScreenDisplays()
override fun onInputDeviceRemoved(deviceId: Int) = refreshSecondScreenDisplays()
override fun onInputDeviceChanged(deviceId: Int) = refreshSecondScreenDisplays()
}
private val homeRoleRequest = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
refreshHomeAppState()
@@ -666,7 +673,23 @@ class FrontEndActivity : ComponentActivity() {
private var shortcutPicker by mutableStateOf(false)
private var shortcutLibraryScanning by mutableStateOf(false)
@Volatile private var libraryScanGeneration = 0
@Volatile private var lastComponentRestore = 0L
@Volatile private var componentRestoreRetry = false
private val componentRestoreLock = Any()
private fun retryComponentRestore() {
val run = synchronized(componentRestoreLock) {
componentRestoreRetry = false
val now = android.os.SystemClock.elapsedRealtime()
(!isDestroyed && now - lastComponentRestore >= COMPONENT_RESTORE_MS).also { if (it) lastComponentRestore = now }
}
if (run) Thread({
runCatching { com.droiddeck.launcher.frontend.AutoComponents.restoreMissing(this) }.onFailure { Log.w(TAG, "components: restore failed", it) }
}, "components-restore").start()
}
private var pendingGameLink: String? = null
private var gameLinkReading = false
private var gameLinkTried = false
private var gameSyncFolder by mutableStateOf<String?>(null)
private fun pickGameExport(game: Library.SteamGame?) {
onSavePicked = { folder ->
@@ -707,16 +730,25 @@ class FrontEndActivity : ComponentActivity() {
shortcutLibraryScanning = true
} else shortcutLibraryScanning = false
pendingGameLink = null
gameLinkReading = false
gameLinkTried = false
if (GameLaunchIntent.accepts(request.action)) {
gameLinkReading = true
com.droiddeck.launcher.ui.DualScreenPanel.hide(taskId)
val copy = Intent(request)
Thread({
val id = GameLaunchIntent.read(this, copy)
ui.post {
if (intent === request && !isDestroyed) {
gameLinkReading = false
pendingGameLink = id
if (id == null) {
syncDualPanel()
android.widget.Toast.makeText(this, R.string.game_link_invalid, android.widget.Toast.LENGTH_LONG).show()
} else refresh()
} else {
handleGameLink(steamGames, scanned = false)
refresh()
}
}
}
}, "game-launch-file").start()
@@ -919,15 +951,21 @@ class FrontEndActivity : ComponentActivity() {
ui.postDelayed(poll, SESSION_SWITCH_POLL_MS)
}
private fun handleGameLink(games: List<Library.SteamGame>) {
private fun handleGameLink(games: List<Library.SteamGame>, scanned: Boolean = true) {
if (!lifecycle.currentState.isAtLeast(androidx.lifecycle.Lifecycle.State.RESUMED)) return
val id = pendingGameLink ?: return
if (!scanned && games.none { it.gameIdString == id }) return
gameLinkTried = true
ui.postDelayed({
if (!isDestroyed && lifecycle.currentState.isAtLeast(androidx.lifecycle.Lifecycle.State.RESUMED)) syncDualPanel()
}, LINK_PANEL_MS)
val game = games.firstOrNull { it.gameIdString == id }
if (game == null) {
pendingGameLink = null
intent.data = null
intent.action = Intent.ACTION_MAIN
intent.removeExtra(GameLaunchIntent.EXTRA_APP_ID)
syncDualPanel()
android.widget.Toast.makeText(this, R.string.game_link_missing, android.widget.Toast.LENGTH_LONG).show()
} else if (launchGame(game, returnHome = true)) {
pendingGameLink = null
@@ -1498,6 +1536,9 @@ class FrontEndActivity : ComponentActivity() {
super.onNewIntent(intent)
setIntent(intent)
if (intent.action == SteamIntegration.ACTION_SETUP) {
gameLinkReading = false
pendingGameLink = null
syncDualPanel()
readIntegrationIntent(intent)
return
}
@@ -1591,12 +1632,14 @@ class FrontEndActivity : ComponentActivity() {
override fun onPause() {
compatLaunchVisible = false
if (android.os.Build.VERSION.SDK_INT >= 29) com.droiddeck.launcher.ui.DualScreenPanel.yieldTo(taskId, true)
super.onPause()
}
override fun onResume() {
super.onResume()
compatLaunchVisible = true
com.droiddeck.launcher.ui.DualScreenPanel.yieldTo(taskId, false)
orientation = SessionPrefs.orientation(this)
launcherOrientation = com.droiddeck.launcher.core.AppUiPrefs.orientation(this)
requestedOrientation = launcherOrientation
@@ -1614,14 +1657,21 @@ class FrontEndActivity : ComponentActivity() {
drivers.checkOnOpen()
resumeInterruptedPackages()
protons.checkUpdates()
if (!SessionState.running) Thread({
val applied = runCatching { ComponentsManager.applyQueued(this) }.getOrDefault(emptyList())
if (applied.isNotEmpty()) ui.post {
android.widget.Toast.makeText(this, getString(R.string.main_applied, applied.joinToString(", ")), android.widget.Toast.LENGTH_LONG).show()
}
ui.post { if (showComponents) components.refreshComponents() }
}, "components-queue").start()
else if (showComponents) components.refreshComponents()
catalogFresh = false
if (!SessionState.running && !componentsQueueBusy && !LinuxRuntimeInstaller.isBusy()) {
componentsQueueBusy = true
Thread({
val applied = runCatching { ComponentsManager.applyQueued(this) }.getOrDefault(emptyList())
if (applied.isNotEmpty()) ui.post {
android.widget.Toast.makeText(this, getString(R.string.main_applied, applied.joinToString(", ")), android.widget.Toast.LENGTH_LONG).show()
}
ui.post {
componentsQueueBusy = false
if (showComponents) components.refreshComponents()
autoUpdateRuntime()
}
}, "components-queue").start()
} else if (showComponents) components.refreshComponents()
oscMode = SessionPrefs.oscMode(this)
refreshController()
refreshHomeAppState()
@@ -1644,6 +1694,7 @@ class FrontEndActivity : ComponentActivity() {
addDataScheme("file")
})
displayManager.registerDisplayListener(secondScreenDisplayListener, ui)
getSystemService(android.hardware.input.InputManager::class.java)?.registerInputDeviceListener(secondScreenTouchListener, ui)
launcherStarted = true
refreshSecondScreenDisplays()
getSystemService(android.content.pm.LauncherApps::class.java).registerCallback(packageCallback, ui)
@@ -1687,8 +1738,9 @@ class FrontEndActivity : ComponentActivity() {
com.droiddeck.launcher.stores.StoresState.libraryListener = null
com.droiddeck.launcher.stores.battlenet.BattleNetClient.opener = null
displayManager.unregisterDisplayListener(secondScreenDisplayListener)
getSystemService(android.hardware.input.InputManager::class.java)?.unregisterInputDeviceListener(secondScreenTouchListener)
launcherStarted = false
com.droiddeck.launcher.ui.DualScreenPanel.hide()
com.droiddeck.launcher.ui.DualScreenPanel.hide(taskId)
flood = null
returning = null
floodProgress = 0f
@@ -1723,8 +1775,7 @@ class FrontEndActivity : ComponentActivity() {
// The launcher can itself be shown on a non-default display (DeX, an external monitor); that one is not a "second screen".
val ownDisplayId = if (android.os.Build.VERSION.SDK_INT >= 30) display?.displayId ?: android.view.Display.DEFAULT_DISPLAY else @Suppress("DEPRECATION") windowManager.defaultDisplay.displayId
dualScreenMode = SessionPrefs.dualScreenMode(this)
secondScreenDisplays = if (dualScreenMode == com.droiddeck.launcher.input.DualScreen.MODE_OFF) emptyList()
else SecondScreenDisplays.available(displayManager, ownDisplayId)
secondScreenDisplays = SecondScreenDisplays.available(displayManager, ownDisplayId)
dualScreenDevice = com.droiddeck.launcher.input.DualScreen.anyDisplay(displayManager, ownDisplayId) != null
dualScreenLauncher = SessionPrefs.dualScreenLauncher(this)
dualScreenControls = SessionPrefs.dualScreenSessionControls(this)
@@ -1734,14 +1785,20 @@ class FrontEndActivity : ComponentActivity() {
}
private fun syncDualPanel() {
if (launchPending()) return
if (launcherStarted && dualDisplayId >= 0) com.droiddeck.launcher.ui.DualScreenPanel.show(this, dualDisplayId, taskId)
else com.droiddeck.launcher.ui.DualScreenPanel.hide()
else com.droiddeck.launcher.ui.DualScreenPanel.hide(taskId)
}
private fun launchPending(): Boolean = gameLinkReading || (pendingGameLink != null && !gameLinkTried)
private fun launchAndroidApp(app: HomeApp.LaunchableApp, displayId: Int?) {
val onOwnScreen = displayId == null || displayId == (display?.displayId ?: Display.DEFAULT_DISPLAY)
if (onOwnScreen) com.droiddeck.launcher.ui.DualScreenPanel.yieldTo(taskId, true)
try {
HomeApp.launch(this, app, displayId)
} catch (_: Exception) {
com.droiddeck.launcher.ui.DualScreenPanel.yieldTo(taskId, false)
val label = secondScreenDisplays.firstOrNull { it.id == displayId }?.label
val message = when {
displayId == null || displayId == Display.DEFAULT_DISPLAY -> getString(R.string.android_app_open_failed_primary, app.label)
@@ -2423,6 +2480,7 @@ class FrontEndActivity : ComponentActivity() {
installed = LinuxRuntimeInstaller.installedVersion(this)
ready = LinuxRuntime.isInstalled(this)
removalPending = LinuxRuntimeInstaller.hasRemovalPending(this)
ui.post { autoUpdateRuntime() }
frameGenLabel = FrameGen.label(this)
romsDir = SessionPrefs.romsDir(this).takeIf { it.isNotEmpty() }
logsEnabled = SessionPrefs.logsEnabled(this)
@@ -2465,15 +2523,32 @@ class FrontEndActivity : ComponentActivity() {
}
val scannedArch = SessionPrefs.activeSteamClientArch(this)
val scannedX64 = scannedArch == "x86_64"
val games = if (ready) Library.launchableGames(this, arch = scannedArch) else emptyList()
val games = if (ready || com.droiddeck.launcher.runtime.LinuxRuntime.hasRootfs(this)) Library.launchableGames(this, arch = scannedArch) else emptyList()
val all = games.distinctBy { it.gameId }
if (ready && scanGeneration == libraryScanGeneration) com.droiddeck.launcher.frontend.LibraryCache.save(this, all, scannedX64)
val endedSession = SessionState.sessionId.takeIf { !SessionState.running && it != null && it != componentSweepSession }
if (ready && (!componentSweepDone || endedSession != null)) {
val sweepDue = ready && (!componentSweepDone || endedSession != null)
if (sweepDue) {
componentSweepDone = true
endedSession?.let { componentSweepSession = it }
ui.postDelayed({ Thread({ com.droiddeck.launcher.frontend.AutoComponents.sweep(this, all) }, "components-sweep").start() }, 10_000)
}
val restoreDue = synchronized(componentRestoreLock) {
val now = android.os.SystemClock.elapsedRealtime()
val due = ready && (lastComponentRestore == 0L || now - lastComponentRestore >= COMPONENT_RESTORE_MS)
if (due) {
lastComponentRestore = now
} else if (ready && !componentRestoreRetry) {
componentRestoreRetry = true
ui.postDelayed({ retryComponentRestore() }, (COMPONENT_RESTORE_MS - (now - lastComponentRestore)).coerceAtLeast(0L))
}
due
}
if (restoreDue || sweepDue) ui.postDelayed({
Thread({
if (restoreDue) runCatching { com.droiddeck.launcher.frontend.AutoComponents.restoreMissing(this) }.onFailure { Log.w(TAG, "components: restore failed", it) }
if (sweepDue) com.droiddeck.launcher.frontend.AutoComponents.sweep(this, all)
}, "components-restore").start()
}, 10_000)
ui.post {
if (scanGeneration == libraryScanGeneration) {
val current = steamGames.filter { it.library != Library.ADDED }.associateBy { it.appId }
@@ -2567,7 +2642,7 @@ class FrontEndActivity : ComponentActivity() {
private fun runtimeChangesBlocked(): Boolean =
busy || LinuxRuntimeInstaller.isBusy() || SessionState.running ||
SessionState.phase !in setOf(SessionPhase.IDLE, SessionPhase.FAILED) ||
protons.protonBusyId != null || ProtonExtras.installInProgress || pkgStage != null ||
protons.protonBusyId != null || ProtonExtras.installInProgress || pkgStage != null || componentsQueueBusy ||
components.compBusy != null || saveBusy != null || com.droiddeck.launcher.store.UserAppsState.working != null
private fun removeDesktop() {
@@ -2627,15 +2702,32 @@ class FrontEndActivity : ComponentActivity() {
}, "runtime-operation").start()
}
private fun autoUpdateRuntime() {
val release = available?.takeIf { catalogFresh } ?: return
if (!lifecycle.currentState.isAtLeast(androidx.lifecycle.Lifecycle.State.RESUMED) || runtimeChangesBlocked() || removalPending) return
if (release.version == installed || installed == null) return
if (com.droiddeck.launcher.runtime.RuntimeAutoUpdate.claim(this, installed, release.version)) {
Log.i(TAG, "runtime: updating $installed to ${release.version} by itself")
install(release)
}
}
private fun checkCatalog() {
val release = LinuxRuntimeInstaller.fetchRelease()
Log.i(TAG, "catalog: " + (release?.version ?: "unreachable"))
ui.post { if (release != null) available = release }
ui.post {
if (release == null) return@post
available = release
catalogFresh = true
autoUpdateRuntime()
}
}
companion object {
private const val TAG = "MainActivity"
private const val MEDIA_SETTLE_MS = 1500L
private const val COMPONENT_RESTORE_MS = 60_000L
private const val LINK_PANEL_MS = 1500L
private const val SESSION_SWITCH_WAIT_MS = 30_000L
private const val SESSION_SWITCH_POLL_MS = 250L
private const val KEY_PENDING_SWITCH = "pending_switch"
@@ -75,6 +75,8 @@ import com.droiddeck.launcher.input.ControllerPrefs
import com.droiddeck.launcher.input.SessionClipboard
import com.droiddeck.launcher.input.OnScreenControls
import com.droiddeck.launcher.input.PadBridge
import com.droiddeck.launcher.input.PhysicalShortcuts
import com.droiddeck.launcher.input.PhysicalShortcutRouter
import com.droiddeck.launcher.input.PadMouse
import com.droiddeck.launcher.input.PadState
import com.droiddeck.launcher.input.ScreenKeys
@@ -162,6 +164,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
private lateinit var hud: FusionHudHost
private lateinit var memoryHud: com.droiddeck.launcher.session.MemoryHud
private var padBridge: PadBridge? = null
private val physicalShortcuts = PhysicalShortcutRouter()
private var joyConVr: com.droiddeck.launcher.input.JoyConVr? = null
private var handCamera: com.droiddeck.launcher.handtracking.HandCamera? = null
private var padMotion: com.droiddeck.launcher.input.PadMotion? = null
@@ -212,6 +215,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
private var gestureConfig = com.droiddeck.launcher.input.TouchGestureConfig()
private var gestureGame: String? = null
private var gestureSettingsOpen by mutableStateOf(false)
private var steamImportAsk by mutableStateOf<com.droiddeck.launcher.session.SteamImportPrompt.Ask?>(null)
private var steamImportAnswered: String? = null
private var directHoldBehavior by mutableStateOf(com.droiddeck.launcher.input.TouchGestureConfig.MOUSE_BEHAVIOR_CLICK)
private var screenKeyPickerOpen by mutableStateOf(false)
private var screenKeyBind: List<Int>? = null
@@ -351,9 +356,13 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
private var drawerDefaultProton by mutableStateOf<String?>(null)
private val drawerComponentMenu by lazy { ComponentsMenu(this, uiHandler) }
private var drawerGameProfileId by mutableStateOf<Long?>(null)
private var fpsLimit by mutableStateOf(SessionState.fpsLimit)
private fun noSteamSession(): Boolean = SessionState.mode == SessionService.MODE_RUN &&
SessionState.program in setOf(com.droiddeck.launcher.session.NoSteamLaunch.PROTON_RUN, com.droiddeck.launcher.session.NoSteamLaunch.EPIC)
SessionState.program in setOf(
com.droiddeck.launcher.session.NoSteamLaunch.PROTON_RUN, com.droiddeck.launcher.session.NoSteamLaunch.EPIC,
com.droiddeck.launcher.session.NoSteamLaunch.BATTLENET,
)
private val drawerGameInventory = GameProfileInventoryCache<Library.SteamGame>()
private var drawerGameInventoryRevision = 0L
private var drawerGameFexPresetSaving by mutableStateOf(false)
@@ -430,6 +439,11 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
private val cardboardPrefListener = android.content.SharedPreferences.OnSharedPreferenceChangeListener { _, key ->
if (key == SessionPrefs.CARDBOARD_KEY) uiHandler.post { applyCardboard(SessionPrefs.cardboard(this)) }
}
private val shortcutPrefListener = android.content.SharedPreferences.OnSharedPreferenceChangeListener { _, key ->
if (key == null || key == PhysicalShortcuts.KEY) {
physicalShortcuts.bindings = PhysicalShortcuts.read(this)
}
}
private var textureAnisotropy by mutableStateOf(0)
private var textureLodBias by mutableStateOf(TextureFiltering.LOD_BIAS_OFF)
private var drawerTextureAnisotropy by mutableStateOf<Int?>(null)
@@ -439,6 +453,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
if (r.resultCode == RESULT_OK) InAppFilePicker.pickedFile(r.data)?.let { importLossless(it) }
}
private var frameGen by mutableStateOf(FrameGen.Mode.OFF)
private var frameGenPip = false
private val frameGenRequests = java.util.concurrent.atomic.AtomicInteger()
private var fexPreset by mutableStateOf("")
private var suspendPolicy by mutableStateOf(SessionPrefs.SUSPEND_MANUAL)
private var steamDownloadsInBackground by mutableStateOf(false)
@@ -448,6 +464,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
private var secondScreenDisplays by mutableStateOf<List<SecondScreenDisplay>>(emptyList())
private var selectedSecondScreenDisplay by mutableStateOf(SessionState.secondScreenDisplay)
private var started = false
private var dualControlsProvisional: Boolean
get() = SessionState.secondScreenProvisional
set(value) { SessionState.secondScreenProvisional = value }
private var sessionActivityDisplayId = Display.DEFAULT_DISPLAY
private lateinit var displayManager: DisplayManager
private var secondScreenPresentation: SecondScreenPresentation? = null
@@ -514,8 +533,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
refreshControls()
updatePointerCapture()
updateHandCamera()
refreshSecondScreenDisplays()
}
override fun onInputDeviceRemoved(deviceId: Int) {
physicalShortcuts.onDeviceRemoved(deviceId)
Log.i(TAG, "input device $deviceId disconnected")
backQamInput.onDeviceRemoved(deviceId)
joyConVr?.refresh()
@@ -524,10 +545,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
refreshControls()
updatePointerCapture()
updateHandCamera()
refreshSecondScreenDisplays()
}
override fun onInputDeviceChanged(deviceId: Int) {
joyConVr?.refresh()
refreshControls()
refreshSecondScreenDisplays()
}
}
@@ -560,6 +583,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
SessionState.steamUi = intent.getStringExtra(SessionService.EXTRA_STEAM_UI)
SessionState.steamUrl = intent.getStringExtra(SessionService.EXTRA_STEAM_URL)
SessionState.steamVr = intent.getBooleanExtra(EXTRA_STEAMVR, false)
SessionState.secondScreenAutoOpened = false
SessionState.secondScreenProvisional = false
} else if (intent.getBooleanExtra(EXTRA_STEAMVR, false) && SessionState.mode == SessionService.MODE_STEAM) {
SessionState.steamVr = true
}
@@ -569,6 +594,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
}
com.droiddeck.launcher.gpu.SteamVrHealth.begin(this, SessionState.sessionId)
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
if (!SessionState.running) {
SessionState.fpsLimit = 0
fpsLimit = 0
}
applyOutputPacing()
if (!SessionState.running) SessionState.followScreen = followChoice()
applyFollowOrientation(resources.configuration)
@@ -808,7 +837,14 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
onDispose { com.droiddeck.launcher.glasses.GlassesMenuMirror.setSessionMenuVisible(this@SessionActivity, false) }
}
androidx.compose.runtime.LaunchedEffect(drawerOpen, pcKeyboardOpen, achievementsOpen, pipUi) { updatePointerCapture() }
androidx.compose.runtime.LaunchedEffect(pipUi) { hud.setHidden(pipUi) }
androidx.compose.runtime.LaunchedEffect(pipUi) {
hud.setHidden(pipUi)
applyOutputPacing()
if (pipUi != frameGenPip) {
frameGenPip = pipUi
if (FrameGen.engine(this@SessionActivity) != FrameGen.ENGINE_OFF && ::surfaceView.isInitialized) applyFrameGen()
}
}
androidx.compose.runtime.LaunchedEffect(AgentGuest.steamKeyboard) { updateOnScreenControls() }
androidx.compose.runtime.LaunchedEffect(AgentGuest.desktopTextField) { onDesktopTextField(AgentGuest.desktopTextField) }
androidx.compose.runtime.LaunchedEffect(pipUi, pcKeyboardOpen) { updateDesktopKeyboardButton() }
@@ -902,6 +938,29 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
}
}
com.droiddeck.launcher.ui.GestureFeedback(recognizedGesture)
LaunchedEffect(Unit) {
val root = LinuxRuntime.rootDir(this@SessionActivity)
while (true) {
val ask = if (SessionState.running && SessionState.mode == SessionService.MODE_STEAM) {
kotlinx.coroutines.withContext(kotlinx.coroutines.Dispatchers.IO) { com.droiddeck.launcher.session.SteamImportPrompt.read(root) }
} else null
steamImportAsk = ask?.takeIf { it.token != steamImportAnswered }
kotlinx.coroutines.delay(1500)
}
}
steamImportAsk?.takeIf { !loading.visible }?.let { ask ->
androidx.compose.runtime.key(ask.token) {
com.droiddeck.launcher.ui.SteamImportDialog(ask.games) { now ->
val root = LinuxRuntime.rootDir(this@SessionActivity)
Thread({
if (com.droiddeck.launcher.session.SteamImportPrompt.answer(root, ask.token, now)) runOnUiThread {
steamImportAnswered = ask.token
if (steamImportAsk?.token == ask.token) steamImportAsk = null
}
}, "steam-import-answer").start()
}
}
}
if (gestureSettingsOpen) com.droiddeck.launcher.ui.TouchGestureDialog(
game = gestureGame,
onDismiss = { gestureSettingsOpen = false },
@@ -1155,6 +1214,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
textureLodBias = it
}
},
fpsLimit = fpsLimit,
onFpsLimit = { fps ->
SessionState.fpsLimit = fps
fpsLimit = fps
applyOutputPacing()
},
onFrameGenPick = { mode ->
FrameGen.set(this@SessionActivity, mode)
readPrefs()
@@ -1255,7 +1320,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
screenLayoutsOpen = true
},
onFexPreset = { v -> SessionPrefs.setFexPreset(this@SessionActivity, v); readPrefs() },
onSecondScreenMode = { mode -> if (docked) drawerOpen = false; typingReturnMode = null; selectSecondScreenMode(mode) },
onSecondScreenMode = { mode ->
if (docked) drawerOpen = false
typingReturnMode = null
if (mode != SecondScreenMode.NONE) SessionPrefs.setSecondScreenPanel(this@SessionActivity, mode.id)
selectSecondScreenMode(mode)
},
onSecondScreenDisplay = ::selectSecondScreenDisplay,
onLaunchAndroidApp = { app, displayId ->
drawerOpen = false
@@ -1788,6 +1858,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
steamDownloadsInBackground = SessionPrefs.steamDownloadsInBackground(this)
oscMode = SessionPrefs.oscMode(this)
backActionsInverted = SessionPrefs.backActionsInverted(this)
physicalShortcuts.bindings = PhysicalShortcuts.read(this)
backDoubleTapMs = SessionPrefs.backDoubleTapMs(this)
lowLatency = SessionPrefs.lowLatency(this)
evdevMouseOn = SessionPrefs.evdevMouse(this)
@@ -2168,10 +2239,13 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
private fun mirrorRefreshLimit(): Int =
GlassesRendering.mirrorRefreshLimit(glassesSettings, glasses, glassesScreen != null)
private fun outputFpsLimit(): Int = SessionPrefs.compositorFpsLimit(mirrorRefreshLimit())
private fun outputFpsLimit(): Int = outputFpsLimit(pipUi)
private fun outputFpsLimit(pip: Boolean): Int =
SessionPrefs.compositorFpsLimit(mirrorRefreshLimit(), if (noSteamSession()) SessionState.fpsLimit else 0, pip)
private fun applyOutputPacing() {
Log.i(TAG, "perf: " + PerfMode.apply(this, outputFpsLimit(), mirrorRefreshLimit()))
Log.i(TAG, "perf: " + PerfMode.apply(this, outputFpsLimit(false), mirrorRefreshLimit()))
if (CompositorHost.isStarted) {
val hz = refreshHz()
val changed = kotlin.math.abs(SessionState.refreshHz - hz) > 0.1f
@@ -2183,8 +2257,13 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
private fun applyFrameGen() {
val hz = refreshHz()
val pip = pipUi && mirrorRefreshLimit() <= 0
val request = frameGenRequests.incrementAndGet()
Thread({
val problem = FrameGen.apply(this, hz)
val problem = synchronized(frameGenRequests) {
if (request != frameGenRequests.get()) return@Thread
if (pip) FrameGen.apply(this, FrameGen.Mode.OFF, hz) else FrameGen.apply(this, hz)
}
val state = Lossless.state(this)
runOnUiThread {
lossless = state
@@ -2405,6 +2484,26 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
}
if (pipUi) return true
if (screenKeyTextFocus) return super.dispatchKeyEvent(event)
if (physicalShortcuts.onKey(
event,
enabled = SessionState.running && !SessionState.suspended &&
!(drawerOpen && event.keyCode == KeyEvent.KEYCODE_BUTTON_A) &&
!(drawerOpen && PhysicalShortcuts.isDrawerNavigationKey(event)) &&
(event.deviceId to event.keyCode) !in resumeKeysDown &&
!(::loading.isInitialized && (loading.visible || loading.ended)) &&
!pcKeyboardOpen && !achievementsOpen && !gestureSettingsOpen,
steam = SessionState.mode == SessionService.MODE_STEAM,
) { action ->
pendingBackAction?.let(uiHandler::removeCallbacks)
pendingBackAction = null
drawerControllerActive = true
Log.i(TAG, "physical shortcut ${action.name} device=${event.deviceId} key=${event.keyCode} scan=${event.scanCode}")
when (action) {
PhysicalShortcuts.Action.STEAM -> sendSteamGuide()
PhysicalShortcuts.Action.QAM -> triggerSteamQam()
PhysicalShortcuts.Action.DROIDDECK -> drawerOpen = !drawerOpen
}
}) return true
val pad = com.droiddeck.launcher.input.JoyCon.normalize(event)
if (pad !== event) return dispatchKeyEvent(pad)
val fromController = PadBridge.isControllerKeyEvent(event)
@@ -2909,19 +3008,22 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
private fun refreshSecondScreenDisplays() {
if (!::displayManager.isInitialized) return
val primaryId = shownOnDisplayId
val dualOff = SessionPrefs.dualScreenMode(this) == com.droiddeck.launcher.input.DualScreen.MODE_OFF
val candidates = SecondScreenDisplays.available(displayManager, primaryId)
.filter { !dualOff && (glassesScreen == null || it.id != glasses.displayId) }
.filter { glassesScreen == null || it.id != glasses.displayId }
val oldIds = secondScreenDisplays.map { it.id }.toSet()
secondScreenDisplays = candidates
val newIds = candidates.map { it.id }.toSet()
if (secondScreenMode != SecondScreenMode.NONE && oldIds.isNotEmpty() && selectedSecondScreenDisplay !in newIds) {
closeSecondScreen(reset = true)
SessionState.secondScreenAutoOpened = false
return
}
if (selectedSecondScreenDisplay !in newIds) selectedSecondScreenDisplay = candidates.firstOrNull()?.id ?: -1
if (secondScreenMode != SecondScreenMode.NONE && candidates.isEmpty()) closeSecondScreen(reset = true)
else if (started && secondScreenMode != SecondScreenMode.NONE && secondScreenPresentation == null) showSecondScreen(secondScreenMode)
if (secondScreenMode != SecondScreenMode.NONE && candidates.isEmpty()) {
closeSecondScreen(reset = true)
SessionState.secondScreenAutoOpened = false
} else if (started && secondScreenMode != SecondScreenMode.NONE && secondScreenPresentation == null) showSecondScreen(secondScreenMode)
else if (started && !ended && ::loading.isInitialized && !loading.visible) openDualScreenControls()
updateKeyboardRoute()
}
@@ -2932,7 +3034,16 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
if (secondScreenDisplays.none { it.id == target.displayId }) return
SessionState.secondScreenAutoOpened = true
selectedSecondScreenDisplay = target.displayId
selectSecondScreenMode(if (SessionState.deckPad) SecondScreenMode.DECK_CONTROLS else SecondScreenMode.KEYBOARD_TRACKPAD)
selectSecondScreenMode(SecondScreenMode.opening(SessionPrefs.secondScreenPanel(this), SessionState.deckPad))
dualControlsProvisional = ::loading.isInitialized && loading.visible
}
private fun settleDualScreenControls() {
if (!dualControlsProvisional || pipUi || !started || (::loading.isInitialized && loading.visible)) return
dualControlsProvisional = false
if (secondScreenMode == SecondScreenMode.NONE) return
val wanted = SecondScreenMode.opening(SessionPrefs.secondScreenPanel(this), SessionState.deckPad)
if (wanted != secondScreenMode) selectSecondScreenMode(wanted) else secondScreenPresentation?.retryTerminal()
}
private fun selectSecondScreenDisplay(displayId: Int) {
@@ -2943,6 +3054,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
}
private fun selectSecondScreenMode(mode: SecondScreenMode) {
dualControlsProvisional = false
if (mode == SecondScreenMode.NONE) {
closeSecondScreen(reset = true)
return
@@ -3721,7 +3833,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
updateOnScreenControls()
if (resumed) { sessionClipboard.start(); updatePadMotion() }
if (started) refreshSecondScreenDisplays()
if (started) {
settleDualScreenControls()
refreshSecondScreenDisplays()
}
if (CompositorHost.isStarted) applyFrameGen()
}
}
@@ -3757,9 +3872,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
for (name in arrayOf("peak_refresh_rate", "min_refresh_rate")) {
contentResolver.registerContentObserver(android.provider.Settings.System.getUriFor(name), false, refreshSettingObserver)
}
settleDualScreenControls()
refreshSecondScreenDisplays()
if (secondScreenMode != SecondScreenMode.NONE && secondScreenPresentation == null) showSecondScreen(secondScreenMode)
else if (::loading.isInitialized && !loading.visible) openDualScreenControls()
else openDualScreenControls()
startedScreens++
SessionService.setActivityVisible(this, true, sessionActivityDisplayId)
Glasses.rescan()
@@ -3824,6 +3940,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
}
(getSystemService(INPUT_SERVICE) as? InputManager)
?.registerInputDeviceListener(deviceListener, Handler(Looper.getMainLooper()))
refreshSecondScreenDisplays()
if (SessionState.guestPid > 1) padBridge?.syncConnectedControllers()
joyConVr?.refresh()
onScreenControls?.reload()
@@ -3842,6 +3959,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
updatePointerCapture()
if (!pipUi) sessionClipboard.start()
updatePadMotion()
ControllerPrefs.prefs(this).registerOnSharedPreferenceChangeListener(shortcutPrefListener)
readPrefs()
refreshControls()
if (::pip.isInitialized) pip.resumed()
@@ -3852,6 +3970,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
override fun onPause() {
com.droiddeck.launcher.input.HomeButtonShortcuts.detach(this)
if (runtimeRemovalBlocked) { super.onPause(); return }
physicalShortcuts.clear()
backQamInput.cancel()
capturePausedFrame()
sessionClipboard.stop()
@@ -3875,6 +3994,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
updatePadMotion()
keyboard?.takeIf { it.shown }?.hide()
SessionPrefs.sessionPrefs(this).unregisterOnSharedPreferenceChangeListener(cardboardPrefListener)
ControllerPrefs.prefs(this).unregisterOnSharedPreferenceChangeListener(shortcutPrefListener)
updateHeadTracker()
super.onPause()
}
@@ -4283,7 +4403,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
loading.visible = false
hud.start()
memoryHud.start()
if (started) openDualScreenControls()
if (started) {
settleDualScreenControls()
openDualScreenControls()
}
}
}
@@ -23,6 +23,9 @@ class AgentStartActivity : Activity() {
Thread({
try {
AgentBridgeProvider.awaitRecovery()
val until = android.os.SystemClock.elapsedRealtime() + RUNTIME_WAIT_MS
while (com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.isBusy() && !isFinishing &&
android.os.SystemClock.elapsedRealtime() < until) Thread.sleep(RUNTIME_POLL_MS)
runOnUiThread {
if (!isFinishing) startSession(request)
}
@@ -51,6 +54,11 @@ class AgentStartActivity : Activity() {
}
private fun startSession(request: JSONObject) {
if (com.droiddeck.launcher.runtime.LinuxRuntimeInstaller.isBusy()) {
Log.w(TAG, "the Linux runtime is being installed or changed")
finish()
return
}
try {
AgentAccess.requireStart(this, request)
} catch (e: AgentException) {
@@ -107,5 +115,7 @@ class AgentStartActivity : Activity() {
companion object {
const val EXTRA_REQUEST = "request"
private const val TAG = "AgentStartActivity"
private const val RUNTIME_WAIT_MS = 15 * 60_000L
private const val RUNTIME_POLL_MS = 500L
}
}
@@ -146,5 +146,7 @@ internal class AddonPack(
listOf("version", "xodus-cli", "xodus-service"))
val COMET = AddonPack("comet", BuildConfig.PACK_COMET_SHA256, BuildConfig.PACK_COMET_SIZE,
listOf("version", "comet"))
val BUTLER = AddonPack("butler", BuildConfig.PACK_BUTLER_SHA256, BuildConfig.PACK_BUTLER_SIZE,
listOf("version", "butler", "7z.so", "libc7zip.so"))
}
}
@@ -161,6 +161,25 @@ object AddedGames {
"appxmanifest.xml" to Regex("<Application\\b[^>]*?\\bExecutable\\s*=\\s*\"([^\"]+)\"", RegexOption.IGNORE_CASE),
)
private val GAME_PARTS = setOf(
"bin", "bin32", "bin64", "binaries", "x64", "x86", "win64", "win32", "windows",
"launcher", "game", "engine", "system", "data", "app",
)
internal fun groupGames(folder: File): List<File>? {
val files = folder.listFiles() ?: return null
if (files.any { it.isFile && it.name.endsWith(".exe", ignoreCase = true) && !skipExe(it.name) }) return null
if (declaredExes(folder).isNotEmpty()) return null
val dirs = files.filter { it.isDirectory && !it.name.startsWith(".") }.sortedBy { it.name.lowercase() }
if (dirs.size < 2 || dirs.any { it.name.lowercase() in GAME_PARTS }) return null
return dirs.takeIf { all -> all.all { rank(it).exes.isNotEmpty() } }
}
private fun expand(folder: File, entries: Set<String>): List<File> =
if (folder.path in entries) listOf(folder) else groupGames(folder) ?: listOf(folder)
private fun entryFolders(context: Context): Set<String> = AddedExes.list(context).map { it.folder }.toSet()
/** The card's Steam libraries: the arm64 client's steamapps and the x86-64 client's own folder beside it. */
internal fun isSteamLibraryFolder(name: String): Boolean =
name.equals("steamapps", ignoreCase = true) || name == com.droiddeck.launcher.session.GameStorage.X64_CARD_DIR
@@ -173,6 +192,7 @@ object AddedGames {
GameStorage.effective(context)?.let { File(it.path, "steamapps/common") },
)
val removed = SessionPrefs.removedAddedGames(context).toSet()
val entries = entryFolders(context)
for (dir in folders.distinctBy { it.absolutePath }) {
if (!dir.isDirectory) { Log.w(TAG, "$dir is not a folder; skipped"); continue }
val steamInstalls = steamInstallDirs(dir)
@@ -180,7 +200,7 @@ object AddedGames {
if (folder.name.lowercase() in steamInstalls || isSteamLibraryFolder(folder.name)) continue
if (folder.path in removed) continue
if (folder.name == "Games" && StoreInstallRoot.roots(context).any { it.absolutePath == folder.absolutePath }) continue
scanGame(context, folder, out)
for (game in expand(folder, entries)) if (game.path !in removed) scanGame(context, game, out)
}
}
for (entry in AddedExes.list(context)) {
@@ -232,8 +252,9 @@ object AddedGames {
val entries = AddedExes.list(context)
fun owns(f: File) = holds(f) && sameGame(f, currentExe(context, entries, f), exe)
entries.map { File(it.folder) }.filter(::owns).maxByOrNull { canonical(it).length }?.let { return it }
SessionPrefs.removedAddedGames(context).map { File(it) }.filter(::owns).maxByOrNull { canonical(it).length }?.let { return it }
SessionPrefs.removedAddedGames(context).map { File(it) }.filter { owns(it) && groupGames(it) == null }.maxByOrNull { canonical(it).length }?.let { return it }
StoreInstallRoot.gameFolders(context).firstOrNull(::holds)?.let { return it }
val removed = SessionPrefs.removedAddedGames(context)
val dirs = listOfNotNull(
GameStorage.effective(context)?.let { File(it.path, "steamapps/common") },
GameStorage.effective(context)?.let { File(it.path) },
@@ -242,7 +263,10 @@ object AddedGames {
val base = canonical(dir)
if (!inside(path, base)) continue
val first = path.removePrefix("$base/").substringBefore('/')
File(dir, first).takeIf { it.isDirectory && !isSteamLibraryFolder(first) }?.let { return it }
val top = File(dir, first).takeIf { it.isDirectory && !isSteamLibraryFolder(first) && it.path !in removed } ?: continue
val group = groupGames(top) ?: return top
if (top.path in entries.map { it.folder }) return null
return group.firstOrNull(::holds)
}
return null
}
@@ -295,10 +319,11 @@ object AddedGames {
if (guestPath(app, dir) == null) bindFolder(app, dir)
val removed = SessionPrefs.removedAddedGames(app).toSet()
val listed = listedFolders(app, removed)
val entries = entryFolders(app)
var already = 0
val fresh = ArrayList<String>()
val added = ArrayList<Game>()
for (sub in dir.listFiles { f -> f.isDirectory && (showHidden || !f.name.startsWith(".")) }?.sortedBy { it.name.lowercase() }.orEmpty()) {
for (sub in dir.listFiles { f -> f.isDirectory && (showHidden || !f.name.startsWith(".")) }?.sortedBy { it.name.lowercase() }.orEmpty().flatMap { expand(it, entries) }) {
val path = canonical(sub)
if (listed.any { it == path || inside(path, it) || inside(it, path) }) { already++; continue }
onChecking(sub.name)
@@ -332,6 +357,7 @@ object AddedGames {
private fun listedFolders(context: Context, removed: Set<String>): List<String> {
val out = ArrayList<String>()
val entries = entryFolders(context)
GamesFolderMigration.run(context)
val dirs = listOfNotNull(
GameStorage.effective(context)?.let { File(it.path) },
@@ -341,7 +367,7 @@ object AddedGames {
for (folder in dir.listFiles { f -> f.isDirectory }.orEmpty()) {
if (folder.path in removed || isSteamLibraryFolder(folder.name)) continue
if (folder.name == "Games" && StoreInstallRoot.roots(context).any { it.absolutePath == folder.absolutePath }) continue
out.add(canonical(folder))
expand(folder, entries).filter { it.path !in removed }.forEach { out.add(canonical(it)) }
}
}
AddedExes.list(context).filter { it.folder !in removed }.forEach { out.add(canonical(File(it.folder))) }
@@ -89,7 +89,13 @@ object AutoComponents {
private fun enqueue(context: Context, job: Job) {
if (!queuedKeys.add(job.key)) {
if (job.asked && jobs.removeIf { it.key == job.key && !it.asked }) jobs.add(job)
synchronized(jobs) {
val old = jobs.firstOrNull { it.key == job.key }
if (old != null && ((job.asked && !old.asked) || (job.inSession && !old.inSession)) && jobs.remove(old)) {
jobs.add(Job(old.game ?: job.game, old.component, old.asked || job.asked,
if (job.asked && !old.asked) job.seq else old.seq, old.pics ?: job.pics, old.inSession || job.inSession))
}
}
if (runNow && !draining) drain(context)
return
}
@@ -185,18 +191,19 @@ object AutoComponents {
val catalog = (catalogOf(context, false) ?: catalogOf(context, true))?.associateBy { it.name } ?: return
val wanted = autoPicks(findings, catalog)
val user = WinComponents.selection(context, key).user
val before = WinComponents.selection(context, key).auto
val installed = installedOf(context)
val kept = LinkedHashMap<String, WinComponents.AutoReason>()
val missing = ArrayList<String>()
for ((id, reason) in wanted) {
if (user[id] == false) { kept[id] = reason; continue }
if (id in installed) { kept[id] = reason; continue }
if (id in before) kept[id] = reason
synchronized(waiting) { waiting.getOrPut(id) { ArrayList() }.let { if (it.none { g -> appKey(g) == key }) it.add(game) } }
queueDownload(context, id, asked, inSession)
missing.add(id)
}
if (inSession) Pending.set(context, key, missing)
val before = WinComponents.selection(context, key).auto
if (inSession) Pending.set(context, key, (Pending.ids(context, key).filter { it !in installed && it !in wanted } + missing).distinct())
if (before.keys != kept.keys) {
WinComponents.setAuto(context, key, kept)
Log.i(TAG, "${game.name}: on by itself ${kept.keys.joinToString().ifEmpty { "(none)" }}")
@@ -235,6 +242,16 @@ object AutoComponents {
write(context, games)
}
@Synchronized fun ids(context: Context, key: String): List<String> =
read(context).optJSONArray(key)?.let { a -> (0 until a.length()).map { a.optString(it) } }.orEmpty()
@Synchronized fun add(context: Context, key: String, ids: List<String>) {
val games = read(context)
val have = games.optJSONArray(key)?.let { a -> (0 until a.length()).map { a.optString(it) } }.orEmpty()
games.put(key, JSONArray((have + ids).distinct()))
write(context, games)
}
@Synchronized fun drop(context: Context, id: String) {
val games = read(context)
for (k in games.keys().asSequence().toList()) {
@@ -317,6 +334,32 @@ object AutoComponents {
fun beforeLaunch(context: Context, game: Library.SteamGame) = queueGame(context, game, asked = false)
fun restoreMissing(context: Context): List<String> {
val selections = WinComponents.selections(context)
if (selections.isEmpty()) return emptyList()
val catalog = (catalogOf(context, false) ?: catalogOf(context, true))?.associateBy { it.name } ?: return emptyList()
val installed = installedOf(context)
val lostFor = selections.mapValues { (_, selection) ->
withParts(selection.effective.filter { WinComponents.validId(it) }, catalog).filter { it !in installed && it in catalog }
}.filterValues { it.isNotEmpty() }
if (lostFor.isEmpty()) return emptyList()
val lost = lostFor.values.flatten().distinct()
Log.i(TAG, "wincomp: reinstalling ${lost.joinToString()}, picked for games but missing from the runtime")
lostFor.forEach { (key, ids) -> Pending.add(context, key, ids) }
lost.forEach { queueDownload(context, it, asked = true, inSession = true) }
return lost
}
private fun withParts(ids: List<String>, catalog: Map<String, WinComponents.Component>): List<String> {
val out = LinkedHashSet<String>()
fun visit(id: String, depth: Int) {
if (depth > 8 || !out.add(id)) return
catalog[id]?.dependencies?.forEach { visit(it, depth + 1) }
}
ids.forEach { visit(it, 0) }
return out.toList()
}
fun refreshLater(context: Context, game: Library.SteamGame) = queueGame(context, game, asked = true)
fun sweep(context: Context, games: List<Library.SteamGame>) {
@@ -4,7 +4,11 @@ import android.content.Context
import android.hardware.display.DisplayManager
import android.os.Build
import android.view.Display
import android.view.InputDevice
import android.view.MotionEvent
import com.droiddeck.launcher.session.SessionPrefs
import kotlin.math.abs
import kotlin.math.roundToInt
object DualScreen {
const val MODE_AUTO = "auto"
@@ -13,17 +17,54 @@ object DualScreen {
val modes = listOf(MODE_AUTO, MODE_ON, MODE_OFF)
private const val TYPE_INTERNAL = 1
private val knownModels = setOf("retroid pocket duo", "ayn thor")
private val touchedDisplays = mutableSetOf<Int>()
fun builtInDisplay(displayManager: DisplayManager, primaryDisplayId: Int): Display? =
fun builtInDisplay(displayManager: DisplayManager, primaryDisplayId: Int): Display? {
val primary = displayManager.getDisplay(primaryDisplayId)
val awake = primary?.state != Display.STATE_OFF
val panels = if (awake) touchPanels() else emptyList()
return internalDisplay(displayManager, primaryDisplayId) {
if (awake && it.state == Display.STATE_OFF) return@internalDisplay false
synchronized(touchedDisplays) {
if (awake && hasOwnTouchPanel(size(it), primary?.let(::size), panels)) touchedDisplays += it.displayId
it.displayId in touchedDisplays
}
}
}
private fun internalDisplay(displayManager: DisplayManager, primaryDisplayId: Int, accept: (Display) -> Boolean = { true }): Display? =
displayManager.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION).firstOrNull {
it.isValid && it.displayId != primaryDisplayId && (it.flags and Display.FLAG_PRESENTATION) != 0 &&
isBuiltIn(displayType(it), Build.MODEL)
isBuiltIn(displayType(it), Build.MODEL) && accept(it)
}
internal fun hasOwnTouchPanel(display: Pair<Int, Int>, primary: Pair<Int, Int>?, panels: List<Pair<Int, Int>>): Boolean {
val matching = panels.count { covers(it, display) }
return if (primary != null && covers(primary, display)) matching >= 2 else matching >= 1
}
private fun covers(panel: Pair<Int, Int>, display: Pair<Int, Int>): Boolean =
(near(panel.first, display.first) && near(panel.second, display.second)) ||
(near(panel.first, display.second) && near(panel.second, display.first))
private fun near(a: Int, b: Int) = abs(a - b) <= 2
private fun size(display: Display): Pair<Int, Int> =
display.mode.let { it.physicalWidth to it.physicalHeight }
private fun touchPanels(): List<Pair<Int, Int>> =
InputDevice.getDeviceIds().toList().mapNotNull { id ->
val device = InputDevice.getDevice(id) ?: return@mapNotNull null
if (device.isVirtual || !device.supportsSource(InputDevice.SOURCE_TOUCHSCREEN)) return@mapNotNull null
val x = device.getMotionRange(MotionEvent.AXIS_X, InputDevice.SOURCE_TOUCHSCREEN) ?: return@mapNotNull null
val y = device.getMotionRange(MotionEvent.AXIS_Y, InputDevice.SOURCE_TOUCHSCREEN) ?: return@mapNotNull null
(x.max - x.min + 1f).roundToInt() to (y.max - y.min + 1f).roundToInt()
}
fun display(context: Context, displayManager: DisplayManager, primaryDisplayId: Int): Display? =
when (SessionPrefs.dualScreenMode(context)) {
MODE_OFF -> null
MODE_ON -> builtInDisplay(displayManager, primaryDisplayId) ?: anyDisplay(displayManager, primaryDisplayId)
MODE_ON -> internalDisplay(displayManager, primaryDisplayId) ?: anyDisplay(displayManager, primaryDisplayId)
else -> builtInDisplay(displayManager, primaryDisplayId)
}
@@ -0,0 +1,145 @@
package com.droiddeck.launcher.input
import android.content.Context
import android.util.Log
import android.view.InputDevice
import android.view.KeyEvent
import androidx.annotation.StringRes
import com.droiddeck.launcher.R
import org.json.JSONArray
import org.json.JSONException
import org.json.JSONObject
object PhysicalShortcuts {
internal const val KEY = "physicalShortcuts"
private const val TAG = "PhysicalShortcuts"
enum class Action(@StringRes val label: Int) {
STEAM(R.string.drawer_steam_menu),
QAM(R.string.drawer_open_qam),
DROIDDECK(R.string.shortcuts_dd_menu),
}
data class Button(
val device: String,
val name: String,
val keyCode: Int,
val scanCode: Int,
) {
fun matches(event: KeyEvent): Boolean =
event.device?.let { device == identity(it) } == true &&
keyCode == event.keyCode && scanCode == event.scanCode
fun sameInput(other: Button): Boolean =
device == other.device && keyCode == other.keyCode && scanCode == other.scanCode
val label: String
get() = KeyEvent.keyCodeToString(keyCode).removePrefix("KEYCODE_").removePrefix("BUTTON_")
}
data class Binding(val button: Button, val action: Action)
private fun identity(device: InputDevice): String =
"${device.vendorId}:${device.productId}:${device.descriptor.ifBlank { device.name }}"
fun isVolumeKey(event: KeyEvent): Boolean = when (event.keyCode) {
KeyEvent.KEYCODE_VOLUME_UP, KeyEvent.KEYCODE_VOLUME_DOWN, KeyEvent.KEYCODE_VOLUME_MUTE -> true
else -> false
}
fun isDrawerNavigationKey(event: KeyEvent): Boolean = when (event.keyCode) {
KeyEvent.KEYCODE_DPAD_UP, KeyEvent.KEYCODE_DPAD_DOWN,
KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_RIGHT -> true
else -> false
}
fun button(event: KeyEvent): Button? {
val device = event.device ?: return null
if (device.isVirtual || isVolumeKey(event)) return null
when (event.keyCode) {
KeyEvent.KEYCODE_HOME, KeyEvent.KEYCODE_POWER, KeyEvent.KEYCODE_SLEEP,
KeyEvent.KEYCODE_WAKEUP, KeyEvent.KEYCODE_APP_SWITCH -> return null
}
if (event.keyCode == KeyEvent.KEYCODE_UNKNOWN && event.scanCode <= 0) return null
return Button(identity(device), device.name, event.keyCode, event.scanCode)
}
fun read(context: Context): List<Binding> {
val raw = ControllerPrefs.prefs(context).getString(KEY, null) ?: return emptyList()
return try {
val array = JSONArray(raw)
buildList {
for (i in 0 until array.length()) {
try {
val entry = array.getJSONObject(i)
val action = Action.entries.firstOrNull { it.name == entry.getString("action") }
val code = entry.getInt("keyCode")
val scan = entry.getInt("scanCode")
val device = entry.getString("device")
if (action == null || device.isBlank() || code < 0 || scan < 0) {
Log.w(TAG, "Ignoring invalid shortcut at index $i")
continue
}
val binding = Binding(Button(device, entry.getString("name"), code, scan), action)
if (none { it.button.sameInput(binding.button) }) add(binding)
} catch (e: JSONException) {
Log.w(TAG, "Ignoring malformed shortcut at index $i", e)
}
}
}
} catch (e: JSONException) {
Log.w(TAG, "Could not read physical shortcuts; reset shortcuts to restore defaults", e)
emptyList()
}
}
fun assign(context: Context, button: Button, action: Action) {
val bindings = read(context).filterNot {
it.button.sameInput(button) || (it.button.device == button.device && it.action == action)
} + Binding(button, action)
write(context, bindings)
}
fun remove(context: Context, binding: Binding) {
write(context, read(context).filterNot { it == binding })
}
private fun write(context: Context, bindings: List<Binding>) {
val array = JSONArray()
bindings.forEach {
array.put(JSONObject().put("device", it.button.device).put("name", it.button.name)
.put("keyCode", it.button.keyCode).put("scanCode", it.button.scanCode).put("action", it.action.name))
}
ControllerPrefs.prefs(context).edit().putString(KEY, array.toString()).apply()
}
}
class PhysicalShortcutRouter {
var bindings: List<PhysicalShortcuts.Binding> = emptyList()
private data class Press(val device: Int, val keyCode: Int, val scanCode: Int)
private val held = mutableSetOf<Press>()
fun onKey(event: KeyEvent, enabled: Boolean, steam: Boolean, perform: (PhysicalShortcuts.Action) -> Unit): Boolean {
val press = Press(event.deviceId, event.keyCode, event.scanCode)
if (event.action == KeyEvent.ACTION_UP) return held.remove(press)
if (event.action != KeyEvent.ACTION_DOWN) return false
if (press in held) return true
if (!enabled || bindings.isEmpty()) return false
val button = PhysicalShortcuts.button(event) ?: return false
val binding = bindings.firstOrNull { it.button.sameInput(button) } ?: return false
if (!steam && binding.action != PhysicalShortcuts.Action.DROIDDECK) return false
held.add(press)
if (event.repeatCount == 0) perform(binding.action)
return true
}
fun onDeviceRemoved(deviceId: Int) {
held.removeAll { it.device == deviceId }
}
fun clear() {
held.clear()
}
}
@@ -9,7 +9,12 @@ enum class SecondScreenMode(val id: String, @StringRes val label: Int) {
NONE("none", R.string.second_mode_none),
KEYBOARD_TRACKPAD("keyboard-trackpad", R.string.second_mode_keyboard_trackpad),
TERMINAL("terminal", R.string.second_mode_terminal),
DECK_CONTROLS("deck-controls", R.string.second_mode_deck_controls),
DECK_CONTROLS("deck-controls", R.string.second_mode_deck_controls);
companion object {
fun opening(remembered: String?, deckPad: Boolean): SecondScreenMode =
entries.firstOrNull { it != NONE && it.id == remembered && (it != DECK_CONTROLS || deckPad) } ?: if (deckPad) DECK_CONTROLS else KEYBOARD_TRACKPAD
}
}
data class SecondScreenDisplay(val id: Int, val label: String)
@@ -57,10 +57,7 @@ class SessionClipboard(context: Context, private val hasFocus: () -> Boolean) {
val clip = clipboard.primaryClip
if (clip != null && clip.itemCount == 0) return
val text = clip?.getItemAt(0)?.text?.toString()
if (echo != null && text == echo) {
echo = null
return
}
if (echo != null && text == echo) return
echo = null
if (!changed && published && text == shared) return
publish(text)
@@ -83,7 +83,11 @@ class TwoFingerGestures(private val slopPx: Float, private val listener: Listene
pass(State.PASSING)
return true
}
State.SCROLLING, State.HELD, State.TAPPED -> return true
State.SCROLLING -> {
anchor(event, -1)
return true
}
State.HELD, State.TAPPED -> return true
else -> Unit
}
}
@@ -137,7 +141,11 @@ class TwoFingerGestures(private val slopPx: Float, private val listener: Listene
pass(State.PASSING)
return true
}
State.SCROLLING, State.HELD, State.TAPPED -> return true
State.SCROLLING -> {
anchor(event, event.actionIndex)
return true
}
State.HELD, State.TAPPED -> return true
else -> Unit
}
MotionEvent.ACTION_UP -> {
@@ -193,6 +201,13 @@ class TwoFingerGestures(private val slopPx: Float, private val listener: Listene
hypot(event.getX(i) - start.first, event.getY(i) - start.second) > slopPx
}
private fun anchor(event: MotionEvent, lifted: Int) {
val kept = (0 until event.pointerCount).filter { it != lifted }
if (kept.size < 2) return
lastX = (event.getX(kept[0]) + event.getX(kept[1])) / 2f
lastY = (event.getY(kept[0]) + event.getY(kept[1])) / 2f
}
private fun span(event: MotionEvent) = hypot(event.getX(1) - event.getX(0), event.getY(1) - event.getY(0))
private fun midX(event: MotionEvent) = (event.getX(0) + event.getX(1)) / 2f
private fun midY(event: MotionEvent) = (event.getY(0) + event.getY(1)) / 2f
@@ -97,8 +97,10 @@ internal object DesktopFileRemoval {
}
if (!dir.delete()) throw IOException("Cannot remove $dir")
}
for (name in listOf("sync/droiddeck.db", "droiddeck-desktop")) {
val file = File(lib, name)
val sync = File(lib, "sync")
val files = listOf(File(lib, "droiddeck-desktop")) +
listOfNotNull(File(sync, "droiddeck.db").takeUnless { Files.isSymbolicLink(sync.toPath()) })
for (file in files) {
if (Files.isSymbolicLink(file.toPath()) || file.isFile) Files.delete(file.toPath())
}
}
@@ -113,12 +113,16 @@ public final class LinuxRuntime {
}
public static boolean isInstalled(Context context) {
return hasRootfs(context) && (patchedProot(context) || rootfsProotReady(context));
}
/** The rootfs alone: enough to read the game library, while the proot pack can still be downloading. */
public static boolean hasRootfs(Context context) {
if (LinuxRuntimeInstaller.isRemoving() || LinuxRuntimeInstaller.hasRemovalPending(context)) return false;
File root = rootDir(context);
return (new File(root, "usr/bin/gamescope").isFile() || new File(root, "usr/games/gamescope").isFile())
&& (new File(root, SESSION_SCRIPT.substring(1)).isFile()
|| new File(root, LegacyNames.SESSION_SCRIPT.substring(1)).isFile())
&& (patchedProot(context) || rootfsProotReady(context));
|| new File(root, LegacyNames.SESSION_SCRIPT.substring(1)).isFile());
}
public static File vulkanIcd(Context context) {
@@ -0,0 +1,30 @@
package com.droiddeck.launcher.runtime
import android.content.Context
import com.droiddeck.launcher.BuildConfig
object RuntimeAutoUpdate {
private const val PREFS = "runtime-auto-update"
const val MAX_ATTEMPTS = 3
const val RETRY_MS = 10 * 60_000L
fun due(installed: String?, release: String?, attempts: Int, lastAt: Long = 0L, now: Long = lastAt + RETRY_MS): Boolean =
installed != null && !release.isNullOrEmpty() && release != installed && attempts < MAX_ATTEMPTS &&
(attempts == 0 || now - lastAt !in 0 until RETRY_MS)
fun key(appVersion: Int, release: String) = "$appVersion:$release"
fun claim(context: Context, installed: String?, release: String?, now: Long = System.currentTimeMillis()): Boolean {
if (release.isNullOrEmpty()) return false
val prefs = context.getSharedPreferences(PREFS, Context.MODE_PRIVATE)
val key = key(BuildConfig.VERSION_CODE, release)
synchronized(this) {
val attempts = prefs.getInt(key, 0)
if (!due(installed, release, attempts, prefs.getLong("$key@at", 0L), now)) return false
val edit = prefs.edit()
prefs.all.keys.filterNot { it.startsWith("${BuildConfig.VERSION_CODE}:") }.forEach { edit.remove(it) }
edit.putInt(key, attempts + 1).putLong("$key@at", now).apply()
return true
}
}
}
@@ -80,7 +80,7 @@ public final class RuntimeFileTree {
* be carried.
*/
static java.util.List<String> userPaths(File tree) throws IOException {
java.util.List<String> paths = new java.util.ArrayList<>(java.util.Arrays.asList("root", "opt/appimages/user", "opt/droiddeck-apps"));
java.util.List<String> paths = new java.util.ArrayList<>(java.util.Arrays.asList("root", "opt/appimages/user", "opt/droiddeck-apps", "opt/droiddeck/wincomponents"));
for (String n : children(new File(tree, "usr/local/share/applications"))) {
if (n.endsWith(".desktop") && (n.startsWith("droiddeck-app-") || n.startsWith("droiddeck-appimage-")))
paths.add("usr/local/share/applications/" + n);
@@ -290,6 +290,7 @@ object SessionFiles {
"stage session=$startsSession pending=$force choice=${SessionPrefs.bootMovie(context)} movie=${startupMovie?.path} " +
"staged=$bigPictureMovieInstalled done=$done steam=${home.path} config: $before -> ${startupMoviePath(config)}",
)
if (startsSession) disableIdleSleep(home)
if (!done) allDone = false
if (!bigPictureMovieInstalled) allInstalled = false
if (done && home.path.contains(".droiddeck-x64") == activeIsX64) seen = if (bigPictureMovieInstalled) BOOT_MOVIE_PATH else ""
@@ -528,6 +529,43 @@ object SessionFiles {
}
}
private val IDLE_SLEEP_TIMERS = listOf("IdleSuspendBatterySeconds", "IdleSuspendACSeconds")
/**
* Sets Steam's Power > "Sleep after" (battery and plugged in) to Disabled at every session start: Android
* owns the device's sleep, and a client that suspends inside the session only shows a black screen. Dimming stays the user's. Runs
* only before the client starts, which rewrites its config on exit.
*/
internal fun disableIdleSleep(steamHome: File): Boolean {
val config = File(steamHome, "config/config.vdf")
val text = runCatching { config.readText() }.getOrNull() ?: return false
val newline = if (text.contains("\r\n")) "\r\n" else "\n"
val steam = findSteamBlock(text) ?: return false
val system = findObject(text, "system", steam.open + 1, steam.close)
val updated = if (system != null) {
val block = text.substring(system.keyStart, system.close + 1)
text.replaceRange(system.keyStart, system.close + 1, IDLE_SLEEP_TIMERS.fold(block) { acc, key -> setScalar(acc, key, "0", newline) })
} else {
val lineStart = text.lastIndexOf('\n', steam.close).let { if (it < 0) 0 else it + 1 }
val indent = text.substring(lineStart, steam.close).takeWhile { it == '\t' || it == ' ' } + "\t"
val section = (listOf(indent + "\"system\"", indent + "{") +
IDLE_SLEEP_TIMERS.map { "$indent\t\"$it\"\t\t\"0\"" } + (indent + "}")).joinToString(newline) + newline
text.substring(0, lineStart) + section + text.substring(lineStart)
}
val staged = File(config.parentFile, config.name + ".staged")
return try {
if (updated != text) {
staged.writeText(updated)
if (!staged.renameTo(config)) { staged.delete(); return false }
}
true
} catch (e: Exception) {
staged.delete()
Log.w(TAG, "could not disable Steam's idle sleep", e)
false
}
}
/** Adds the `Customization` section Steam reads, next to the `Software` section, when the config has none. */
private fun withCustomization(text: String, path: String, newline: String): String {
val root = findObject(text, "InstallConfigStore", 0, text.length) ?: return text
@@ -94,6 +94,12 @@ object SessionPrefs {
prefs(context).edit().putString("dualScreenMode", mode).apply()
}
fun secondScreenPanel(context: Context): String? = prefs(context).getString("secondScreenPanel", null)
fun setSecondScreenPanel(context: Context, mode: String) {
prefs(context).edit().putString("secondScreenPanel", mode).apply()
}
fun dualScreenLauncher(context: Context): Boolean = prefs(context).getBoolean("dualScreenLauncher", true)
fun setDualScreenLauncher(context: Context, on: Boolean) {
@@ -141,10 +147,10 @@ object SessionPrefs {
}
fun storesView(context: Context): String =
prefs(context).getString("storesView", null)?.takeIf { it in STORES_VIEWS } ?: STORES_VIEWS.first()
prefs(context).getString("storesView", null)?.takeIf { it in STORES_VIEWS } ?: DEFAULT_STORES_VIEW
fun setStoresView(context: Context, view: String) {
prefs(context).edit().putString("storesView", if (view in STORES_VIEWS) view else STORES_VIEWS.first()).apply()
prefs(context).edit().putString("storesView", if (view in STORES_VIEWS) view else DEFAULT_STORES_VIEW).apply()
}
fun libraryCardLevel(context: Context): Int = prefs(context).getInt("libraryCardLevel", 2)
@@ -193,6 +199,7 @@ object SessionPrefs {
val STORES_SORTS = listOf("lastPlayed", "recentlyInstalled", "titleAsc", "titleDesc", "sizeDesc", "sizeAsc", "releaseDateDesc")
val STORES_VIEWS = listOf("cards", "capsules", "list")
const val DEFAULT_STORES_VIEW = "capsules"
fun storesInstallTarget(context: Context): String = prefs(context).getString("storesInstallTarget", "") ?: ""
@@ -241,7 +248,7 @@ object SessionPrefs {
prefs(context).edit().putInt("gameStoresParallel", count.coerceIn(1, 3)).apply()
}
fun hudEnabled(context: Context): Boolean = prefs(context).getBoolean(hudKey(context), !mangoappSession(context))
fun hudEnabled(context: Context): Boolean = prefs(context).getBoolean(hudKey(context), false)
fun setHudEnabled(context: Context, on: Boolean) {
prefs(context).edit().putBoolean(hudKey(context), on).apply()
@@ -435,11 +442,15 @@ object SessionPrefs {
/**
* Shader pre-caching as the launcher last set it, until a session reports it written into the
* client's config.vdf; after that the client's own toggle is the user's again.
* client's config.vdf; after that the client's own toggle is the user's again. A client that
* has never written a config.vdf starts with pre-caching off.
*/
fun pendingShaderPrecache(context: Context): Boolean? {
val prefs = prefs(context)
if (!prefs.contains("shaderPrecache")) return null
if (!prefs.contains("shaderPrecache")) {
if (steamConfig(context).exists()) return null
prefs.edit().putBoolean("shaderPrecache", false).apply()
}
val on = prefs.getBoolean("shaderPrecache", true)
val applied = shaderPrecacheApplied(context)
val written = runCatching { applied.readText().trim() }.getOrNull() ?: return on
@@ -454,9 +465,12 @@ object SessionPrefs {
prefs(context).edit().putBoolean("shaderPrecache", on).apply()
}
private fun steamConfig(context: Context) =
java.io.File(steamRoot(context, steamClientArch(context)), "config/config.vdf")
fun shaderPrecache(context: Context): Boolean = pendingShaderPrecache(context)
?: runCatching { com.droiddeck.launcher.storage.SteamStorage.shaderPrecache(
java.io.File(steamRoot(context, steamClientArch(context)), "config/config.vdf").readText()) }.getOrDefault(true)
steamConfig(context).readText()) }.getOrDefault(true)
fun stretch16x9(context: Context): Boolean = prefs(context).getBoolean("stretch16x9", false)
@@ -1081,12 +1095,26 @@ object SessionPrefs {
/** Compositor frame limit that releases buffers to the game unpaced. */
const val FPS_UNPACED = -1
/** The drawer's frame limit slider: its first stop is Off. */
const val FPS_LIMIT_OFF = 15
const val FPS_LIMIT_MAX = 120
/**
* Buffers go back to the game as soon as they are replaced instead of once per refresh;
* Steam's Frame Limit in the Quick Access menu caps games. Mirroring still follows the glasses' refresh rate.
* Steam's Frame Limit in the Quick Access menu caps Steam games, and the drawer's limit caps games
* launched without Steam. Mirroring still follows the glasses' refresh rate.
*/
fun compositorFpsLimit(mirrorRefreshLimit: Int): Int =
if (mirrorRefreshLimit <= 0) FPS_UNPACED else mirrorRefreshLimit
const val PIP_FPS = 30
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
}
val upscalerChoices = listOf(
0 to "Linear", 2 to "Nearest", 4 to "AMD FSR 1", 3 to "Snapdragon GSR",
@@ -334,6 +334,7 @@ class SessionService : Service() {
return START_NOT_STICKY
}
SessionState.mode = intent?.getStringExtra(EXTRA_MODE) ?: MODE_STEAM
SessionState.fpsLimit = 0
suspendPolicy = SessionPrefs.suspendPolicy(this, SessionState.mode)
steamDownloadsInBackground = SessionPrefs.steamDownloadsInBackground(this)
activityVisible = true
@@ -535,10 +536,6 @@ class SessionService : Service() {
// gamescope's WSI layer and winex11 reuse their per-present window checks for this long.
guest.add("DROIDDECK_WSI_BYPASS_CHECK_MS=100")
guest.add("WINE_OFFSCREEN_CHECK_MS=100")
// gamescope turns buffers around slower than an uncapped game draws; more images keep it drawing.
// The WSI layer goes back to its default count while Steam's Frame Limit holds the game.
guest.add("GAMESCOPE_WSI_MIN_IMAGE_COUNT=8")
guest.add("GAMESCOPE_WSI_ENSURE_MIN_IMAGE_COUNT=1")
guest.add("BL_REFRESH=" + Math.round(SessionState.refreshHz))
guest.add("BL_LOG=" + sessionLog.path)
guest.add("BL_DEBUG_DIR=" + sessionDir.path)
@@ -546,7 +543,6 @@ class SessionService : Service() {
val fakeInputDir = File(sessionRoot, "dev/input").apply { mkdirs() }
val controllersOn = !File(Environment.getExternalStorageDirectory(), NO_PAD_SWITCH).exists()
SessionState.deckPad = false
SessionState.secondScreenAutoOpened = false
deckBinds = emptyList()
inputSysfs = null
if (controllersOn) {
@@ -720,6 +716,7 @@ class SessionService : Service() {
if (!pulse.setMicSuspended(false)) Log.w(TAG, "could not resume microphone source")
},
zramControl = File(filesDir, "${LinuxRuntime.DIR}/tmp/.bl-zram"),
clockControl = File(filesDir, "${LinuxRuntime.DIR}/tmp/.bl-clock"),
pagedOut = { processes, unacknowledged, residentKb, swapKb, swapBeforeKb, millis ->
Log.i(TAG, "paged out $processes processes ($unacknowledged unacknowledged) in $millis ms: " +
"resident ${residentKb / 1024} MB, zram ${swapBeforeKb / 1024} -> ${swapKb / 1024} MB")
@@ -1039,7 +1036,7 @@ class SessionService : Service() {
Log.w(TAG, "added games: ${root.host} is not a readable folder this session")
}
}
for ((host, guest) in com.droiddeck.launcher.stores.StoreInstallRoot.externalRoots(this)) {
for ((host, guest) in com.droiddeck.launcher.stores.StoreInstallRoot.externalRootsForXodus(this)) {
if (host.isDirectory && host.canRead()) {
File(LinuxRuntime.rootDir(this), guest.removePrefix("/")).mkdirs()
binds.add(host.path + ":" + guest)
@@ -92,6 +92,7 @@ object SessionState {
@Volatile var secondScreenMode = com.droiddeck.launcher.input.SecondScreenMode.NONE
@Volatile var secondScreenDisplay = -1
@Volatile var secondScreenAutoOpened = false
@Volatile var secondScreenProvisional = false
@Volatile
var mode = "steam"
@@ -108,6 +109,10 @@ object SessionState {
@Volatile
var upscaleRatio: Float = 0f
/** Frame limit chosen in the drawer for a game launched without Steam; 0 is off. */
@Volatile
var fpsLimit: Int = 0
@Volatile
var firstFrameSeen = false
@@ -3,6 +3,9 @@ package com.droiddeck.launcher.session
import android.os.Process
import java.io.File
import java.io.IOException
import java.io.RandomAccessFile
import java.nio.ByteBuffer
import java.nio.ByteOrder
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
import java.util.concurrent.RejectedExecutionException
@@ -19,6 +22,8 @@ internal class SessionSuspendController(
private val nowMillis: () -> Long = { System.nanoTime() / 1_000_000 },
private val executor: ExecutorService = Executors.newSingleThreadExecutor(),
private val zramControl: File? = null,
private val clockControl: File? = null,
private val nowNanos: () -> Long = System::nanoTime,
private val pagedOut: (processes: Int, unacknowledged: Int, residentKb: Long, swapKb: Long, swapBeforeKb: Long, millis: Long) -> Unit =
{ _, _, _, _, _, _ -> },
) {
@@ -43,6 +48,7 @@ internal class SessionSuspendController(
@Volatile private var closing = false
@Volatile private var cancelled = false
private var frozen = emptyList<ProcessRecord>()
private var frozenSince: Long? = null
fun freeze(pageOut: Boolean = false, completion: (Boolean) -> Unit) {
cancelled = false
@@ -93,6 +99,7 @@ internal class SessionSuspendController(
} catch (_: Exception) {
} finally {
frozen = records.values.toList()
if (complete && frozenSince == null) frozenSince = nowNanos()
if (!complete) {
if (restoreSafely(frozen)) frozen = emptyList()
runAudio(resumeAudio)
@@ -111,6 +118,7 @@ internal class SessionSuspendController(
fun resume(completion: (Boolean) -> Unit) {
submit({
val records = frozen
advanceClock()
runAudio(resumeAudio)
val resumed = restoreSafely(records)
if (resumed) frozen = emptyList()
@@ -121,6 +129,7 @@ internal class SessionSuspendController(
fun closeAndResume(completion: () -> Unit) {
closing = true
submit({
advanceClock()
if (restoreSafely(frozen)) frozen = emptyList()
completion()
executor.shutdown()
@@ -135,6 +144,23 @@ internal class SessionSuspendController(
}
}
private fun advanceClock() {
val since = frozenSince ?: return
frozenSince = null
val control = clockControl?.takeIf { it.isFile && it.length() >= Long.SIZE_BYTES } ?: return
try {
RandomAccessFile(control, "rw").use { file ->
val bytes = ByteArray(Long.SIZE_BYTES)
file.readFully(bytes)
val shift = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN).long.coerceAtLeast(0L) +
(nowNanos() - since).coerceAtLeast(0L)
file.seek(0L)
file.write(ByteBuffer.allocate(Long.SIZE_BYTES).order(ByteOrder.LITTLE_ENDIAN).putLong(shift).array())
}
} catch (_: IOException) {
}
}
private fun runAudio(action: () -> Unit) {
try {
action()
@@ -0,0 +1,26 @@
package com.droiddeck.launcher.session
import org.json.JSONObject
import java.io.File
object SteamImportPrompt {
data class Ask(val token: String, val games: List<String>)
private fun folder(root: File) = File(root, "root/.cache/droiddeck")
fun read(root: File): Ask? {
val text = runCatching { File(folder(root), "steam-import.json").readText() }.getOrNull() ?: return null
val json = runCatching { JSONObject(text) }.getOrNull() ?: return null
val token = json.optString("token").takeIf { it.isNotEmpty() } ?: return null
val list = json.optJSONArray("games")
val games = if (list == null) emptyList() else (0 until list.length()).mapNotNull { list.optString(it).takeIf(String::isNotBlank) }
return Ask(token, games)
}
fun answer(root: File, token: String, now: Boolean): Boolean = runCatching {
val dir = folder(root).apply { mkdirs() }
val temp = File(dir, "steam-import.answer.tmp")
temp.writeText(JSONObject().put("token", token).put("choice", if (now) "now" else "later").toString())
temp.renameTo(File(dir, "steam-import.answer"))
}.getOrDefault(false)
}
@@ -137,10 +137,7 @@ object StoreInstallRoot {
.filter { !isInternal(context, it) && (library == null || !it.absolutePath.startsWith("$library/")) }
.map { root ->
val base = guestFor(context, root)
val guest = if (used.add(base)) base else {
val suffix = "%08x".format(CRC32().apply { update(root.absolutePath.toByteArray()) }.value)
"$base-$suffix".also { used.add(it) }
}
val guest = if (used.add(base)) base else "$base-${pathKey(root)}".also { used.add(it) }
root to guest
}
}
@@ -168,15 +165,20 @@ object StoreInstallRoot {
/** Xodus has its own PRoot mount table and cannot see the selected Steam library's SD bind. */
fun externalRootsForXodus(context: Context): List<Pair<File, String>> {
val roots = externalRoots(context).toMutableList()
val roots = externalRoots(context)
val selectedLibrary = GameStorage.effective(context)?.let { File(it.path, ON_VOLUME) }
?.takeUnless { isInternal(context, it) }
if (selectedLibrary != null && roots.none { it.first.absolutePath == selectedLibrary.absolutePath }) {
roots += selectedLibrary to guestFor(context, selectedLibrary)
}
return roots
?.takeUnless { isInternal(context, it) } ?: return roots
return withSelectedLibrary(roots, selectedLibrary, guestFor(context, selectedLibrary))
}
internal fun withSelectedLibrary(roots: List<Pair<File, String>>, library: File, base: String): List<Pair<File, String>> {
if (roots.any { it.first.absolutePath == library.absolutePath }) return roots
val guest = if (roots.none { it.second == base }) base else "$base-${pathKey(library)}"
return roots + (library to guest)
}
private fun pathKey(root: File): String = "%08x".format(CRC32().apply { update(root.absolutePath.toByteArray()) }.value)
fun externalBindSpecs(context: Context): List<String> = externalBindSpecs(externalRoots(context), LinuxRuntime.rootDir(context))
fun externalBindSpecsForXodus(context: Context): List<String> =
@@ -192,7 +194,7 @@ object StoreInstallRoot {
private fun guestFor(context: Context, root: File): String {
val sm = context.getSystemService(StorageManager::class.java)
val uuid = runCatching { sm?.getStorageVolume(root)?.uuid }.getOrNull()?.takeIf { it.isNotBlank() }?.replace(Regex("[^A-Za-z0-9-]"), "")
val key = uuid ?: "%08x".format(CRC32().apply { update(root.absolutePath.toByteArray()) }.value)
val key = uuid ?: pathKey(root)
return "$GUEST_EXTERNAL/$key"
}
@@ -0,0 +1,45 @@
package com.droiddeck.launcher.stores.itch
import java.io.File
import java.io.FileInputStream
import java.nio.file.Files
internal object ItchArchives {
private val PACKED = setOf("zip", "7z", "rar", "tar", "gz", "bz2", "xz")
fun kind(file: File, filename: String): String {
val extension = filename.substringAfterLast('.', "").lowercase()
if (extension == "exe") return "exe"
return signature(file) ?: extension
}
private fun signature(file: File): String? {
val head = runCatching { FileInputStream(file).use { input -> ByteArray(300).also { input.read(it) } } }.getOrNull()
?: return null
fun at(i: Int, vararg bytes: Int) = bytes.indices.all { head.getOrNull(i + it) == bytes[it].toByte() }
return when {
at(0, 0x50, 0x4B) -> "zip"
at(0, 0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C) -> "7z"
at(0, 0x52, 0x61, 0x72, 0x21) -> "rar"
at(0, 0x1F, 0x8B) -> "gz"
at(0, 0x42, 0x5A, 0x68) -> "bz2"
at(0, 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00) -> "xz"
at(257, 0x75, 0x73, 0x74, 0x61, 0x72) -> "tar"
else -> null
}
}
fun inner(folder: File): File? {
val found = ArrayList<File>()
fun walk(dir: File, depth: Int) {
val files = dir.listFiles() ?: return
for (file in files) {
if (Files.isSymbolicLink(file.toPath())) continue
if (file.isFile && signature(file) in PACKED) found.add(file)
else if (file.isDirectory && depth < 2 && !file.name.startsWith(".")) walk(file, depth + 1)
}
}
walk(folder, 0)
return found.maxByOrNull { it.length() }
}
}
@@ -0,0 +1,114 @@
package com.droiddeck.launcher.stores.itch
import com.droiddeck.launcher.stores.StoreNet
import org.json.JSONArray
import org.json.JSONObject
import java.io.File
import java.io.FileOutputStream
import java.net.HttpURLConnection
import java.net.URL
import java.util.concurrent.atomic.AtomicBoolean
internal object ItchBuilds {
private const val BASE = "https://api.itch.io"
private const val MAX_STEPS = 4
class Step(val buildId: Long, val patchFile: Long, val patchSize: Long, val signatureFile: Long)
fun buildId(upload: JSONObject): String {
val value = upload.opt("build_id") ?: upload.opt("buildId")
return when (value) {
is Number -> value.toLong().takeIf { it > 0 }?.toString().orEmpty()
is String -> value.takeIf { it.all(Char::isDigit) }?.toLongOrNull()?.takeIf { it > 0 }?.toString().orEmpty()
else -> ""
}
}
fun path(key: String, from: String, to: String, downloadKeyId: String): List<Step>? {
val fromId = from.toLongOrNull() ?: return null
val toId = to.toLongOrNull() ?: return null
val reply = ItchApi.get("/builds/$fromId/upgrade-paths/$toId" + keyQuery(downloadKeyId), key) ?: return null
return steps(reply, fromId, toId) { filesOf(key, it, downloadKeyId) }
}
fun steps(reply: JSONObject, fromId: Long, toId: Long, filesFor: (JSONObject) -> JSONArray?): List<Step>? {
val builds = (reply.optJSONObject("upgrade_path") ?: reply.optJSONObject("upgradePath"))?.optJSONArray("builds") ?: return null
val ids = (0 until builds.length()).mapNotNull { builds.optJSONObject(it) }
val after = ids.filter { it.optLong("id") != fromId }
if (after.isEmpty() || after.size > MAX_STEPS || after.last().optLong("id") != toId) return null
val steps = after.map { build ->
val files = filesFor(build) ?: return null
val patch = pick(files, "patch") ?: return null
val signature = pick(files, "signature")
Step(build.optLong("id"), patch.optLong("id"), patch.optLong("size"), signature?.optLong("id") ?: 0L)
}
return steps.takeIf { it.last().signatureFile > 0 }
}
fun fileUrl(buildId: Long, fileId: Long, downloadKeyId: String): String =
"$BASE/wharf/builds/$buildId/files/$fileId/download" + keyQuery(downloadKeyId)
fun download(url: String, key: String, target: File, cancelled: AtomicBoolean, progress: (Long) -> Unit): Boolean {
val first = open(url, key)
try {
val code = first.responseCode
val location = first.getHeaderField("Location")
if (code in 300..399 && location != null) {
first.disconnect()
val next = URL(URL(url), location).toString()
if (!next.startsWith("https://")) return false
return save(open(next, null), target, cancelled, progress)
}
return save(first, target, cancelled, progress)
} finally {
runCatching { first.disconnect() }
}
}
private fun save(conn: HttpURLConnection, target: File, cancelled: AtomicBoolean, progress: (Long) -> Unit): Boolean {
try {
if (conn.responseCode !in 200..299) return false
var done = 0L
val buffer = ByteArray(128 * 1024)
conn.inputStream.use { input ->
FileOutputStream(target).use { out ->
while (true) {
if (cancelled.get()) return false
val read = input.read(buffer)
if (read < 0) break
out.write(buffer, 0, read)
done += read
progress(done)
}
}
}
return true
} finally {
runCatching { conn.disconnect() }
}
}
private fun open(url: String, key: String?): HttpURLConnection =
(URL(url).openConnection() as HttpURLConnection).apply {
connectTimeout = 30_000
readTimeout = 60_000
instanceFollowRedirects = false
setRequestProperty("User-Agent", StoreNet.BROWSER_UA)
setRequestProperty("Accept", "*/*")
if (key != null) setRequestProperty("Authorization", "Bearer $key")
}
private fun filesOf(key: String, build: JSONObject, downloadKeyId: String): JSONArray? =
build.optJSONArray("files")
?: ItchApi.get("/builds/${build.optLong("id")}" + keyQuery(downloadKeyId), key)?.optJSONObject("build")?.optJSONArray("files")
private fun pick(files: JSONArray, type: String): JSONObject? {
val all = (0 until files.length()).mapNotNull { files.optJSONObject(it) }
.filter { it.optString("type") == type && it.optString("state", "uploaded") == "uploaded" }
return all.firstOrNull { subType(it) == "optimized" } ?: all.firstOrNull { subType(it) == "default" }
}
private fun subType(file: JSONObject): String = file.optString("sub_type", file.optString("subType", "default"))
private fun keyQuery(downloadKeyId: String): String = if (downloadKeyId.isBlank()) "" else "?download_key_id=$downloadKeyId"
}
@@ -13,6 +13,7 @@ import com.droiddeck.launcher.stores.StoreInstalls
import com.droiddeck.launcher.stores.StoreNet
import com.droiddeck.launcher.stores.download.DownloadQueue
import com.droiddeck.launcher.stores.download.DownloadStage
import org.apache.commons.compress.MemoryLimitException
import org.apache.commons.compress.archivers.sevenz.SevenZFile
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream
import org.apache.commons.compress.archivers.zip.ZipFile
@@ -25,6 +26,7 @@ import java.io.FileInputStream
import java.io.FileOutputStream
import java.net.HttpURLConnection
import java.net.URL
import java.nio.file.Files
import java.util.concurrent.atomic.AtomicBoolean
internal class ItchInstaller(
@@ -60,12 +62,31 @@ internal class ItchInstaller(
val scratch = StoreInstallRoot.scratchDir(app, Store.ITCH, item.id)
scratch.mkdirs()
val archive = File(scratch, filename.ifBlank { "download.bin" })
val buildId = ItchBuilds.buildId(upload)
val exe = try {
handle.stage(DownloadStage.DOWNLOAD)
download(key, downloadKeyId, uploadId, upload.optString("updated_at", upload.optString("updatedAt")), archive, size, handle)
if (cancelled.get()) return null
handle.stage(DownloadStage.INSTALL)
install(archive, filename, handle, resuming)
var patched = updating && !resuming && previous?.isInstalled == true &&
patch(key, downloadKeyId, uploadId, buildId, size, scratch, handle)
if (cancelled.get()) {
if (patched) dropCaches(scratch)
return null
}
var picked: String? = null
if (patched) {
picked = install(archive, filename, handle, resuming, true)
if (picked == null) {
if (cancelled.get()) return null
handle.log("itch.io: the patched copy of ${item.title} has no exe, doing a full update")
patched = false
}
}
if (!patched) {
handle.stage(DownloadStage.DOWNLOAD)
download(key, downloadKeyId, uploadId, upload.optString("updated_at", upload.optString("updatedAt")), archive, size, handle)
if (cancelled.get()) return null
handle.stage(DownloadStage.INSTALL)
picked = install(archive, filename, handle, resuming, false)
}
picked
} catch (t: Throwable) {
if (!cancelled.get()) dropCaches(scratch)
throw t
@@ -88,7 +109,7 @@ internal class ItchInstaller(
installedAt = System.currentTimeMillis(),
cover = item.imageUrl,
hero = item.imageUrl,
extra = mapOf("gameId" to gameId, "downloadKeyId" to downloadKeyId, "uploadId" to uploadId),
extra = mapOf("gameId" to gameId, "downloadKeyId" to downloadKeyId, "uploadId" to uploadId, "buildId" to buildId),
cloud = false,
)
StoreInstalls.complete(app, folder, sidecar) { done, steps -> handle.stageProgress(done.toLong(), steps.toLong()) }
@@ -178,23 +199,50 @@ internal class ItchInstaller(
}
}
private fun install(archive: File, filename: String, handle: DownloadQueue.JobHandle, resuming: Boolean): String? {
private fun patch(key: String, downloadKeyId: String, uploadId: String, buildId: String, fullSize: Long, scratch: File, handle: DownloadQueue.JobHandle): Boolean {
val installed = previous?.extra.orEmpty()
val from = installed["buildId"].orEmpty()
if (installed["uploadId"] != uploadId || from.isBlank() || buildId.isBlank() || from == buildId) return false
val out = File(folder, ItchStaging.DIR)
ItchStaging.delete(out)
scratch.mkdirs()
val outcome = try {
ItchPatch.run(app, key, downloadKeyId, from, buildId, fullSize, folder, out, scratch, handle, cancelled)
} catch (t: Exception) {
ItchPatch.Outcome.Failed("${t.javaClass.simpleName} ${t.message}")
}
when (outcome) {
ItchPatch.Outcome.Applied -> {
handle.log("itch.io: patched ${item.title} from build $from to $buildId")
return true
}
ItchPatch.Outcome.Cancelled -> Unit
is ItchPatch.Outcome.Failed -> handle.log("itch.io: no patch for ${item.title}, doing a full update (${outcome.reason})")
}
ItchStaging.delete(out)
return false
}
private fun install(archive: File, filename: String, handle: DownloadQueue.JobHandle, resuming: Boolean, patched: Boolean = false): String? {
work = if (updating) File(folder, ItchStaging.DIR) else folder
if (updating) ItchStaging.delete(work)
if (updating && !patched) ItchStaging.delete(work)
work.mkdirs()
if (resuming) clearPartialInstall()
val exe = try {
when (val kind = sniff(archive, filename)) {
"zip" -> unzip(archive, handle)
"7z" -> sevenZip(archive, handle)
"rar" -> unrar(archive, handle)
"exe" -> copy(archive, File(work, filename.ifBlank { "game.exe" }))
"tar" -> untar(archive, null, handle)
"gz", "bz2", "xz" -> untar(archive, kind, handle) ?: single(archive, kind, handle)
else -> copy(archive, File(work, filename.ifBlank { "game" }))
}
if (!patched) unpack(archive, filename, handle)
val hint = filename.substringBeforeLast('.')
StoreExe.pick(work, hint.ifBlank { null }, item.title)
var picked = StoreExe.pick(work, hint.ifBlank { null }, item.title)
var passes = 0
while (picked.isBlank() && passes < 2 && !cancelled.get()) {
val inner = ItchArchives.inner(work) ?: break
handle.log("itch.io: no exe yet, unpacking ${inner.name}")
unpack(inner, inner.name, handle)
if (cancelled.get()) break
inner.delete()
picked = StoreExe.pick(work, inner.name.substringBeforeLast('.').takeIf { it.endsWith(".exe", ignoreCase = true) }, item.title)
passes++
}
picked
} catch (t: Throwable) {
if (updating) ItchStaging.delete(work)
throw t
@@ -221,21 +269,20 @@ internal class ItchInstaller(
return exe
}
private fun sniff(file: File, filename: String): String {
val extension = filename.substringAfterLast('.', "").lowercase()
if (extension == "exe") return "exe"
val head = runCatching { FileInputStream(file).use { input -> ByteArray(300).also { input.read(it) } } }.getOrNull()
?: return extension
fun at(i: Int, vararg bytes: Int) = bytes.indices.all { head.getOrNull(i + it) == bytes[it].toByte() }
return when {
at(0, 0x50, 0x4B) -> "zip"
at(0, 0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C) -> "7z"
at(0, 0x52, 0x61, 0x72, 0x21) -> "rar"
at(0, 0x1F, 0x8B) -> "gz"
at(0, 0x42, 0x5A, 0x68) -> "bz2"
at(0, 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00) -> "xz"
at(257, 0x75, 0x73, 0x74, 0x61, 0x72) -> "tar"
else -> extension
private fun unpack(archive: File, filename: String, handle: DownloadQueue.JobHandle) {
when (val kind = ItchArchives.kind(archive, filename)) {
"zip" -> unzip(archive, handle)
"7z" -> try {
sevenZip(archive, handle)
} catch (e: MemoryLimitException) {
handle.log("itch.io: ${archive.name} needs more memory than the app has, unpacking it in the runtime")
unrar(archive, handle, kind)
}
"rar" -> unrar(archive, handle, kind)
"exe" -> copy(archive, File(work, filename.ifBlank { "game.exe" }))
"tar" -> untar(archive, null, handle)
"gz", "bz2", "xz" -> untar(archive, kind, handle) ?: single(archive, kind, handle)
else -> copy(archive, File(work, filename.ifBlank { "game" }))
}
}
@@ -247,12 +294,12 @@ internal class ItchInstaller(
}
// No JVM library reads RAR5; the runtime's bsdtar (libarchive) does.
private fun unrar(archive: File, handle: DownloadQueue.JobHandle) {
if (!LinuxRuntime.isInstalled(app)) throw IllegalStateException(app.getString(R.string.stores_itch_archive, "rar"))
private fun unrar(archive: File, handle: DownloadQueue.JobHandle, kind: String) {
if (!LinuxRuntime.isInstalled(app)) throw IllegalStateException(app.getString(R.string.stores_itch_archive, kind))
val binds = if (listOf(app.filesDir, app.cacheDir).any { work.absolutePath.startsWith(it.absolutePath + "/") }) null
else listOf(work.absolutePath)
fun bsdtar(args: List<String>, onLine: (String) -> Unit) =
GuestCommand.run(app, listOf("/usr/bin/bsdtar") + args, logName = "itch-unrar", extraBinds = binds, fastPath = true) { line ->
GuestCommand.run(app, listOf("/usr/bin/bsdtar") + args, logName = "itch-unrar", extraBinds = binds, fastPath = true, cancelled = cancelled) { line ->
if (!line.startsWith("proot ")) onLine(line)
}
var entries = 0L
@@ -276,28 +323,31 @@ internal class ItchInstaller(
val total = archive.length()
var written = 0L
val buffer = ByteArray(64 * 1024)
SevenZFile.builder().setFile(archive).get().use { seven ->
while (true) {
if (cancelled.get()) return
val entry = seven.nextEntry ?: break
val file = target(entry.name)
if (file == null) {
handle.log("itch.io: skipped an entry outside the game folder")
continue
}
if (entry.isDirectory) {
file.mkdirs()
continue
}
file.parentFile?.mkdirs()
FileOutputStream(file).use { out ->
while (true) {
if (cancelled.get()) return
val read = seven.read(buffer, 0, buffer.size)
if (read < 0) break
out.write(buffer, 0, read)
written += read
handle.stageProgress(written, total)
val limitKb = (Runtime.getRuntime().maxMemory() / 4 / 1024).coerceIn(32L * 1024, Int.MAX_VALUE.toLong()).toInt()
Files.newByteChannel(archive.toPath()).use { channel ->
SevenZFile.builder().setSeekableByteChannel(channel).setMaxMemoryLimitKb(limitKb).get().use { seven ->
while (true) {
if (cancelled.get()) return
val entry = seven.nextEntry ?: break
val file = target(entry.name)
if (file == null) {
handle.log("itch.io: skipped an entry outside the game folder")
continue
}
if (entry.isDirectory) {
file.mkdirs()
continue
}
file.parentFile?.mkdirs()
FileOutputStream(file).use { out ->
while (true) {
if (cancelled.get()) return
val read = seven.read(buffer, 0, buffer.size)
if (read < 0) break
out.write(buffer, 0, read)
written += read
handle.stageProgress(written, total)
}
}
}
}
@@ -0,0 +1,124 @@
package com.droiddeck.launcher.stores.itch
import android.content.Context
import com.droiddeck.launcher.core.AddonPack
import com.droiddeck.launcher.runtime.GuestCommand
import com.droiddeck.launcher.runtime.LinuxRuntime
import com.droiddeck.launcher.stores.StoreInstalls
import com.droiddeck.launcher.stores.download.DownloadQueue
import com.droiddeck.launcher.stores.download.DownloadStage
import java.io.File
import java.util.concurrent.atomic.AtomicBoolean
internal object ItchPatch {
private const val DIR = "/usr/local/lib/droiddeck-butler"
sealed interface Outcome {
data object Applied : Outcome
data object Cancelled : Outcome
data class Failed(val reason: String) : Outcome
}
fun ready(context: Context): Boolean {
if (!AddonPack.BUTLER.available || !LinuxRuntime.isInstalled(context)) return false
if (!AddonPack.BUTLER.installed(context)) {
AddonPack.BUTLER.ensure(context)
return false
}
return stage(context)
}
private val stageLock = Any()
private fun stage(context: Context): Boolean = synchronized(stageLock) { stageLocked(context) }
private fun stageLocked(context: Context): Boolean {
val pack = AddonPack.BUTLER.dir(context)
val root = File(LinuxRuntime.rootDir(context), DIR.removePrefix("/"))
val packaged = File(pack, "version").readText()
if (runCatching { File(root, "version").readText() }.getOrNull() == packaged && File(root, "butler").isFile) return true
root.mkdirs()
pack.listFiles().orEmpty().filter { it.isFile && it.name != "version" && it.name != AddonPack.COMPLETE }.forEach { source ->
val staged = File(root, source.name + ".staged")
source.inputStream().use { input -> staged.outputStream().use { input.copyTo(it) } }
staged.setExecutable(true, false)
check(staged.renameTo(File(root, source.name)))
}
File(root, "version").writeText(packaged)
return true
}
fun run(
app: Context, key: String, downloadKeyId: String, from: String, to: String, fullSize: Long, installed: File, out: File, scratch: File,
handle: DownloadQueue.JobHandle, cancelled: AtomicBoolean,
): Outcome {
if (!ready(app)) return Outcome.Failed("the patch tool is not ready")
val steps = ItchBuilds.path(key, from, to, downloadKeyId) ?: return Outcome.Failed("no patch path from build $from to $to")
if (fullSize > 0 && steps.sumOf { it.patchSize } > fullSize) return Outcome.Failed("the patches are larger than a full download")
val dir = File(scratch, "patches").apply { deleteRecursively(); mkdirs() }
try {
handle.stage(DownloadStage.DOWNLOAD)
val total = steps.sumOf { it.patchSize }
var finished = 0L
val patches = steps.mapIndexed { index, step ->
val file = File(dir, "$index.pwr")
val base = finished
val ok = ItchBuilds.download(ItchBuilds.fileUrl(step.buildId, step.patchFile, downloadKeyId), key, file, cancelled) {
handle.progress(base + it, total)
}
if (cancelled.get()) return Outcome.Cancelled
if (!ok) return Outcome.Failed("build ${step.buildId}: the patch did not download")
finished += step.patchSize
file
}
val last = steps.last()
val signature = File(dir, "final.sig")
val got = ItchBuilds.download(ItchBuilds.fileUrl(last.buildId, last.signatureFile, downloadKeyId), key, signature, cancelled) {}
if (cancelled.get()) return Outcome.Cancelled
if (!got) return Outcome.Failed("build ${last.buildId}: the signature did not download")
handle.stage(DownloadStage.INSTALL)
return apply(app, patches, signature, installed, out, scratch, cancelled)
} finally {
StoreInstalls.deleteTree(dir)
}
}
private fun apply(app: Context, patches: List<File>, signature: File, installed: File, out: File, scratch: File, cancelled: AtomicBoolean): Outcome {
var source = installed
var intermediate: File? = null
try {
patches.forEachIndexed { index, patch ->
val finalStep = index == patches.lastIndex
val target = if (finalStep) out else File(scratch, "patched-$index")
ItchStaging.delete(target)
target.mkdirs()
val staging = File(scratch, "butler-staging-$index").apply { deleteRecursively(); mkdirs() }
val args = mutableListOf("$DIR/butler", "apply", "--assume-yes", "--staging-dir", staging.absolutePath, "-d", target.absolutePath)
if (finalStep) args += listOf("--signature", signature.absolutePath)
args += listOf(patch.absolutePath, source.absolutePath)
val binds = listOf(installed, out, scratch).map { it.absolutePath }
.filter { path -> listOf(app.filesDir, app.cacheDir).none { path.startsWith(it.absolutePath + "/") } }
.distinct().takeIf { it.isNotEmpty() }
val tail = ArrayDeque<String>()
val code = try {
GuestCommand.run(app, args, logName = "itch-butler", extraBinds = binds, fastPath = true, cancelled = cancelled) { line ->
if (!line.startsWith("proot ")) {
if (tail.size == 4) tail.removeFirst()
tail.addLast(line)
}
}
} finally {
StoreInstalls.deleteTree(staging)
}
if (cancelled.get()) return Outcome.Cancelled
if (code != 0) return Outcome.Failed("butler exited $code: ${tail.joinToString(" | ")}")
intermediate?.let { StoreInstalls.deleteTree(it) }
intermediate = if (finalStep) null else target
source = target
}
return Outcome.Applied
} finally {
intermediate?.let { StoreInstalls.deleteTree(it) }
}
}
}
@@ -93,6 +93,9 @@ fun ControllerMappingPage(mapping: Map<String, String>, onPick: (String, String)
lede = stringResource(R.string.ctrl_mapping_lede),
onBack = onBack,
) {
SettingsGroup(stringResource(R.string.shortcuts_title)) {
PhysicalShortcutRows()
}
SettingsGroup(stringResource(R.string.ctrl_onscreen_buttons)) {
val targets = ControllerPrefs.targets.map { (id, label) -> id to stringResource(label) }
for ((id, name) in ControllerPrefs.mappable) {
@@ -69,6 +69,7 @@ object DualScreenPanel {
private var launching = false
set(value) { field = value; available = value || activity != null }
private var ownerTask = -1
private var ownerYielded = false
var typing by mutableStateOf<TypingRequest?>(null)
private set
@@ -114,10 +115,11 @@ object DualScreenPanel {
}
fun show(context: Context, display: Int, task: Int) {
if (shownOn == display) return
if (shownOn == display) { ownerTask = task; return }
hide()
displayId = display
ownerTask = task
ownerYielded = false
launching = true
val intent = Intent(context, DualScreenActivity::class.java)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_MULTIPLE_TASK or Intent.FLAG_ACTIVITY_NO_ANIMATION)
@@ -134,6 +136,10 @@ object DualScreenPanel {
activity = null
}
fun hide(task: Int) {
if (ownerTask == task || ownerTask < 0) hide()
}
internal fun attach(host: DualScreenActivity): Boolean {
if (!launching && activity == null) return false
if (activity !== host) activity?.finishAndRemoveTask()
@@ -142,11 +148,29 @@ object DualScreenPanel {
return true
}
// The panel resumes when an app opens over the owner on the primary screen; pulling the owner back would hide that app.
fun yieldTo(task: Int, app: Boolean) {
if (ownerTask == task) ownerYielded = app
}
internal fun returnFocus(context: Context) {
if (ownerYielded) return
val task = ownerTask.takeIf { it >= 0 } ?: return
runCatching { (context.getSystemService(Context.ACTIVITY_SERVICE) as android.app.ActivityManager).moveTaskToFront(task, 0) }
}
internal fun reclaimFocus(context: Context) {
if (ownerYielded) return
val task = ownerTask.takeIf { it >= 0 } ?: return
val manager = context.getSystemService(Context.ACTIVITY_SERVICE) as android.app.ActivityManager
runCatching {
manager.appTasks.firstOrNull {
@Suppress("DEPRECATION")
(if (android.os.Build.VERSION.SDK_INT >= 29) it.taskInfo.taskId else it.taskInfo.persistentId) == task
}?.moveToFront() ?: manager.moveTaskToFront(task, 0)
}
}
internal fun detach(host: DualScreenActivity) {
if (activity === host) {
activity = null
@@ -162,7 +186,7 @@ class DualScreenActivity : ComponentActivity() {
finishAndRemoveTask()
return
}
window.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE or WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
applyImmersiveMode()
setContent {
val model = DualScreenPanel.model
@@ -197,7 +221,6 @@ class DualScreenActivity : ComponentActivity() {
private fun dropFocus() {
unfocusPending = false
window.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
}
override fun onResume() {
@@ -205,10 +228,17 @@ class DualScreenActivity : ComponentActivity() {
if (!DualScreenPanel.typingShown) DualScreenPanel.returnFocus(this)
}
override fun onTopResumedActivityChanged(isTopResumedActivity: Boolean) {
super.onTopResumedActivityChanged(isTopResumedActivity)
if (isTopResumedActivity && !DualScreenPanel.typingShown) DualScreenPanel.returnFocus(this)
}
override fun onWindowFocusChanged(hasFocus: Boolean) {
super.onWindowFocusChanged(hasFocus)
if (hasFocus) applyImmersiveMode()
else if (unfocusPending && !DualScreenPanel.typingShown) dropFocus()
if (hasFocus) {
applyImmersiveMode()
if (!DualScreenPanel.typingShown) DualScreenPanel.reclaimFocus(this)
} else if (unfocusPending && !DualScreenPanel.typingShown) dropFocus()
}
@Suppress("OVERRIDE_DEPRECATION")
@@ -202,7 +202,6 @@ internal fun BusyChip(s: FrontEndState) {
internal fun RuntimeChip(s: FrontEndState) = when {
s.busy -> Chip(if (s.percent >= 0) stringResource(R.string.setup_runtime_progress, s.stage, s.percent) else s.stage, ok = false)
s.removalPending -> Chip(stringResource(R.string.runtime_removal_incomplete), ok = false)
!s.ready -> Chip(stringResource(R.string.games_runtime_first_play), ok = false)
s.available != null && s.available != s.installed -> Chip(stringResource(R.string.games_runtime_update), ok = false)
else -> Chip(stringResource(R.string.games_runtime_ready), ok = true)
}
@@ -166,7 +166,7 @@ class FrontEndState(
val sgdbUserKey: Boolean = false,
val storesShowMature: Boolean = false,
val storesSort: String = SessionPrefs.STORES_SORTS.first(),
val storesView: String = SessionPrefs.STORES_VIEWS.first(),
val storesView: String = SessionPrefs.DEFAULT_STORES_VIEW,
val storeDownloadsActive: Int = 0,
val updates: UpdatesState = UpdatesState(),
)
@@ -614,25 +614,35 @@ private fun GameMoreMenu(g: Library.SteamGame, a: FrontEndActions) {
}
@Composable
internal fun IconAction(icon: androidx.compose.ui.graphics.vector.ImageVector, label: String, id: String, danger: Boolean = false, enabled: Boolean = true, onClick: () -> Unit) {
internal fun IconAction(icon: androidx.compose.ui.graphics.vector.ImageVector, label: String, id: String, danger: Boolean = false, enabled: Boolean = true, frosted: Boolean = false, onClick: () -> Unit) {
val colors = MaterialTheme.colorScheme
val shape = if (LocalPillButtons.current) CircleShape else Shape12
val pill = LocalPillButtons.current
val shape = if (pill) CircleShape else Shape12
val pal = LocalPalette.current
val src = remember { MutableInteractionSource() }
val hot = rememberHot(src) && enabled
val accent = if (danger) colors.error else pal.signal
Box(
contentAlignment = Alignment.Center,
modifier = Modifier.paneItem(id).downToFirstTile().size(if (LocalPillButtons.current) 40.dp else 44.dp).clip(shape)
.background(if (hot) accent.copy(alpha = if (danger) 0.22f else 0.14f) else if (danger) Color.Black.copy(alpha = 0.34f) else Color.White.copy(alpha = 0.03f))
.glideBorder(hot, shape, accent, pal.line2)
.alpha(if (enabled) 1f else 0.45f)
.hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, role = androidx.compose.ui.semantics.Role.Button, enabled = enabled, onClick = onClick)
.controllerConfirm(enabled = enabled, onClick = onClick)
.semantics { contentDescription = label },
) {
Icon(icon, contentDescription = null, tint = if (danger && hot) colors.error else if (danger) Color.White else colors.onBackground, modifier = Modifier.size(18.dp))
val fill = when {
hot -> accent.copy(alpha = if (danger) 0.22f else 0.14f)
pill -> Color.White.copy(alpha = 0.09f)
danger -> Color.Black.copy(alpha = 0.34f)
else -> Color.White.copy(alpha = 0.03f)
}
val button: @Composable () -> Unit = {
Box(
contentAlignment = Alignment.Center,
modifier = Modifier.paneItem(id).downToFirstTile().size(if (pill) 40.dp else 44.dp).clip(shape)
.background(fill)
.glideBorder(hot, shape, accent, if (pill) Color.White.copy(alpha = 0.14f) else pal.line2)
.alpha(if (enabled) 1f else 0.45f)
.hoverable(src).clickable(interactionSource = src, indication = LocalIndication.current, role = androidx.compose.ui.semantics.Role.Button, enabled = enabled, onClick = onClick)
.controllerConfirm(enabled = enabled, onClick = onClick)
.semantics { contentDescription = label },
) {
Icon(icon, contentDescription = null, tint = if (danger && hot) colors.error else if (danger && !pill) Color.White else colors.onBackground, modifier = Modifier.size(18.dp))
}
}
if (frosted) Box(Modifier.glass(CircleShape)) { button() } else button()
}
@Composable
@@ -645,7 +655,7 @@ private fun RemoveButton(title: String, game: Library.SteamGame?, installed: Ins
val gone = StoresState.uninstalling[key]
if (gone != null) {
val uninstalling = stringResource(R.string.stores_uninstalling)
Box(contentAlignment = Alignment.Center, modifier = Modifier.size(44.dp).clip(Shape12).background(Color.Black.copy(alpha = 0.34f)).semantics { contentDescription = uninstalling }) {
Box(contentAlignment = Alignment.Center, modifier = Modifier.size(40.dp).glass(CircleShape).semantics { contentDescription = uninstalling }) {
if (gone > 0f) CircularProgressIndicator(progress = { gone }, strokeWidth = 2.dp, color = colors.error, trackColor = colors.error.copy(alpha = 0.22f), modifier = Modifier.size(20.dp))
else CircularProgressIndicator(strokeWidth = 2.dp, color = colors.error, modifier = Modifier.size(20.dp))
}
@@ -659,7 +669,7 @@ private fun RemoveButton(title: String, game: Library.SteamGame?, installed: Ins
val busy = StoresState.download(key)?.isActive == true || (installed.sidecar.store == Store.XBOX && XboxContent.busy(installed.sidecar.id))
val placed = remember { arrayOfNulls<androidx.compose.ui.layout.LayoutCoordinates>(1) }
Box(Modifier.onGloballyPositioned { placed[0] = it }) {
IconAction(Icons.Outlined.Delete, remove, "game:remove", danger = true, enabled = !busy) {
IconAction(Icons.Outlined.Delete, remove, "game:remove", danger = true, enabled = !busy, frosted = true) {
val at = placed[0]?.takeIf { it.isAttached }?.boundsInRoot() ?: return@IconAction
var confirmed = false
Steps.ask(StepAsk(anchor = at, side = StepSide.Left, accent = colors.error, items = 3, pillCorner = 12.dp, maxWidth = 340.dp,
@@ -682,7 +692,7 @@ private fun RemoveButton(title: String, game: Library.SteamGame?, installed: Ins
var asking by remember(g.gameId) { mutableStateOf(false) }
val shortcut = kind == GameRemoval.Kind.SHORTCUT
val label = stringResource(if (shortcut) R.string.edit_remove else R.string.common_uninstall)
IconAction(Icons.Outlined.Delete, label, "game:remove", danger = true) { asking = true }
IconAction(Icons.Outlined.Delete, label, "game:remove", danger = true, frosted = true) { asking = true }
if (asking) ConfirmDialog(
title = if (shortcut) stringResource(R.string.games_remove_title, g.name) else stringResource(R.string.stores_uninstall_title, g.name),
text = when {
@@ -23,7 +23,7 @@ import com.droiddeck.launcher.stores.itch.ItchUpdates
@Composable
internal fun ItchCheckButton(installed: InstalledStoreGame) {
val ctx = LocalContext.current
IconAction(Icons.Filled.Refresh, stringResource(R.string.store_check_updates), "game:check-updates", enabled = ItchUpdates.checkingKey == null) {
IconAction(Icons.Filled.Refresh, stringResource(R.string.store_check_updates), "game:check-updates", enabled = ItchUpdates.checkingKey == null, frosted = true) {
ItchUpdates.checkGame(ctx, installed)
}
}
@@ -306,6 +306,7 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras:
if (steam && s.steamController in listOf(SessionPrefs.CONTROLLER_DECK, SessionPrefs.CONTROLLER_STEAM)) {
Note(stringResource(R.string.back_native_qam_hint))
}
PhysicalShortcutRows()
}
}
if (tab == SheetTab.AUDIO && steam) {
@@ -0,0 +1,189 @@
package com.droiddeck.launcher.ui
import android.util.Log
import android.view.KeyEvent
import android.view.Window
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import androidx.compose.ui.window.DialogWindowProvider
import com.droiddeck.launcher.R
import com.droiddeck.launcher.input.PhysicalShortcuts
@Composable
internal fun PhysicalShortcutRows(
onChanged: () -> Unit = {},
modifierFor: (PhysicalShortcuts.Action) -> Modifier = { Modifier },
) {
val context = LocalContext.current
var bindings by remember { mutableStateOf(PhysicalShortcuts.read(context)) }
var editing by remember { mutableStateOf<PhysicalShortcuts.Action?>(null) }
Column {
for (action in PhysicalShortcuts.Action.entries) {
val assigned = bindings.filter { it.action == action }
SettingsRow(
stringResource(action.label),
assigned.joinToString { "${it.button.label} · ${it.button.name}" }.ifEmpty { null },
) {
SecondaryButton(
stringResource(if (assigned.isEmpty()) R.string.game_settings_default else R.string.ctrl_custom),
compact = true,
modifier = modifierFor(action).width(LocalChipMinWidth.current)
.testTag("shortcuts-assign-${action.name}"),
) { editing = action }
}
}
}
editing?.let { action ->
PhysicalShortcutsDialog(action, onDismiss = { editing = null }, onChanged = {
bindings = PhysicalShortcuts.read(context)
onChanged()
})
}
}
@Composable
internal fun PhysicalShortcutsDialog(
action: PhysicalShortcuts.Action,
onDismiss: () -> Unit,
onChanged: () -> Unit = {},
) {
val context = LocalContext.current
val bindings = remember { PhysicalShortcuts.read(context) }
var candidate by remember { mutableStateOf<PhysicalShortcuts.Button?>(null) }
var listening by remember { mutableStateOf(true) }
var capturedDevice by remember { mutableStateOf(-1) }
Dialog(
onDismissRequest = onDismiss,
properties = DialogProperties(dismissOnBackPress = !listening, usePlatformDefaultWidth = false),
) {
CaptureShortcutKeys { event ->
if (listening && event.action == KeyEvent.ACTION_DOWN && event.repeatCount == 0 &&
(event.keyCode == KeyEvent.KEYCODE_BACK || event.keyCode == KeyEvent.KEYCODE_BUTTON_B)) {
listening = false
onDismiss()
true
} else if (!listening || PhysicalShortcuts.isVolumeKey(event)) {
false
} else {
if (candidate == null && event.action == KeyEvent.ACTION_DOWN && event.repeatCount == 0) {
PhysicalShortcuts.button(event)?.let { button ->
candidate = button
capturedDevice = event.deviceId
Log.i("PhysicalShortcuts", "capture device=${button.name} key=${event.keyCode} " +
"scan=${event.scanCode} source=0x${event.source.toString(16)}")
}
} else if (event.action == KeyEvent.ACTION_UP && event.deviceId == capturedDevice &&
candidate?.matches(event) == true) {
listening = false
candidate?.let { button ->
if (bindings.none { it.button.sameInput(button) && it.action != action }) {
PhysicalShortcuts.assign(context, button, action)
onChanged()
onDismiss()
}
}
}
true
}
}
CompositionLocalProvider(LocalFrontFocus provides null) {
Surface(
shape = RoundedCornerShape(16.dp),
modifier = Modifier.padding(12.dp).widthIn(max = 560.dp).fillMaxWidth()
.heightIn(max = (LocalConfiguration.current.screenHeightDp - 24).dp),
) {
Column(
Modifier.verticalScroll(rememberScrollState()).padding(18.dp).controllerBack(onDismiss),
verticalArrangement = Arrangement.spacedBy(12.dp),
) {
Text(stringResource(R.string.shortcuts_capture, stringResource(action.label)),
style = MaterialTheme.typography.titleLarge)
val button = candidate
if (button == null) {
Text(stringResource(R.string.shortcuts_press))
} else {
Text(stringResource(R.string.shortcuts_detected, button.name, button.label))
if (listening) {
Text(stringResource(R.string.shortcuts_release))
} else {
val replacements = bindings.filter {
it.button.sameInput(button) || (it.button.device == button.device && it.action == action)
}
for (conflict in replacements) {
Text("${conflict.button.label} · ${conflict.button.name}")
Text(stringResource(R.string.shortcuts_conflict, stringResource(conflict.action.label)))
}
SecondaryButton(stringResource(R.string.shortcuts_save), modifier = Modifier.testTag("shortcuts-save")) {
PhysicalShortcuts.assign(context, button, action)
onChanged()
onDismiss()
}
}
SecondaryButton(stringResource(R.string.shortcuts_retry), modifier = Modifier.testTag("shortcuts-retry")) {
candidate = null
capturedDevice = -1
listening = true
}
}
Text(stringResource(R.string.shortcuts_limitations), style = MaterialTheme.typography.bodySmall)
for (binding in bindings.filter { it.action == action }) {
ActionRow(
stringResource(R.string.shortcuts_detected, binding.button.name, binding.button.label),
null, stringResource(R.string.ctrl_reset), {
PhysicalShortcuts.remove(context, binding)
onChanged()
onDismiss()
},
modifier = Modifier.testTag("shortcuts-remove"),
)
}
SecondaryButton(stringResource(R.string.common_close), modifier = Modifier.testTag("shortcuts-cancel"),
onClick = onDismiss)
}
}
}
}
}
@Composable
private fun CaptureShortcutKeys(onKey: (KeyEvent) -> Boolean) {
val currentOnKey by rememberUpdatedState(onKey)
val window = (LocalView.current.parent as DialogWindowProvider).window
DisposableEffect(window) {
val previous = window.callback
// Capture before dialog navigation so Back and gamepad buttons can be assigned.
window.callback = object : Window.Callback by previous {
override fun dispatchKeyEvent(event: KeyEvent): Boolean =
currentOnKey(event) || previous.dispatchKeyEvent(event)
}
onDispose { window.callback = previous }
}
}
@@ -141,6 +141,10 @@ class SecondScreenPresentation(
if (created) renderMode()
}
fun retryTerminal() {
if (created && isShowing && currentMode == SecondScreenMode.TERMINAL && terminalSession == null) renderMode()
}
val showsKeyboard: Boolean get() = isShowing && !menuShown && currentMode == SecondScreenMode.KEYBOARD_TRACKPAD
val showsControls: Boolean get() = isShowing && currentMode != SecondScreenMode.NONE
@@ -247,6 +247,8 @@ class DrawerActions(
val onHudReset: () -> Unit = {},
val onHudExport: () -> Unit = {},
val onFrameGenPick: (FrameGen.Mode) -> Unit,
val fpsLimit: Int = 0,
val onFpsLimit: (Int) -> Unit = {},
val onImportLossless: () -> Unit,
val onKeyboard: () -> Unit,
val onHardwareKeyboard: () -> Unit,
@@ -535,6 +537,7 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont
SessionDrawerPage.DISPLAY -> {
SettingsGroup(stringResource(R.string.drawer_page_display)) {
val fgOpen = host.open == "fg"
val offLabel = stringResource(R.string.frame_gen_off)
val fgLabel = FrameGen.label(LocalContext.current, a.frameGen)
SettingsRow(stringResource(R.string.frame_gen_title), null, highlighted = fgOpen) {
Box {
@@ -542,6 +545,13 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont
FrameGenMenu(host, a.frameGen, a.lossless, a.onFrameGenPick, a.onImportLossless)
}
}
if (a.direct) SliderRow(
stringResource(R.string.drawer_frame_limit), stringResource(R.string.drawer_frame_limit_note),
a.fpsLimit.takeIf { it > 0 } ?: SessionPrefs.FPS_LIMIT_OFF,
SessionPrefs.FPS_LIMIT_OFF..SessionPrefs.FPS_LIMIT_MAX, step = 5,
format = { if (it <= SessionPrefs.FPS_LIMIT_OFF) offLabel else it.toString() },
modifier = focus.track(page, "fps-limit"),
onChange = { a.onFpsLimit(if (it <= SessionPrefs.FPS_LIMIT_OFF) 0 else it) })
}
SettingsGroup(stringResource(R.string.display_image_scaling)) {
ChoiceRow(host, "upscaler", stringResource(R.string.display_filter), null,
@@ -635,6 +645,7 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont
if (a.steam) ChoiceRow(host, "back-double-tap", stringResource(R.string.back_double_tap_window), null,
SessionPrefs.BACK_DOUBLE_TAP_MS_OPTIONS.map { it to stringResource(R.string.back_tap_ms, it) },
a.backDoubleTapMs, chipModifier = focus.track(page, "back-double-tap"), onPick = a.onBackDoubleTapMs)
PhysicalShortcutRows(modifierFor = { focus.track(page, "physical-shortcut-${it.name}") })
if (a.steam && a.unfoldedControls != null) ToggleRow(host, "unfolded-controls", stringResource(R.string.unfolded_controls),
stringResource(R.string.unfolded_controls_hint), a.unfoldedControls,
chipModifier = focus.track(page, "unfolded-controls"), onChange = a.onUnfoldedControls)
@@ -856,6 +867,8 @@ private fun StopSessionButton(modifier: Modifier = Modifier, onClick: () -> Unit
val fill by animateColorAsState(if (hot) colors.error.copy(alpha = 0.18f) else Color.Transparent, Motion.tw(220), label = "dangerFill")
val shape = RoundedCornerShape(20.dp)
val stopDescription = stringResource(R.string.stop_session)
val stopLabel = stringResource(R.string.drawer_stop)
var iconOnly by remember(stopLabel, androidx.compose.ui.platform.LocalConfiguration.current.screenWidthDp) { mutableStateOf(false) }
Row(
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp),
modifier = modifier.heightIn(min = 44.dp).semantics { contentDescription = stopDescription }.testTag("drawer-stop")
@@ -865,7 +878,10 @@ private fun StopSessionButton(modifier: Modifier = Modifier, onClick: () -> Unit
.padding(start = 12.dp, end = 14.dp),
) {
Icon(Icons.Outlined.PowerSettingsNew, contentDescription = null, tint = colors.error, modifier = Modifier.size(18.dp))
Text(stringResource(R.string.drawer_stop), fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = colors.error)
if (!iconOnly) Text(
stopLabel, fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = colors.error,
maxLines = 1, softWrap = false, onTextLayout = { if (it.hasVisualOverflow) iconOnly = true },
)
}
}
@@ -1780,7 +1796,7 @@ private fun StopConfirm(
.padding(start = 12.dp, end = 14.dp),
) {
Icon(Icons.Outlined.PowerSettingsNew, contentDescription = null, tint = colors.error, modifier = Modifier.size(18.dp))
Text(stringResource(R.string.drawer_stop), fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = colors.error)
Text(stringResource(R.string.drawer_stop), fontSize = 14.sp, fontWeight = FontWeight.SemiBold, color = colors.error, maxLines = 1, softWrap = false)
}
val maxW = with(density) { StepBoxMaxWidth.toPx() }.coerceAtMost(p.right)
Column(
@@ -142,7 +142,7 @@ internal fun SteamHome(s: FrontEndState, a: FrontEndActions, modifier: Modifier)
scrim = { if (games.size >= WALL_MIN_GAMES) WallFade() },
words = {
val runtimeStatus: @Composable () -> Unit = {
if (s.busy || !s.ready || (s.available != null && s.available != s.installed)) RuntimeChip(s)
if (s.busy || (s.available != null && s.available != s.installed)) RuntimeChip(s)
else if (s.integration.suggested && signedIn && !com.droiddeck.launcher.core.PhantomProcessLimit.blocksSteam(s.phantomProcessStatus))
IntegrationSuggestion(s.integration, { a.onSteamIntegration(null) }, a.onDismissIntegration)
}
@@ -0,0 +1,45 @@
package com.droiddeck.launcher.ui
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.RestartAlt
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.droiddeck.launcher.R
@Composable
internal fun SteamImportDialog(games: List<String>, onAnswer: (Boolean) -> Unit) {
val now = remember { booleanArrayOf(false) }
val shown = rememberShown { onAnswer(now[0]) }
val close = { shown.targetState = false }
val focus = remember { FocusRequester() }
LaunchedEffect(Unit) { runCatching { focus.requestFocus() } }
val names = if (games.size <= 3) games.joinToString(", ")
else stringResource(R.string.steam_import_names_more, games.take(3).joinToString(", "), games.size - 3)
AppDialog(shown, close, "steamImport", wide = false, maxWidth = 520.dp) {
DialogTitleRow(stringResource(R.string.steam_import_title), close) {
Icon(Icons.Filled.RestartAlt, null, tint = LocalPalette.current.signal, modifier = Modifier.size(20.dp))
}
Text(
stringResource(R.string.steam_import_body, names),
fontSize = 13.sp, lineHeight = 18.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Row(horizontalArrangement = Arrangement.spacedBy(10.dp, androidx.compose.ui.Alignment.End), modifier = Modifier.fillMaxWidth()) {
SecondaryButton(stringResource(R.string.steam_import_later)) { now[0] = false; close() }
PrimaryButton(stringResource(R.string.steam_import_now), modifier = Modifier.focusRequester(focus), onClick = { now[0] = true; close() })
}
}
}
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">اختصارات الأزرار الفعلية</string>
<string name="shortcuts_dd_menu">قائمة DroidDeck</string>
<string name="shortcuts_capture">تعيين: %1$s</string>
<string name="shortcuts_press">اضغط على زر ثم حرره. يُحفظ التعيين تلقائيًا.</string>
<string name="shortcuts_release">أفلت الزر للمتابعة.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">هذا الزر معيّن بالفعل إلى: %1$s</string>
<string name="shortcuts_save">إعادة تعيين</string>
<string name="shortcuts_retry">تجربة زر آخر</string>
<string name="shortcuts_limitations">قد لا يتوفر زر الشاشة الرئيسية وبعض الأزرار الإضافية.</string>
</resources>
+5 -1
View File
@@ -1149,7 +1149,6 @@
<string name="games_never_played">لم يتم تشغيلها أبدًا</string>
<string name="games_runtime_busy_percent">بيئة التشغيل مشغولة · %1$d%%</string>
<string name="games_runtime_busy">بيئة التشغيل مشغولة</string>
<string name="games_runtime_first_play">تُثبَّت بيئة التشغيل عند أول تشغيل</string>
<string name="games_runtime_update">يتوفر تحديث لبيئة التشغيل</string>
<string name="games_runtime_ready">● بيئة التشغيل جاهزة</string>
<string name="games_internal">التخزين الداخلي</string>
@@ -3351,4 +3350,9 @@
<string name="slow_usb_port">%1$s متصل عبر %2$s (%3$s ميغابت/ث، حوالي %4$d ميغابايت/ث). لا يدعم منفذ USB في هذا الجهاز سرعة أعلى، لذا ستُحمَّل الألعاب عليه ببطء. قد تكون الذاكرة الداخلية أو بطاقة microSD أسرع.</string>
<string name="slow_usb_never">عدم الإظهار مرة أخرى</string>
<string name="slow_usb_dismiss">إغلاق</string>
<string name="steam_import_title">هل تريد إعادة تشغيل Steam لإضافة ألعابك؟</string>
<string name="steam_import_body">يمكن لـ Steam إدراج هذه الألعاب التي تملكها كألعاب مثبتة: %1$s. يجب إعادة تشغيله لإظهارها. أعد التشغيل الآن، أو ستُضاف في المرة القادمة التي يبدأ فيها Steam.</string>
<string name="steam_import_names_more">%1$s و%2$d أخرى</string>
<string name="steam_import_now">إعادة التشغيل الآن</string>
<string name="steam_import_later">لاحقًا</string>
</resources>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Atajos de botones físicos</string>
<string name="shortcuts_dd_menu">Menú de DroidDeck</string>
<string name="shortcuts_capture">Asignar: %1$s</string>
<string name="shortcuts_press">Presiona y suelta un botón. La asignación se guarda automáticamente.</string>
<string name="shortcuts_release">Suelta el botón para continuar.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Este botón ya está asignado a: %1$s</string>
<string name="shortcuts_save">Reasignar</string>
<string name="shortcuts_retry">Probar otro botón</string>
<string name="shortcuts_limitations">El botón Inicio y algunos botones adicionales pueden no estar disponibles.</string>
</resources>
+5 -1
View File
@@ -1188,7 +1188,6 @@
<string name="games_never_played">Nunca jugado</string>
<string name="games_runtime_busy_percent">Runtime ocupado · %1$d%%</string>
<string name="games_runtime_busy">Runtime ocupado</string>
<string name="games_runtime_first_play">El runtime se instala al jugar</string>
<string name="games_runtime_update">Actualización del runtime disponible</string>
<string name="games_runtime_ready">● Runtime listo</string>
<string name="games_internal">Almacenamiento interno</string>
@@ -3198,4 +3197,9 @@
<string name="slow_usb_port">%1$s está conectado por %2$s (%3$s Mbps, unos %4$d MB/s). El puerto USB de este dispositivo no admite más velocidad, así que los juegos cargarán lento. El almacenamiento interno o una microSD pueden ser más rápidos.</string>
<string name="slow_usb_never">No volver a mostrar</string>
<string name="slow_usb_dismiss">Descartar</string>
<string name="steam_import_title">¿Reiniciar Steam para agregar tus juegos?</string>
<string name="steam_import_body">Steam puede mostrar como instalados estos juegos que tienes: %1$s. Tiene que reiniciarse para mostrarlos. Reinicia ahora o se agregarán la próxima vez que Steam se inicie.</string>
<string name="steam_import_names_more">%1$s y %2$d más</string>
<string name="steam_import_now">Reiniciar ahora</string>
<string name="steam_import_later">Más tarde</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Преки пътища с физически бутони</string>
<string name="shortcuts_dd_menu">Меню на DroidDeck</string>
<string name="shortcuts_capture">Задаване: %1$s</string>
<string name="shortcuts_press">Натиснете и отпуснете бутон. Назначението се запазва автоматично.</string>
<string name="shortcuts_release">Отпуснете бутона, за да продължите.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Този бутон вече е зададен за: %1$s</string>
<string name="shortcuts_save">Преназначаване</string>
<string name="shortcuts_retry">Опитайте друг бутон</string>
<string name="shortcuts_limitations">Бутонът Начало и някои допълнителни бутони може да не са налични.</string>
</resources>
+5 -1
View File
@@ -1125,7 +1125,6 @@
<string name="games_never_played">Никога не е играна</string>
<string name="games_runtime_busy_percent">Средата за изпълнение е заета · %1$d%%</string>
<string name="games_runtime_busy">Средата за изпълнение е заета</string>
<string name="games_runtime_first_play">Средата за изпълнение се инсталира при първото Play</string>
<string name="games_runtime_update">Налична актуализация на средата за изпълнение</string>
<string name="games_runtime_ready">● Средата за изпълнение е готова</string>
<string name="games_internal">Вътрешна памет</string>
@@ -3211,4 +3210,9 @@
<string name="slow_usb_port">%1$s е свързан чрез %2$s (%3$s Mbps, около %4$d MB/s). USB портът на това устройство не поддържа по-висока скорост, затова игрите ще се зареждат бавно. Вътрешната памет или microSD карта може да са по-бързи.</string>
<string name="slow_usb_never">Не показвай отново</string>
<string name="slow_usb_dismiss">Затвори</string>
<string name="steam_import_title">Да се рестартира ли Steam, за да добави игрите ви?</string>
<string name="steam_import_body">Steam може да покаже тези ваши игри като инсталирани: %1$s. Трябва да се рестартира, за да ги покаже. Рестартирайте сега или те ще бъдат добавени при следващото стартиране на Steam.</string>
<string name="steam_import_names_more">%1$s и още %2$d</string>
<string name="steam_import_now">Рестартиране сега</string>
<string name="steam_import_later">По-късно</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Zkratky fyzických tlačítek</string>
<string name="shortcuts_dd_menu">Nabídka DroidDeck</string>
<string name="shortcuts_capture">Přiřadit: %1$s</string>
<string name="shortcuts_press">Stiskněte a uvolněte tlačítko. Přiřazení se uloží automaticky.</string>
<string name="shortcuts_release">Pokračujte uvolněním tlačítka.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Toto tlačítko je již přiřazeno k: %1$s</string>
<string name="shortcuts_save">Přeřadit</string>
<string name="shortcuts_retry">Zkusit jiné tlačítko</string>
<string name="shortcuts_limitations">Tlačítko Domů a některá další tlačítka nemusí být dostupná.</string>
</resources>
+5 -1
View File
@@ -1137,7 +1137,6 @@
<string name="games_never_played">Nikdy nehráno</string>
<string name="games_runtime_busy_percent">Runtime zaneprázdněn · %1$d%%</string>
<string name="games_runtime_busy">Runtime zaneprázdněn</string>
<string name="games_runtime_first_play">Runtime se nainstaluje při prvním spuštění hry</string>
<string name="games_runtime_update">K dispozici aktualizace runtime</string>
<string name="games_runtime_ready">● Runtime připraven</string>
<string name="games_internal">Interní úložiště</string>
@@ -3281,4 +3280,9 @@
<string name="slow_usb_port">%1$s je připojen přes %2$s (%3$s Mb/s, asi %4$d MB/s). Port USB tohoto zařízení rychleji neumí, takže hry na něm se budou načítat pomalu. Interní úložiště nebo karta microSD může být rychlejší.</string>
<string name="slow_usb_never">Už nezobrazovat</string>
<string name="slow_usb_dismiss">Zavřít</string>
<string name="steam_import_title">Restartovat Steam a přidat vaše hry?</string>
<string name="steam_import_body">Steam může tyto vaše hry zobrazit jako nainstalované: %1$s. Aby je ukázal, musí se restartovat. Restartujte teď, nebo se přidají při příštím spuštění Steamu.</string>
<string name="steam_import_names_more">%1$s a %2$d dalších</string>
<string name="steam_import_now">Restartovat teď</string>
<string name="steam_import_later">Později</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Genveje til fysiske knapper</string>
<string name="shortcuts_dd_menu">DroidDeck-menu</string>
<string name="shortcuts_capture">Tildel: %1$s</string>
<string name="shortcuts_press">Tryk på en knap, og slip den. Tildelingen gemmes automatisk.</string>
<string name="shortcuts_release">Slip knappen for at fortsætte.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Denne knap er allerede tildelt: %1$s</string>
<string name="shortcuts_save">Tildel igen</string>
<string name="shortcuts_retry">Prøv en anden knap</string>
<string name="shortcuts_limitations">Hjem-knappen og visse ekstra knapper er muligvis ikke tilgængelige.</string>
</resources>
+5 -1
View File
@@ -1125,7 +1125,6 @@
<string name="games_never_played">Aldrig spillet</string>
<string name="games_runtime_busy_percent">Runtime optaget · %1$d%%</string>
<string name="games_runtime_busy">Runtime optaget</string>
<string name="games_runtime_first_play">Runtime installeres ved første Spil</string>
<string name="games_runtime_update">Runtimeopdatering tilgængelig</string>
<string name="games_runtime_ready">● Runtime klar</string>
<string name="games_internal">Internt lager</string>
@@ -3211,4 +3210,9 @@
<string name="slow_usb_port">%1$s er tilsluttet via %2$s (%3$s Mbps, ca. %4$d MB/s). Denne enheds USB-port kan ikke køre hurtigere, så spil på den indlæses langsomt. Intern lagerplads eller et microSD-kort kan være hurtigere.</string>
<string name="slow_usb_never">Vis ikke igen</string>
<string name="slow_usb_dismiss">Luk</string>
<string name="steam_import_title">Genstart Steam for at tilføje dine spil?</string>
<string name="steam_import_body">Steam kan vise disse spil, du ejer, som installerede: %1$s. Steam skal genstartes for at vise dem. Genstart nu, eller de bliver tilføjet næste gang Steam starter.</string>
<string name="steam_import_names_more">%1$s og %2$d mere</string>
<string name="steam_import_now">Genstart nu</string>
<string name="steam_import_later">Senere</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Physische Tastenkürzel</string>
<string name="shortcuts_dd_menu">DroidDeck-Menü</string>
<string name="shortcuts_capture">Zuweisen: %1$s</string>
<string name="shortcuts_press">Drücke eine Taste und lasse sie los. Die Zuweisung wird automatisch gespeichert.</string>
<string name="shortcuts_release">Lasse die Taste los, um fortzufahren.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Diese Taste ist bereits zugewiesen: %1$s</string>
<string name="shortcuts_save">Neu zuweisen</string>
<string name="shortcuts_retry">Andere Taste versuchen</string>
<string name="shortcuts_limitations">Die Home-Taste und einige Zusatztasten sind möglicherweise nicht verfügbar.</string>
</resources>
+5 -1
View File
@@ -1117,7 +1117,6 @@
<string name="games_never_played">Nie gespielt</string>
<string name="games_runtime_busy_percent">Laufzeit beschäftigt · %1$d %%</string>
<string name="games_runtime_busy">Laufzeit beschäftigt</string>
<string name="games_runtime_first_play">Laufzeit wird beim ersten „Spielen“ installiert</string>
<string name="games_runtime_update">Laufzeit-Update verfügbar</string>
<string name="games_runtime_ready">● Laufzeit bereit</string>
<string name="games_internal">Interner Speicher</string>
@@ -3211,4 +3210,9 @@
<string name="slow_usb_port">%1$s ist über %2$s verbunden (%3$s Mbit/s, etwa %4$d MB/s). Der USB-Anschluss dieses Geräts kann nicht schneller, daher laden Spiele darauf langsam. Interner Speicher oder eine microSD-Karte können schneller sein.</string>
<string name="slow_usb_never">Nicht mehr anzeigen</string>
<string name="slow_usb_dismiss">Schließen</string>
<string name="steam_import_title">Steam neu starten, um deine Spiele hinzuzufügen?</string>
<string name="steam_import_body">Steam kann diese Spiele, die du besitzt, als installiert anzeigen: %1$s. Dafür muss Steam neu starten. Starte jetzt neu, oder sie werden beim nächsten Start von Steam hinzugefügt.</string>
<string name="steam_import_names_more">%1$s und %2$d weitere</string>
<string name="steam_import_now">Jetzt neu starten</string>
<string name="steam_import_later">Später</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Συντομεύσεις φυσικών κουμπιών</string>
<string name="shortcuts_dd_menu">Μενού DroidDeck</string>
<string name="shortcuts_capture">Αντιστοίχιση: %1$s</string>
<string name="shortcuts_press">Πατήστε και αφήστε ένα κουμπί. Η αντιστοίχιση αποθηκεύεται αυτόματα.</string>
<string name="shortcuts_release">Αφήστε το κουμπί για συνέχεια.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Αυτό το κουμπί έχει ήδη αντιστοιχιστεί σε: %1$s</string>
<string name="shortcuts_save">Επαναντιστοίχιση</string>
<string name="shortcuts_retry">Δοκιμή άλλου κουμπιού</string>
<string name="shortcuts_limitations">Το κουμπί Αρχική και ορισμένα επιπλέον κουμπιά ενδέχεται να μην είναι διαθέσιμα.</string>
</resources>
+5 -1
View File
@@ -1125,7 +1125,6 @@
<string name="games_never_played">Δεν έχει παιχτεί ποτέ</string>
<string name="games_runtime_busy_percent">Το runtime είναι απασχολημένο · %1$d%%</string>
<string name="games_runtime_busy">Το runtime είναι απασχολημένο</string>
<string name="games_runtime_first_play">Το runtime εγκαθίσταται στο πρώτο Play</string>
<string name="games_runtime_update">Υπάρχει ενημέρωση runtime</string>
<string name="games_runtime_ready">● Το runtime είναι έτοιμο</string>
<string name="games_internal">Εσωτερική αποθήκευση</string>
@@ -3211,4 +3210,9 @@
<string name="slow_usb_port">Η συσκευή %1$s συνδέεται μέσω %2$s (%3$s Mbps, περίπου %4$d MB/s). Η θύρα USB αυτής της συσκευής δεν υποστηρίζει μεγαλύτερη ταχύτητα, οπότε τα παιχνίδια θα φορτώνουν αργά. Ο εσωτερικός χώρος ή μια κάρτα microSD μπορεί να είναι ταχύτερα.</string>
<string name="slow_usb_never">Να μην εμφανιστεί ξανά</string>
<string name="slow_usb_dismiss">Κλείσιμο</string>
<string name="steam_import_title">Επανεκκίνηση του Steam για να προστεθούν τα παιχνίδια σας;</string>
<string name="steam_import_body">Το Steam μπορεί να εμφανίσει αυτά τα παιχνίδια που έχετε ως εγκατεστημένα: %1$s. Πρέπει να γίνει επανεκκίνηση για να εμφανιστούν. Κάντε επανεκκίνηση τώρα ή θα προστεθούν την επόμενη φορά που θα ξεκινήσει το Steam.</string>
<string name="steam_import_names_more">%1$s και %2$d ακόμη</string>
<string name="steam_import_now">Επανεκκίνηση τώρα</string>
<string name="steam_import_later">Αργότερα</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Atajos de botones físicos</string>
<string name="shortcuts_dd_menu">Menú de DroidDeck</string>
<string name="shortcuts_capture">Asignar: %1$s</string>
<string name="shortcuts_press">Pulsa y suelta un botón. La asignación se guarda automáticamente.</string>
<string name="shortcuts_release">Suelta el botón para continuar.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Este botón ya está asignado a: %1$s</string>
<string name="shortcuts_save">Reasignar</string>
<string name="shortcuts_retry">Probar otro botón</string>
<string name="shortcuts_limitations">El botón Inicio y algunos botones adicionales pueden no estar disponibles.</string>
</resources>
+5 -1
View File
@@ -1133,7 +1133,6 @@
<string name="games_never_played">Nunca jugado</string>
<string name="games_runtime_busy_percent">Runtime ocupado · %1$d%%</string>
<string name="games_runtime_busy">Runtime ocupado</string>
<string name="games_runtime_first_play">El runtime se instala al jugar</string>
<string name="games_runtime_update">Actualización del runtime disponible</string>
<string name="games_runtime_ready">● Runtime listo</string>
<string name="games_internal">Almacenamiento interno</string>
@@ -3248,4 +3247,9 @@
<string name="slow_usb_port">%1$s está conectado por %2$s (%3$s Mbps, unos %4$d MB/s). El puerto USB de este dispositivo no va más rápido, así que los juegos cargarán despacio. El almacenamiento interno o una microSD pueden ser más rápidos.</string>
<string name="slow_usb_never">No volver a mostrar</string>
<string name="slow_usb_dismiss">Descartar</string>
<string name="steam_import_title">¿Reiniciar Steam para añadir tus juegos?</string>
<string name="steam_import_body">Steam puede mostrar como instalados estos juegos que tienes: %1$s. Tiene que reiniciarse para mostrarlos. Reinicia ahora o se añadirán la próxima vez que se inicie Steam.</string>
<string name="steam_import_names_more">%1$s y %2$d más</string>
<string name="steam_import_now">Reiniciar ahora</string>
<string name="steam_import_later">Más tarde</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Fyysisten painikkeiden pikavalinnat</string>
<string name="shortcuts_dd_menu">DroidDeck-valikko</string>
<string name="shortcuts_capture">Määritä: %1$s</string>
<string name="shortcuts_press">Paina painiketta ja vapauta se. Määritys tallennetaan automaattisesti.</string>
<string name="shortcuts_release">Jatka vapauttamalla painike.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Tämä painike on jo määritetty toimintoon: %1$s</string>
<string name="shortcuts_save">Määritä uudelleen</string>
<string name="shortcuts_retry">Kokeile toista painiketta</string>
<string name="shortcuts_limitations">Koti-painike ja jotkin lisäpainikkeet eivät ehkä ole käytettävissä.</string>
</resources>
+5 -1
View File
@@ -1125,7 +1125,6 @@
<string name="games_never_played">Ei pelattu koskaan</string>
<string name="games_runtime_busy_percent">Ajoympäristö varattu · %1$d %%</string>
<string name="games_runtime_busy">Ajoympäristö varattu</string>
<string name="games_runtime_first_play">Ajoympäristö asentuu ensimmäisellä Pelaa-painalluksella</string>
<string name="games_runtime_update">Ajoympäristön päivitys saatavilla</string>
<string name="games_runtime_ready">● Ajoympäristö valmis</string>
<string name="games_internal">Sisäinen tallennustila</string>
@@ -3211,4 +3210,9 @@
<string name="slow_usb_port">%1$s on yhdistetty %2$s-yhteydellä (%3$s Mbps, noin %4$d Mt/s). Tämän laitteen USB-portti ei ole nopeampi, joten pelit latautuvat hitaasti. Sisäinen tallennustila tai microSD-kortti voi olla nopeampi.</string>
<string name="slow_usb_never">Älä näytä uudelleen</string>
<string name="slow_usb_dismiss">Sulje</string>
<string name="steam_import_title">Käynnistetäänkö Steam uudelleen pelien lisäämiseksi?</string>
<string name="steam_import_body">Steam voi näyttää nämä omistamasi pelit asennettuina: %1$s. Se täytyy käynnistää uudelleen, jotta ne näkyvät. Käynnistä uudelleen nyt, tai ne lisätään, kun Steam käynnistyy seuraavan kerran.</string>
<string name="steam_import_names_more">%1$s ja %2$d muuta</string>
<string name="steam_import_now">Käynnistä uudelleen nyt</string>
<string name="steam_import_later">Myöhemmin</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Raccourcis des boutons physiques</string>
<string name="shortcuts_dd_menu">Menu DroidDeck</string>
<string name="shortcuts_capture">Attribuer : %1$s</string>
<string name="shortcuts_press">Appuyez sur un bouton puis relâchez-le. L’affectation est enregistrée automatiquement.</string>
<string name="shortcuts_release">Relâchez le bouton pour continuer.</string>
<string name="shortcuts_detected">%1$s : %2$s</string>
<string name="shortcuts_conflict">Ce bouton est déjà attribué à : %1$s</string>
<string name="shortcuts_save">Réaffecter</string>
<string name="shortcuts_retry">Essayer un autre bouton</string>
<string name="shortcuts_limitations">Le bouton Accueil et certains boutons supplémentaires peuvent être indisponibles.</string>
</resources>
+5 -1
View File
@@ -1133,7 +1133,6 @@
<string name="games_never_played">Jamais lancé</string>
<string name="games_runtime_busy_percent">Environnement d\'exécution occupé · %1$d%%</string>
<string name="games_runtime_busy">Environnement d\'exécution occupé</string>
<string name="games_runtime_first_play">Installation de l\'environnement d\'exécution lors du premier lancement du jeu</string>
<string name="games_runtime_update">Mise à jour de l\'environnement d\'exécution disponible</string>
<string name="games_runtime_ready">● Environnement d\'exécution prêt</string>
<string name="games_internal">Stockage interne</string>
@@ -3248,4 +3247,9 @@
<string name="slow_usb_port">%1$s est connecté en %2$s (%3$s Mbit/s, environ %4$d Mo/s). Le port USB de cet appareil ne va pas plus vite, les jeux se chargeront donc lentement. Le stockage interne ou une carte microSD peut être plus rapide.</string>
<string name="slow_usb_never">Ne plus afficher</string>
<string name="slow_usb_dismiss">Fermer</string>
<string name="steam_import_title">Redémarrer Steam pour ajouter vos jeux ?</string>
<string name="steam_import_body">Steam peut afficher comme installés ces jeux que vous possédez : %1$s. Il doit redémarrer pour les afficher. Redémarrez maintenant, ou ils seront ajoutés au prochain démarrage de Steam.</string>
<string name="steam_import_names_more">%1$s et %2$d de plus</string>
<string name="steam_import_now">Redémarrer maintenant</string>
<string name="steam_import_later">Plus tard</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">भौतिक बटन शॉर्टकट</string>
<string name="shortcuts_dd_menu">DroidDeck मेनू</string>
<string name="shortcuts_capture">असाइन करें: %1$s</string>
<string name="shortcuts_press">कोई बटन दबाकर छोड़ें। असाइनमेंट अपने आप सहेजा जाता है।</string>
<string name="shortcuts_release">जारी रखने के लिए बटन छोड़ें।</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">यह बटन पहले से असाइन है: %1$s</string>
<string name="shortcuts_save">फिर से असाइन करें</string>
<string name="shortcuts_retry">दूसरा बटन आज़माएँ</string>
<string name="shortcuts_limitations">होम और कुछ अतिरिक्त बटन उपलब्ध नहीं हो सकते हैं।</string>
</resources>
+5 -1
View File
@@ -1125,7 +1125,6 @@
<string name="games_never_played">कभी नहीं खेला</string>
<string name="games_runtime_busy_percent">रनटाइम व्यस्त · %1$d%%</string>
<string name="games_runtime_busy">रनटाइम व्यस्त</string>
<string name="games_runtime_first_play">पहली बार Play पर रनटाइम इंस्टॉल होता है</string>
<string name="games_runtime_update">रनटाइम अपडेट उपलब्ध</string>
<string name="games_runtime_ready">● रनटाइम तैयार</string>
<string name="games_internal">इंटरनल स्टोरेज</string>
@@ -3211,4 +3210,9 @@
<string name="slow_usb_port">%1$s %2$s (%3$s Mbps, लगभग %4$d MB/s) से जुड़ा है। इस डिवाइस का USB पोर्ट इससे तेज़ नहीं चलता, इसलिए गेम धीरे लोड होंगे। आंतरिक स्टोरेज या microSD कार्ड तेज़ हो सकता है।</string>
<string name="slow_usb_never">फिर से न दिखाएँ</string>
<string name="slow_usb_dismiss">बंद करें</string>
<string name="steam_import_title">अपने गेम जोड़ने के लिए Steam फिर से शुरू करें?</string>
<string name="steam_import_body">Steam आपके इन गेम को इंस्टॉल के रूप में दिखा सकता है: %1$s. इन्हें दिखाने के लिए इसे फिर से शुरू करना होगा। अभी फिर से शुरू करें, या ये अगली बार Steam शुरू होने पर जुड़ जाएंगे।</string>
<string name="steam_import_names_more">%1$s और %2$d और</string>
<string name="steam_import_now">अभी फिर से शुरू करें</string>
<string name="steam_import_later">बाद में</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Fizikai gombok parancsikonjai</string>
<string name="shortcuts_dd_menu">DroidDeck-menü</string>
<string name="shortcuts_capture">Hozzárendelés: %1$s</string>
<string name="shortcuts_press">Nyomj meg és engedj fel egy gombot. A hozzárendelés automatikusan mentődik.</string>
<string name="shortcuts_release">A folytatáshoz engedje fel a gombot.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Ez a gomb már ehhez van rendelve: %1$s</string>
<string name="shortcuts_save">Új hozzárendelés</string>
<string name="shortcuts_retry">Másik gomb kipróbálása</string>
<string name="shortcuts_limitations">A Kezdőlap és egyes extra gombok nem feltétlenül érhetők el.</string>
</resources>
+5 -1
View File
@@ -1125,7 +1125,6 @@
<string name="games_never_played">Még nem játszott</string>
<string name="games_runtime_busy_percent">Futtatókörnyezet dolgozik · %1$d%%</string>
<string name="games_runtime_busy">Futtatókörnyezet dolgozik</string>
<string name="games_runtime_first_play">A futtatókörnyezet az első Játék gombnyomáskor települ</string>
<string name="games_runtime_update">Elérhető futtatókörnyezet-frissítés</string>
<string name="games_runtime_ready">● A futtatókörnyezet kész</string>
<string name="games_internal">Belső tárhely</string>
@@ -3211,4 +3210,9 @@
<string name="slow_usb_port">A(z) %1$s %2$s kapcsolaton csatlakozik (%3$s Mbps, kb. %4$d MB/s). Az eszköz USB-portja nem tud gyorsabb lenni, ezért a játékok lassan töltődnek be. A belső tárhely vagy egy microSD-kártya gyorsabb lehet.</string>
<string name="slow_usb_never">Ne jelenjen meg többé</string>
<string name="slow_usb_dismiss">Bezárás</string>
<string name="steam_import_title">Újraindítod a Steamet a játékaid hozzáadásához?</string>
<string name="steam_import_body">A Steam telepítettként mutathatja ezeket a saját játékaidat: %1$s. Ehhez újra kell indulnia. Indítsd újra most, vagy a Steam következő indításakor kerülnek be.</string>
<string name="steam_import_names_more">%1$s és még %2$d</string>
<string name="steam_import_now">Újraindítás most</string>
<string name="steam_import_later">Később</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Pintasan tombol fisik</string>
<string name="shortcuts_dd_menu">Menu DroidDeck</string>
<string name="shortcuts_capture">Tetapkan: %1$s</string>
<string name="shortcuts_press">Tekan lalu lepaskan tombol. Penetapan disimpan otomatis.</string>
<string name="shortcuts_release">Lepaskan tombol untuk melanjutkan.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Tombol ini sudah ditetapkan untuk: %1$s</string>
<string name="shortcuts_save">Tetapkan ulang</string>
<string name="shortcuts_retry">Coba tombol lain</string>
<string name="shortcuts_limitations">Tombol Beranda dan beberapa tombol tambahan mungkin tidak tersedia.</string>
</resources>
+5 -1
View File
@@ -1119,7 +1119,6 @@
<string name="games_never_played">Belum pernah dimainkan</string>
<string name="games_runtime_busy_percent">Runtime sibuk · %1$d%%</string>
<string name="games_runtime_busy">Runtime sibuk</string>
<string name="games_runtime_first_play">Runtime terinstal saat Main pertama kali</string>
<string name="games_runtime_update">Pembaruan runtime tersedia</string>
<string name="games_runtime_ready">● Runtime siap</string>
<string name="games_internal">Penyimpanan internal</string>
@@ -3200,4 +3199,9 @@
<string name="slow_usb_port">%1$s terhubung melalui %2$s (%3$s Mbps, sekitar %4$d MB/s). Port USB perangkat ini tidak bisa lebih cepat, jadi game akan dimuat lambat. Penyimpanan internal atau kartu microSD mungkin lebih cepat.</string>
<string name="slow_usb_never">Jangan tampilkan lagi</string>
<string name="slow_usb_dismiss">Tutup</string>
<string name="steam_import_title">Mulai ulang Steam untuk menambahkan game Anda?</string>
<string name="steam_import_body">Steam dapat menampilkan game milik Anda ini sebagai terpasang: %1$s. Steam harus dimulai ulang untuk menampilkannya. Mulai ulang sekarang, atau game akan ditambahkan saat Steam dimulai berikutnya.</string>
<string name="steam_import_names_more">%1$s dan %2$d lainnya</string>
<string name="steam_import_now">Mulai ulang sekarang</string>
<string name="steam_import_later">Nanti</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Scorciatoie dei pulsanti fisici</string>
<string name="shortcuts_dd_menu">Menu DroidDeck</string>
<string name="shortcuts_capture">Assegna: %1$s</string>
<string name="shortcuts_press">Premi e rilascia un pulsante. L’assegnazione viene salvata automaticamente.</string>
<string name="shortcuts_release">Rilascia il pulsante per continuare.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Questo pulsante è già assegnato a: %1$s</string>
<string name="shortcuts_save">Riassegna</string>
<string name="shortcuts_retry">Prova un altro pulsante</string>
<string name="shortcuts_limitations">Il pulsante Home e alcuni pulsanti aggiuntivi potrebbero non essere disponibili.</string>
</resources>
+5 -1
View File
@@ -1123,7 +1123,6 @@
<string name="games_never_played">Mai giocato</string>
<string name="games_runtime_busy_percent">Runtime occupato · %1$d%%</string>
<string name="games_runtime_busy">Runtime occupato</string>
<string name="games_runtime_first_play">Il runtime si installa al primo Gioca</string>
<string name="games_runtime_update">Aggiornamento del runtime disponibile</string>
<string name="games_runtime_ready">● Runtime pronto</string>
<string name="games_internal">Memoria interna</string>
@@ -3246,4 +3245,9 @@
<string name="slow_usb_port">%1$s è collegato tramite %2$s (%3$s Mbps, circa %4$d MB/s). La porta USB di questo dispositivo non va più veloce, quindi i giochi si caricheranno lentamente. La memoria interna o una microSD potrebbero essere più veloci.</string>
<string name="slow_usb_never">Non mostrare più</string>
<string name="slow_usb_dismiss">Chiudi</string>
<string name="steam_import_title">Riavviare Steam per aggiungere i tuoi giochi?</string>
<string name="steam_import_body">Steam può mostrare come installati questi giochi che possiedi: %1$s. Deve riavviarsi per mostrarli. Riavvia ora, oppure verranno aggiunti al prossimo avvio di Steam.</string>
<string name="steam_import_names_more">%1$s e altri %2$d</string>
<string name="steam_import_now">Riavvia ora</string>
<string name="steam_import_later">Più tardi</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">物理ボタンのショートカット</string>
<string name="shortcuts_dd_menu">DroidDeck メニュー</string>
<string name="shortcuts_capture">割り当て:%1$s</string>
<string name="shortcuts_press">ボタンを押して離してください。割り当ては自動的に保存されます。</string>
<string name="shortcuts_release">ボタンを離して続行してください。</string>
<string name="shortcuts_detected">%1$s:%2$s</string>
<string name="shortcuts_conflict">このボタンはすでに次の操作に割り当てられています:%1$s</string>
<string name="shortcuts_save">再割り当て</string>
<string name="shortcuts_retry">別のボタンを試す</string>
<string name="shortcuts_limitations">ホームボタンや一部の追加ボタンは使用できない場合があります。</string>
</resources>
+5 -1
View File
@@ -1121,7 +1121,6 @@
<string name="games_never_played">未プレイ</string>
<string name="games_runtime_busy_percent">実行環境は使用中 · %1$d%%</string>
<string name="games_runtime_busy">実行環境は使用中</string>
<string name="games_runtime_first_play">初回実行時に実行環境を導入</string>
<string name="games_runtime_update">実行環境にアップデートがあります</string>
<string name="games_runtime_ready">● 実行環境の準備完了</string>
<string name="games_internal">内部ストレージ</string>
@@ -3187,4 +3186,9 @@
<string name="slow_usb_port">%1$s は %2$s(%3$s Mbps、約 %4$d MB/s)で接続されています。この端末の USB ポートはこれ以上速くならないため、ゲームの読み込みが遅くなります。内部ストレージや microSD カードの方が速い場合があります。</string>
<string name="slow_usb_never">今後表示しない</string>
<string name="slow_usb_dismiss">閉じる</string>
<string name="steam_import_title">ゲームを追加するために Steam を再起動しますか?</string>
<string name="steam_import_body">所有している次のゲームを Steam でインストール済みとして表示できます: %1$s。表示するには Steam の再起動が必要です。今すぐ再起動するか、次に Steam を起動したときに追加されます。</string>
<string name="steam_import_names_more">%1$s ほか %2$d 件</string>
<string name="steam_import_now">今すぐ再起動</string>
<string name="steam_import_later">後で</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">물리 버튼 바로가기</string>
<string name="shortcuts_dd_menu">DroidDeck 메뉴</string>
<string name="shortcuts_capture">지정: %1$s</string>
<string name="shortcuts_press">버튼을 눌렀다 놓으세요. 할당은 자동으로 저장됩니다.</string>
<string name="shortcuts_release">계속하려면 버튼을 놓으세요.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">이 버튼은 이미 다음 동작에 지정되어 있습니다: %1$s</string>
<string name="shortcuts_save">다시 할당</string>
<string name="shortcuts_retry">다른 버튼 시도</string>
<string name="shortcuts_limitations">홈 버튼과 일부 추가 버튼은 사용할 수 없을 수 있습니다.</string>
</resources>
+5 -1
View File
@@ -1121,7 +1121,6 @@
<string name="games_never_played">플레이한 적 없음</string>
<string name="games_runtime_busy_percent">런타임 사용 중 · %1$d%%</string>
<string name="games_runtime_busy">런타임 사용 중</string>
<string name="games_runtime_first_play">처음 \"Steam 실행\" 시 런타임 설치</string>
<string name="games_runtime_update">런타임 업데이트 있음</string>
<string name="games_runtime_ready">● 런타임 준비됨</string>
<string name="games_internal">내부 저장 공간</string>
@@ -3187,4 +3186,9 @@
<string name="slow_usb_port">%1$s이(가) %2$s(%3$s Mbps, 약 %4$d MB/s)로 연결되어 있습니다. 이 기기의 USB 포트는 더 빠르게 동작하지 않아 게임 로딩이 느립니다. 내부 저장소나 microSD 카드가 더 빠를 수 있습니다.</string>
<string name="slow_usb_never">다시 표시 안 함</string>
<string name="slow_usb_dismiss">닫기</string>
<string name="steam_import_title">게임을 추가하려면 Steam을 다시 시작할까요?</string>
<string name="steam_import_body">보유한 다음 게임을 Steam에서 설치됨으로 표시할 수 있습니다: %1$s. 표시하려면 Steam을 다시 시작해야 합니다. 지금 다시 시작하거나, 다음에 Steam을 시작할 때 추가됩니다.</string>
<string name="steam_import_names_more">%1$s 외 %2$d개</string>
<string name="steam_import_now">지금 다시 시작</string>
<string name="steam_import_later">나중에</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Pintasan butang fizikal</string>
<string name="shortcuts_dd_menu">Menu DroidDeck</string>
<string name="shortcuts_capture">Tetapkan: %1$s</string>
<string name="shortcuts_press">Tekan dan lepaskan butang. Penetapan disimpan secara automatik.</string>
<string name="shortcuts_release">Lepaskan butang untuk meneruskan.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Butang ini sudah ditetapkan kepada: %1$s</string>
<string name="shortcuts_save">Tukar penetapan</string>
<string name="shortcuts_retry">Cuba butang lain</string>
<string name="shortcuts_limitations">Butang Utama dan sesetengah butang tambahan mungkin tidak tersedia.</string>
</resources>
+5 -1
View File
@@ -1119,7 +1119,6 @@
<string name="games_never_played">Belum pernah dimainkan</string>
<string name="games_runtime_busy_percent">Masa jalan sibuk · %1$d%%</string>
<string name="games_runtime_busy">Masa jalan sibuk</string>
<string name="games_runtime_first_play">Masa jalan dipasang pada Main pertama</string>
<string name="games_runtime_update">Kemas kini masa jalan tersedia</string>
<string name="games_runtime_ready">● Masa jalan sedia</string>
<string name="games_internal">Storan dalaman</string>
@@ -3185,4 +3184,9 @@
<string name="slow_usb_port">%1$s disambungkan melalui %2$s (%3$s Mbps, kira-kira %4$d MB/s). Port USB peranti ini tidak boleh lebih pantas, jadi permainan akan dimuatkan perlahan. Storan dalaman atau kad microSD mungkin lebih pantas.</string>
<string name="slow_usb_never">Jangan tunjukkan lagi</string>
<string name="slow_usb_dismiss">Tutup</string>
<string name="steam_import_title">Mulakan semula Steam untuk menambah permainan anda?</string>
<string name="steam_import_body">Steam boleh menyenaraikan permainan milik anda ini sebagai dipasang: %1$s. Steam perlu dimulakan semula untuk menunjukkannya. Mulakan semula sekarang, atau ia akan ditambah apabila Steam dimulakan seterusnya.</string>
<string name="steam_import_names_more">%1$s dan %2$d lagi</string>
<string name="steam_import_now">Mulakan semula sekarang</string>
<string name="steam_import_later">Kemudian</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Snarveier for fysiske knapper</string>
<string name="shortcuts_dd_menu">DroidDeck-meny</string>
<string name="shortcuts_capture">Tilordne: %1$s</string>
<string name="shortcuts_press">Trykk på en knapp og slipp den. Tilordningen lagres automatisk.</string>
<string name="shortcuts_release">Slipp knappen for å fortsette.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Denne knappen er allerede tilordnet: %1$s</string>
<string name="shortcuts_save">Tilordne på nytt</string>
<string name="shortcuts_retry">Prøv en annen knapp</string>
<string name="shortcuts_limitations">Hjem-knappen og enkelte ekstraknapper er kanskje ikke tilgjengelige.</string>
</resources>
+5 -1
View File
@@ -1125,7 +1125,6 @@
<string name="games_never_played">Aldri spilt</string>
<string name="games_runtime_busy_percent">Kjøretid opptatt · %1$d%%</string>
<string name="games_runtime_busy">Kjøretid opptatt</string>
<string name="games_runtime_first_play">Kjøretiden installeres ved første Spill</string>
<string name="games_runtime_update">Kjøretidsoppdatering tilgjengelig</string>
<string name="games_runtime_ready">● Kjøretid klar</string>
<string name="games_internal">Intern lagring</string>
@@ -3211,4 +3210,9 @@
<string name="slow_usb_port">%1$s er koblet til via %2$s (%3$s Mbps, ca. %4$d MB/s). USB-porten på denne enheten kan ikke gå raskere, så spill lastes inn tregt. Intern lagring eller et microSD-kort kan være raskere.</string>
<string name="slow_usb_never">Ikke vis igjen</string>
<string name="slow_usb_dismiss">Lukk</string>
<string name="steam_import_title">Starte Steam på nytt for å legge til spillene dine?</string>
<string name="steam_import_body">Steam kan vise disse spillene du eier som installert: %1$s. Steam må startes på nytt for å vise dem. Start på nytt nå, eller så legges de til neste gang Steam starter.</string>
<string name="steam_import_names_more">%1$s og %2$d til</string>
<string name="steam_import_now">Start på nytt nå</string>
<string name="steam_import_later">Senere</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Snelkoppelingen voor fysieke knoppen</string>
<string name="shortcuts_dd_menu">DroidDeck-menu</string>
<string name="shortcuts_capture">Toewijzen: %1$s</string>
<string name="shortcuts_press">Druk op een knop en laat deze los. De toewijzing wordt automatisch opgeslagen.</string>
<string name="shortcuts_release">Laat de knop los om door te gaan.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Deze knop is al toegewezen aan: %1$s</string>
<string name="shortcuts_save">Opnieuw toewijzen</string>
<string name="shortcuts_retry">Andere knop proberen</string>
<string name="shortcuts_limitations">De Home-knop en sommige extra knoppen zijn mogelijk niet beschikbaar.</string>
</resources>
+5 -1
View File
@@ -1125,7 +1125,6 @@
<string name="games_never_played">Nooit gespeeld</string>
<string name="games_runtime_busy_percent">Runtime bezig · %1$d%%</string>
<string name="games_runtime_busy">Runtime bezig</string>
<string name="games_runtime_first_play">Runtime wordt geïnstalleerd bij de eerste keer Spelen</string>
<string name="games_runtime_update">Runtime-update beschikbaar</string>
<string name="games_runtime_ready">● Runtime gereed</string>
<string name="games_internal">Interne opslag</string>
@@ -3211,4 +3210,9 @@
<string name="slow_usb_port">%1$s is verbonden via %2$s (%3$s Mbps, ongeveer %4$d MB/s). De USB-poort van dit apparaat kan niet sneller, dus games laden traag. Interne opslag of een microSD-kaart kan sneller zijn.</string>
<string name="slow_usb_never">Niet meer tonen</string>
<string name="slow_usb_dismiss">Sluiten</string>
<string name="steam_import_title">Steam opnieuw starten om je games toe te voegen?</string>
<string name="steam_import_body">Steam kan deze games die je bezit als geïnstalleerd tonen: %1$s. Steam moet opnieuw starten om ze te tonen. Start nu opnieuw, of ze worden toegevoegd de volgende keer dat Steam start.</string>
<string name="steam_import_names_more">%1$s en nog %2$d</string>
<string name="steam_import_now">Nu opnieuw starten</string>
<string name="steam_import_later">Later</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Skróty przycisków fizycznych</string>
<string name="shortcuts_dd_menu">Menu DroidDeck</string>
<string name="shortcuts_capture">Przypisz: %1$s</string>
<string name="shortcuts_press">Naciśnij i zwolnij przycisk. Przypisanie zostanie zapisane automatycznie.</string>
<string name="shortcuts_release">Zwolnij przycisk, aby kontynuować.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Ten przycisk jest już przypisany do: %1$s</string>
<string name="shortcuts_save">Przypisz ponownie</string>
<string name="shortcuts_retry">Wypróbuj inny przycisk</string>
<string name="shortcuts_limitations">Przycisk Home i niektóre dodatkowe przyciski mogą być niedostępne.</string>
</resources>
+5 -1
View File
@@ -1137,7 +1137,6 @@
<string name="games_never_played">Nigdy nie grano</string>
<string name="games_runtime_busy_percent">Środowisko zajęte · %1$d%%</string>
<string name="games_runtime_busy">Środowisko zajęte</string>
<string name="games_runtime_first_play">Środowisko instaluje się przy pierwszym uruchomieniu</string>
<string name="games_runtime_update">Dostępna aktualizacja środowiska</string>
<string name="games_runtime_ready">● Środowisko gotowe</string>
<string name="games_internal">Pamięć wewnętrzna</string>
@@ -3284,4 +3283,9 @@
<string name="slow_usb_port">%1$s jest podłączony przez %2$s (%3$s Mb/s, około %4$d MB/s). Port USB tego urządzenia nie działa szybciej, więc gry będą wczytywać się wolno. Pamięć wewnętrzna lub karta microSD mogą być szybsze.</string>
<string name="slow_usb_never">Nie pokazuj ponownie</string>
<string name="slow_usb_dismiss">Zamknij</string>
<string name="steam_import_title">Uruchomić ponownie Steam, aby dodać Twoje gry?</string>
<string name="steam_import_body">Steam może pokazać te posiadane gry jako zainstalowane: %1$s. Aby je pokazać, musi się uruchomić ponownie. Uruchom ponownie teraz albo zostaną dodane przy następnym uruchomieniu Steam.</string>
<string name="steam_import_names_more">%1$s i %2$d więcej</string>
<string name="steam_import_now">Uruchom ponownie teraz</string>
<string name="steam_import_later">Później</string>
</resources>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Atalhos de botões físicos</string>
<string name="shortcuts_dd_menu">Menu do DroidDeck</string>
<string name="shortcuts_capture">Atribuir: %1$s</string>
<string name="shortcuts_press">Prima e solte um botão. A atribuição é guardada automaticamente.</string>
<string name="shortcuts_release">Solte o botão para continuar.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Este botão já está atribuído a: %1$s</string>
<string name="shortcuts_save">Reatribuir</string>
<string name="shortcuts_retry">Experimentar outro botão</string>
<string name="shortcuts_limitations">O botão Início e alguns botões adicionais podem não estar disponíveis.</string>
</resources>
+5 -1
View File
@@ -1123,7 +1123,6 @@
<string name="games_never_played">Nunca jogado</string>
<string name="games_runtime_busy_percent">Ambiente de execução ocupado · %1$d%%</string>
<string name="games_runtime_busy">Ambiente de execução ocupado</string>
<string name="games_runtime_first_play">O ambiente de execução é instalado ao tocar em Jogar pela primeira vez</string>
<string name="games_runtime_update">Atualização do ambiente de execução disponível</string>
<string name="games_runtime_ready">● Ambiente de execução pronto</string>
<string name="games_internal">Armazenamento interno</string>
@@ -3246,4 +3245,9 @@
<string name="slow_usb_port">%1$s está ligado por %2$s (%3$s Mbps, cerca de %4$d MB/s). A porta USB deste dispositivo não é mais rápida, por isso os jogos vão carregar devagar. O armazenamento interno ou um cartão microSD pode ser mais rápido.</string>
<string name="slow_usb_never">Não voltar a mostrar</string>
<string name="slow_usb_dismiss">Ignorar</string>
<string name="steam_import_title">Reiniciar o Steam para adicionar os seus jogos?</string>
<string name="steam_import_body">O Steam pode mostrar estes jogos que tem como instalados: %1$s. Tem de reiniciar para os mostrar. Reinicie agora ou serão adicionados da próxima vez que o Steam iniciar.</string>
<string name="steam_import_names_more">%1$s e mais %2$d</string>
<string name="steam_import_now">Reiniciar agora</string>
<string name="steam_import_later">Mais tarde</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Atalhos de botões físicos</string>
<string name="shortcuts_dd_menu">Menu do DroidDeck</string>
<string name="shortcuts_capture">Atribuir: %1$s</string>
<string name="shortcuts_press">Pressione e solte um botão. A atribuição é salva automaticamente.</string>
<string name="shortcuts_release">Solte o botão para continuar.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Este botão já está atribuído a: %1$s</string>
<string name="shortcuts_save">Reatribuir</string>
<string name="shortcuts_retry">Testar outro botão</string>
<string name="shortcuts_limitations">O botão Início e alguns botões extras podem não estar disponíveis.</string>
</resources>
+5 -1
View File
@@ -1123,7 +1123,6 @@
<string name="games_never_played">Nunca jogado</string>
<string name="games_runtime_busy_percent">Runtime ocupado · %1$d%%</string>
<string name="games_runtime_busy">Runtime ocupado</string>
<string name="games_runtime_first_play">O runtime é instalado no primeiro Jogar</string>
<string name="games_runtime_update">Atualização do runtime disponível</string>
<string name="games_runtime_ready">● Runtime pronto</string>
<string name="games_internal">Armazenamento interno</string>
@@ -3246,4 +3245,9 @@
<string name="slow_usb_port">%1$s está conectado por %2$s (%3$s Mbps, cerca de %4$d MB/s). A porta USB deste aparelho não fica mais rápida, então os jogos vão carregar devagar. O armazenamento interno ou um cartão microSD pode ser mais rápido.</string>
<string name="slow_usb_never">Não mostrar novamente</string>
<string name="slow_usb_dismiss">Dispensar</string>
<string name="steam_import_title">Reiniciar a Steam para adicionar seus jogos?</string>
<string name="steam_import_body">A Steam pode mostrar estes jogos que você tem como instalados: %1$s. Ela precisa reiniciar para mostrá-los. Reinicie agora ou eles serão adicionados na próxima vez que a Steam iniciar.</string>
<string name="steam_import_names_more">%1$s e mais %2$d</string>
<string name="steam_import_now">Reiniciar agora</string>
<string name="steam_import_later">Mais tarde</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Scurtături pentru butoane fizice</string>
<string name="shortcuts_dd_menu">Meniul DroidDeck</string>
<string name="shortcuts_capture">Atribuie: %1$s</string>
<string name="shortcuts_press">Apasă și eliberează un buton. Atribuirea se salvează automat.</string>
<string name="shortcuts_release">Eliberează butonul pentru a continua.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Acest buton este deja atribuit pentru: %1$s</string>
<string name="shortcuts_save">Reatribuie</string>
<string name="shortcuts_retry">Încearcă alt buton</string>
<string name="shortcuts_limitations">Butonul Acasă și unele butoane suplimentare pot fi indisponibile.</string>
</resources>
+5 -1
View File
@@ -1131,7 +1131,6 @@
<string name="games_never_played">Niciodată jucat</string>
<string name="games_runtime_busy_percent">Mediu de execuție ocupat · %1$d%%</string>
<string name="games_runtime_busy">Mediu de execuție ocupat</string>
<string name="games_runtime_first_play">Mediul de execuție se instalează la prima apăsare pe Play</string>
<string name="games_runtime_update">Actualizare disponibilă pentru mediul de execuție</string>
<string name="games_runtime_ready">● Mediu de execuție pregătit</string>
<string name="games_internal">Stocare internă</string>
@@ -3246,4 +3245,9 @@
<string name="slow_usb_port">%1$s este conectat prin %2$s (%3$s Mbps, aproximativ %4$d MB/s). Portul USB al acestui dispozitiv nu poate merge mai repede, așa că jocurile se vor încărca lent. Memoria internă sau un card microSD pot fi mai rapide.</string>
<string name="slow_usb_never">Nu mai afișa</string>
<string name="slow_usb_dismiss">Închide</string>
<string name="steam_import_title">Repornești Steam pentru a adăuga jocurile tale?</string>
<string name="steam_import_body">Steam poate afișa ca instalate aceste jocuri pe care le deții: %1$s. Trebuie să repornească pentru a le afișa. Repornește acum sau vor fi adăugate la următoarea pornire a Steam.</string>
<string name="steam_import_names_more">%1$s și încă %2$d</string>
<string name="steam_import_now">Repornește acum</string>
<string name="steam_import_later">Mai târziu</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Действия физических кнопок</string>
<string name="shortcuts_dd_menu">Меню DroidDeck</string>
<string name="shortcuts_capture">Назначить: %1$s</string>
<string name="shortcuts_press">Нажмите и отпустите кнопку. Назначение сохранится автоматически.</string>
<string name="shortcuts_release">Отпустите кнопку, чтобы продолжить.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Эта кнопка уже назначена для: %1$s</string>
<string name="shortcuts_save">Переназначить</string>
<string name="shortcuts_retry">Попробовать другую кнопку</string>
<string name="shortcuts_limitations">Кнопка «Домой» и некоторые дополнительные кнопки могут быть недоступны.</string>
</resources>
+5 -1
View File
@@ -1139,7 +1139,6 @@
<string name="games_never_played">Никогда не запускалась</string>
<string name="games_runtime_busy_percent">Среда выполнения занята · %1$d%%</string>
<string name="games_runtime_busy">Среда выполнения занята</string>
<string name="games_runtime_first_play">Среда выполнения установится при первом запуске игры</string>
<string name="games_runtime_update">Доступно обновление среды выполнения</string>
<string name="games_runtime_ready">● Среда выполнения готова</string>
<string name="games_internal">Внутреннее хранилище</string>
@@ -3283,4 +3282,9 @@
<string name="slow_usb_port">%1$s подключён через %2$s (%3$s Мбит/с, около %4$d МБ/с). USB-порт этого устройства не работает быстрее, поэтому игры будут загружаться медленно. Внутренняя память или карта microSD могут быть быстрее.</string>
<string name="slow_usb_never">Больше не показывать</string>
<string name="slow_usb_dismiss">Закрыть</string>
<string name="steam_import_title">Перезапустить Steam, чтобы добавить ваши игры?</string>
<string name="steam_import_body">Steam может показать эти ваши игры как установленные: %1$s. Для этого его нужно перезапустить. Перезапустите сейчас, или они будут добавлены при следующем запуске Steam.</string>
<string name="steam_import_names_more">%1$s и ещё %2$d</string>
<string name="steam_import_now">Перезапустить сейчас</string>
<string name="steam_import_later">Позже</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Genvägar för fysiska knappar</string>
<string name="shortcuts_dd_menu">DroidDeck-meny</string>
<string name="shortcuts_capture">Tilldela: %1$s</string>
<string name="shortcuts_press">Tryck på en knapp och släpp den. Tilldelningen sparas automatiskt.</string>
<string name="shortcuts_release">Släpp knappen för att fortsätta.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Den här knappen är redan tilldelad: %1$s</string>
<string name="shortcuts_save">Tilldela igen</string>
<string name="shortcuts_retry">Prova en annan knapp</string>
<string name="shortcuts_limitations">Hemknappen och vissa extraknappar kanske inte är tillgängliga.</string>
</resources>
+5 -1
View File
@@ -1125,7 +1125,6 @@
<string name="games_never_played">Aldrig spelat</string>
<string name="games_runtime_busy_percent">Körmiljö upptagen · %1$d %%</string>
<string name="games_runtime_busy">Körmiljö upptagen</string>
<string name="games_runtime_first_play">Körmiljön installeras första gången du trycker på Play</string>
<string name="games_runtime_update">Uppdatering av körmiljön tillgänglig</string>
<string name="games_runtime_ready">● Körmiljö redo</string>
<string name="games_internal">Internt lagringsutrymme</string>
@@ -3211,4 +3210,9 @@
<string name="slow_usb_port">%1$s är ansluten via %2$s (%3$s Mbit/s, cirka %4$d MB/s). USB-porten på den här enheten kan inte gå snabbare, så spel läses in långsamt. Internt lagringsutrymme eller ett microSD-kort kan vara snabbare.</string>
<string name="slow_usb_never">Visa inte igen</string>
<string name="slow_usb_dismiss">Stäng</string>
<string name="steam_import_title">Starta om Steam för att lägga till dina spel?</string>
<string name="steam_import_body">Steam kan visa de här spelen du äger som installerade: %1$s. Steam måste startas om för att visa dem. Starta om nu, annars läggs de till nästa gång Steam startar.</string>
<string name="steam_import_names_more">%1$s och %2$d till</string>
<string name="steam_import_now">Starta om nu</string>
<string name="steam_import_later">Senare</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">ทางลัดปุ่มจริง</string>
<string name="shortcuts_dd_menu">เมนู DroidDeck</string>
<string name="shortcuts_capture">กำหนด: %1$s</string>
<string name="shortcuts_press">กดปุ่มแล้วปล่อย การกำหนดปุ่มจะบันทึกโดยอัตโนมัติ</string>
<string name="shortcuts_release">ปล่อยปุ่มเพื่อดำเนินการต่อ</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">ปุ่มนี้ถูกกำหนดไว้แล้วสำหรับ: %1$s</string>
<string name="shortcuts_save">กำหนดใหม่</string>
<string name="shortcuts_retry">ลองปุ่มอื่น</string>
<string name="shortcuts_limitations">ปุ่มโฮมและปุ่มพิเศษบางปุ่มอาจไม่พร้อมใช้งาน</string>
</resources>
+5 -1
View File
@@ -1119,7 +1119,6 @@
<string name="games_never_played">ยังไม่เคยเล่น</string>
<string name="games_runtime_busy_percent">รันไทม์กำลังทำงาน · %1$d%%</string>
<string name="games_runtime_busy">รันไทม์กำลังทำงาน</string>
<string name="games_runtime_first_play">รันไทม์จะติดตั้งเมื่อกด Play ครั้งแรก</string>
<string name="games_runtime_update">มีอัปเดตรันไทม์</string>
<string name="games_runtime_ready">● รันไทม์พร้อมใช้งาน</string>
<string name="games_internal">พื้นที่จัดเก็บภายใน</string>
@@ -3185,4 +3184,9 @@
<string name="slow_usb_port">%1$s เชื่อมต่อผ่าน %2$s (%3$s Mbps ประมาณ %4$d MB/s) พอร์ต USB ของอุปกรณ์นี้เร็วกว่านี้ไม่ได้ เกมจึงโหลดช้า ที่เก็บข้อมูลภายในหรือการ์ด microSD อาจเร็วกว่า</string>
<string name="slow_usb_never">ไม่ต้องแสดงอีก</string>
<string name="slow_usb_dismiss">ปิด</string>
<string name="steam_import_title">รีสตาร์ต Steam เพื่อเพิ่มเกมของคุณหรือไม่</string>
<string name="steam_import_body">Steam แสดงเกมที่คุณเป็นเจ้าของเหล่านี้ว่าติดตั้งแล้วได้: %1$s ต้องรีสตาร์ตเพื่อให้แสดง รีสตาร์ตเลย หรือเกมจะถูกเพิ่มเมื่อ Steam เริ่มครั้งถัดไป</string>
<string name="steam_import_names_more">%1$s และอีก %2$d เกม</string>
<string name="steam_import_now">รีสตาร์ตเลย</string>
<string name="steam_import_later">ภายหลัง</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Fiziksel düğme kısayolları</string>
<string name="shortcuts_dd_menu">DroidDeck menüsü</string>
<string name="shortcuts_capture">Ata: %1$s</string>
<string name="shortcuts_press">Bir düğmeye basıp bırakın. Atama otomatik olarak kaydedilir.</string>
<string name="shortcuts_release">Devam etmek için düğmeyi bırakın.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Bu düğme zaten şuna atanmış: %1$s</string>
<string name="shortcuts_save">Yeniden ata</string>
<string name="shortcuts_retry">Başka düğme dene</string>
<string name="shortcuts_limitations">Ana ekran düğmesi ve bazı ek düğmeler kullanılamayabilir.</string>
</resources>
+5 -1
View File
@@ -1117,7 +1117,6 @@
<string name="games_never_played">Hiç oynanmadı</string>
<string name="games_runtime_busy_percent">Çalışma ortamı meşgul · %1$d%%</string>
<string name="games_runtime_busy">Çalışma ortamı meşgul</string>
<string name="games_runtime_first_play">Çalışma ortamı ilk Oyna\'da yüklenir</string>
<string name="games_runtime_update">Çalışma ortamı güncellemesi var</string>
<string name="games_runtime_ready">● Çalışma ortamı hazır</string>
<string name="games_internal">Dahili depolama</string>
@@ -3213,4 +3212,9 @@
<string name="slow_usb_port">%1$s, %2$s üzerinden bağlı (%3$s Mbps, yaklaşık %4$d MB/sn). Bu cihazın USB bağlantı noktası daha hızlı çalışamıyor, bu yüzden oyunlar yavaş yüklenecek. Dahili depolama veya bir microSD kart daha hızlı olabilir.</string>
<string name="slow_usb_never">Bir daha gösterme</string>
<string name="slow_usb_dismiss">Kapat</string>
<string name="steam_import_title">Oyunlarınızı eklemek için Steam yeniden başlatılsın mı?</string>
<string name="steam_import_body">Steam sahip olduğunuz bu oyunları yüklü olarak gösterebilir: %1$s. Bunları göstermek için yeniden başlaması gerekir. Şimdi yeniden başlatın ya da Steam bir sonraki açılışta onları ekleyecek.</string>
<string name="steam_import_names_more">%1$s ve %2$d tane daha</string>
<string name="steam_import_now">Şimdi yeniden başlat</string>
<string name="steam_import_later">Daha sonra</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Дії фізичних кнопок</string>
<string name="shortcuts_dd_menu">Меню DroidDeck</string>
<string name="shortcuts_capture">Призначити: %1$s</string>
<string name="shortcuts_press">Натисніть і відпустіть кнопку. Призначення збережеться автоматично.</string>
<string name="shortcuts_release">Відпустіть кнопку, щоб продовжити.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Ця кнопка вже призначена для: %1$s</string>
<string name="shortcuts_save">Перепризначити</string>
<string name="shortcuts_retry">Спробувати іншу кнопку</string>
<string name="shortcuts_limitations">Кнопка «Додому» та деякі додаткові кнопки можуть бути недоступні.</string>
</resources>
+5 -1
View File
@@ -1137,7 +1137,6 @@
<string name="games_never_played">Ще не грали</string>
<string name="games_runtime_busy_percent">Середовище зайняте · %1$d%%</string>
<string name="games_runtime_busy">Середовище зайняте</string>
<string name="games_runtime_first_play">Середовище встановлюється під час першого натискання «Грати»</string>
<string name="games_runtime_update">Є оновлення середовища</string>
<string name="games_runtime_ready">● Середовище готове</string>
<string name="games_internal">Внутрішнє сховище</string>
@@ -3281,4 +3280,9 @@
<string name="slow_usb_port">%1$s під’єднано через %2$s (%3$s Мбіт/с, близько %4$d МБ/с). USB-порт цього пристрою не працює швидше, тому ігри завантажуватимуться повільно. Внутрішня пам’ять або карта microSD можуть бути швидшими.</string>
<string name="slow_usb_never">Більше не показувати</string>
<string name="slow_usb_dismiss">Закрити</string>
<string name="steam_import_title">Перезапустити Steam, щоб додати ваші ігри?</string>
<string name="steam_import_body">Steam може показати ці ваші ігри як встановлені: %1$s. Для цього його треба перезапустити. Перезапустіть зараз, або їх буде додано під час наступного запуску Steam.</string>
<string name="steam_import_names_more">%1$s і ще %2$d</string>
<string name="steam_import_now">Перезапустити зараз</string>
<string name="steam_import_later">Пізніше</string>
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="shortcuts_title">Phím tắt nút vật lý</string>
<string name="shortcuts_dd_menu">Menu DroidDeck</string>
<string name="shortcuts_capture">Gán: %1$s</string>
<string name="shortcuts_press">Nhấn và thả một nút. Gán nút được lưu tự động.</string>
<string name="shortcuts_release">Thả nút để tiếp tục.</string>
<string name="shortcuts_detected">%1$s: %2$s</string>
<string name="shortcuts_conflict">Nút này đã được gán cho: %1$s</string>
<string name="shortcuts_save">Gán lại</string>
<string name="shortcuts_retry">Thử nút khác</string>
<string name="shortcuts_limitations">Nút Home và một số nút bổ sung có thể không khả dụng.</string>
</resources>
Loaded 100 of 167 files, more files were not shown because too many files have changed in this diff. Show more