Compare commits

...
Author SHA1 Message Date
The412Banner 75d79fc14d fix(steam): explain launches the offline client cannot start
Steam in offline mode only knows the games in its cached appinfo. A game
bought after its last online session and installed by DroidDeck's own
downloader fails at once with AppError_9 (missing configuration). Before
handing such a game to Steam, check the client's appinfo cache and say to
go online in Steam once.
2026-11-30 02:16:30 +00:00
MaxsTechReview c6743730aa Keep a signed-in store's Library tab when its game list is empty or failed to load (#3449) 2026-11-29 20:24:34 -05:00
MaxsTechReview 780c5658d0 fix(input): each pad is listed once in Windows games so both triggers read together (#3436)
* fix(input): each pad is listed once in Windows games so both triggers read together

A pad that Wine's SDL backend also reads was described to Wine's udev
backend as a Steam Input virtual pad, so Wine built two devices for one
pad. SDL RawInput games could not match the two and read held triggers as
released. The pad now keeps the identity the SDL backend sees unless that
backend is told to skip it.

Rumble that Wine starts through SDL is now held until the next update,
matching the udev path, instead of stopping after one second.

* fix(input): hold only the rumble Wine starts through SDL, not later SDL rumble in the same process

* fix(input): read @file SDL ignore lists when choosing the pad identity

SDL reads the ignore and except lists from a file when the value starts
with @. Match the ring pad ID against that file's contents too.

* fix(input): parse SDL controller ID lists the way SDL does when choosing the pad identity
2026-11-29 20:24:20 -05:00
MaxsTechReview a9e8a01bb6 fix(native): prepare the rootfs before a helper starts outside a session (#3447)
Prepare the rootfs before a native program starts outside a session

The linker and libc are patched for Android's seccomp filter only when a
session starts. A helper started between sessions, after a runtime
update and before the first session, ran the unpatched linker and died
of SIGSYS (exit code 159). The shared native process builder now
prepares the rootfs itself when no session is running.
2026-11-29 19:44:11 -05:00
MaxsTechReview 861121144c fix(xbox): try the next listed executable when one is missing (#3446)
A package can list several PC executables while shipping only some of them. Try each listed executable in order and fail only when none of them exist.
2026-11-29 19:33:55 -05:00
d7fcea74b4 fix(mali): Auto respects Venus turned off and picks the bridge on Mali-G2-Ultra (#3198)
* fix(mali): Auto respects Venus turned off and picks the bridge on Mali-G2-Ultra

With GPU drivers on Auto, Mali (Venus) was turned back on after the user turned it off. Auto now respects that choice, and picks the bridge on Mali-G2-Ultra, where Steam's web helper dies on its first window through Venus (#2879). When Auto itself turns Venus off it clears the stored key, so its own decision does not read as the user's later.

* fix(mali): clear Auto-owned Venus preference when fallback ends

---------

Co-authored-by: Unixcision <14082251+Unixcision@users.noreply.github.com>
Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
2026-11-29 17:17:51 -05:00
sergeymetallicandsergeymetallic 44b429ca20 fix(game-env): resolve store launcher executable from sidecar (#3288)
* fix(game-env): resolve store launcher executable from sidecar

Store titles launched through .droiddeck-launch.bat passed the wrapper
path directly into engine_fixes and other exe-based checks, so stem
checks saw .droiddeck-launch and game_files scanned from the install
root rather than the executable's folder. For Epic's Batman: Arkham
City, Binaries/Win32/BatmanAC.exe sat one level deeper than game_files
scans, so arkham_city_x87 never set FEX_X87REDUCEDPRECISION=0.

Resolve .droiddeck-launch.bat to the validated exe entry from
.droiddeck-store.json when inspecting the game, while keeping the
launcher path in the Proton command.

* fix(game-env): reject parent segments before normpath in store_game_exe

os.path.normpath lexically collapses symlink/../file before the
filesystem is consulted, which could validate a different file than a
symlinked subdirectory path denotes. Reject any ".." path component
after separator normalization before calling os.path.normpath.

---------

Co-authored-by: sergeymetallic <6938136+sergeymetallic@users.noreply.github.com>
2026-11-29 16:18:43 -05:00
Dhiman SealandKurt Himebauch c91b100bc1 fix(game-env): run Inno Setup installers with the FEX Stability settings (#3069)
* fix(game-env): run Inno Setup installers with the FEX Stability settings

An Inno Setup installer added as a game stops with Wine's "Path not
fpund." dialog under the default FEX preset. The 32-bit setup stub
corrupts its own paths before it opens its archive (#1277, #3067). #1174
avoids the stub only for GOG installs, by extracting them natively.

droiddeck-game-env now finds the stub by the setup loader's offset-table
ID in its resources, or the "Inno" marker older loaders keep at 0x30, and
launches it with the Stability preset's FEX settings. A FEX preset chosen
for the game itself still wins.

Fixes #3067

* fix(game-env): name only the preset seen to corrupt Inno Setup paths

The launch note and the docs said the faster presets corrupt the setup
stub. Only the default Performance + TSO preset was seen doing it.

* fix(game-env): give Inno Setup installers started with run the Stability settings

The run verb skips engine_fixes and gets only the sync settings, so an installer started that way kept the inherited Performance + TSO preset. Apply the Stability values on that path too; explicit game settings still win in apply_config.

* fix(game-env): keep the game's own FEX settings for installers started with run

The run path filtered the game entry down to sync keys, so a FEX preset
chosen for the game was replaced by the installer's Stability settings,
and a null could not unset a preset key. Copy the game's Stability FEX
keys into the synced config before applying it, so the game's own
settings still win on every launch path.

---------

Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
2026-11-29 16:18:35 -05:00
LarzVader 90df30f4d7 fix(venus): OpenGL quads no longer crash Mali's shader compiler through Zink (#3283)
* fix(venus): OpenGL quads no longer crash Mali's shader compiler through Zink

The Mali-G610's driver crashes compiling Zink's geometry shaders
(SIGSEGV at 0x40 in cmpbe_v2_compile_multiple_shaders), and the render
server and the application die with it. A plain geometry shader that
only passes triangles on does not crash it, but draws nothing. Zink
draws GL_QUADS through a geometry shader when the device has the
feature, so OpenGL programs died on their first quad.

The Mali layer now reports no geometryShader to Zink on ARM GPUs.
Mesa then splits quads into triangles itself. DXVK keeps the feature,
which it needs for D3D10 and 11. DROIDDECK_MALI_COMPAT_NO_GS=0 keeps
it for Zink, =1 hides it from every application.

* test(venus): clear DROIDDECK_MALI_COMPAT_NO_GS before the layer tests

The geometry shader test checks the default first. With the variable
exported in the shell, it failed before it reached its own settings.

* test(venus): check that other ARM applications keep the geometry shader
2026-11-29 16:18:27 -05:00
devu92 2b6ded9fd4 Fix persistent black video after delayed GPU fences (#3400)
fix(vulkan): keep presenting after delayed GPU fence completion
2026-11-29 16:18:19 -05:00
btns29andbtns29 38c2c00c86 Keep safe webhelper layout on Mali bridge (#3420)
* Keep safe webhelper layout on Mali bridge

* Name the zygote regression in the layout test

---------

Co-authored-by: btns29 <btns29@users.noreply.github.com>
2026-11-29 15:53:48 -05:00
Kurt Himebauch 678057d727 Prompt for shared folders named Android/data, and reload after any regrant (#3435)
Prompt for shared folders named Android/data, and reload the folder after any regrant
2026-11-29 15:06:47 -05:00
Kurt Himebauch ae94009382 Ask for all-files access when a shared drive is opened, not on first launch (#3429) 2026-11-29 15:02:25 -05:00
Kurt Himebauch fd93a35b72 Start Steam by itself when first-run setup finishes (#3430) 2026-11-29 15:02:11 -05:00
MaxsTechReview 12fa3ac343 fix(input): a trigger key sent before its axis no longer counts as two presses (#3431)
A trigger key that fires before its axis no longer reads as two presses
2026-11-29 14:20:14 -05:00
MaxsTechReview 422b339af8 fix(display): release zero-copy display buffers at latch (#3424)
* Release zero-copy display buffers at latch; gamescope waits for scanout before reusing an image

* Test that zero-copy releases follow the kernel's fence attach, not the buffer kind

* Pin the gamescope build that waits for scanout before reusing an image

* Probe the fallback output image for scanout so the composite waits on it too

* Pin the gamescope build that probes the fallback output image
2026-11-29 13:54:16 -05:00
FryMcNugget 1d155b2fe0 Quest: SteamVR runs cleanly at close to 72 Hz (right-eye glitch, black voids, frame rate) (#3360) 2026-11-29 12:56:29 -05:00
FryMcNugget 131a351f3f fix(runtime): Unity 5 games no longer crash on their first HTTPS request (#3394) 2026-11-29 12:55:45 -05:00
FX1922 a4c2fa8aec fix(compositor): preserve layer state when zero-copy callbacks fail (#3398)
## Problem

Zero-copy layer transitions could leave the compositor in an
inconsistent state when allocating an `ASurfaceTransaction` completion
callback failed.

Some failure paths released the current or previous `ASurfaceControl`
even though the transaction had not been applied. This could invalidate
layer state or release resources before the transition completed.

## Fix

- Cancel and delete transactions when completion callback allocation
fails.
- Preserve the current layer and buffer state instead of releasing
resources prematurely.
- Roll back surface swaps when presentation cannot proceed.
- Return an error from failed presentation paths and leave the layer
available for recovery.
- Apply the same failure handling to presentation, layer hiding and
surface retirement.

## Tests

- `git diff --check`: passed.
- Native build: not run locally.
- Device testing: 
> Tested on one device and helped with his problem, test build is up for
further testing.
2026-11-29 20:20:42 +03:00
LunaDL fe4f619973 chore: trigger CI rerun 2026-11-29 12:51:13 -04:00
Kurt Himebauch 80fc5dec07 Fix the Steam home's wall and card fan on portrait screens (#3412) 2026-11-29 10:17:44 -05:00
FX1922 a847ae5f39 Feat: add right stick page scrolling (#3387)
## Changes
- Add vertical page scrolling using the controller's right stick.
> Reuse existing right stick axis detection for better controller
compatibility.
> Convert stick movement into scroll events for Compose scrollable
components.
> Add a dead zone threshold and rate limiting to prevent unintended
scrolling.

## Compatibility
- Supports controllers with different right stick axis layouts.
- Scroll behavior depends on the page's handling of scroll events.

Suggest by _corcse on discord

UwU
2026-11-29 09:52:43 +03:00
LunaDL 9b7ce457a5 Keep current buffer attached when hide callback allocation fails 2026-11-29 01:51:24 -04:00
LunaDL d2031ba384 Fix deferred layer hide when callback allocation fails 2026-11-29 01:43:57 -04:00
LunaDL e9f3d8ec95 Fix invalid input device ID constant 2026-11-29 01:33:16 -04:00
FX1922 22642605ec Perf(DDFG): Fixes and optimizes stuff in droiddeck frame gen. (#3343)
- **Perf:** Optimize DD FrameGen flow image initialization and shader
sampling.
> FrameGen should start faster and be more reliable.

- **Perf:** Skip unused FLOWREG image initialization and remove
redundant final FLOWREG barrier.

- **Perf:** Use initialization barriers for fresh framegen images.
> Helps with reliability and performance.

- **Perf:** Reserve capacity for image initialization barriers and Use
fixed storage for image initialization barriers.

- **Perf:** Batch FrameGen image descriptor updates and some FrameGen
image barriers.
> Less calls to the vulkan API.

- **Perf:** Skip unused global motion reduction sums.

- **Docs:** Add OF3_FLOWREG shader documents and some comments.
> This should be helpful when making future changes in the shader, only
for testing and development.

## Fixes

- Fix: Derive OF3 Flow Length from Array Size.
> Should make future changes easier.

- Fix: DD FrameGen scratch resource leak on resize.

- Fix: Present semaphore synchronization to prevent device loss on some
devices.

> Reported by a user, DDFG never worked on his device, this didn't
actually helped him, but im keeping because it can be useful for other
devices.

> issue reported on discord [Link to bug
report](https://discord.com/channels/1552707793247539220/1575946870151446589)

> This file contains the investigation made, in Portuguese:
![Investigação.txt](https://github.com/user-attachments/files/35530000/investigacao_ddfg_honor_win2.txt)


## Performance

**OLD DroidDeck FrameGen**

| FPS (reported) | 1% low | Frametime | Game | DDFG | Device | DD
version |
|:--:|:--:|:--:|:--|:--:|:--|:--|
| 39.9 → 118.8 | 16.1 | 25.1 ms | Mass Effect | 3× | RP Nova, 12 GB,
Snapdragon 8 Gen 2 | 0.7.11 Stable |
| 32.5 → 91.4 | 21.9 | ## | NieR:Automata | 3× | S26U, SD 8 EG 5, Adr
840 | Preview b08d8e8 |
| 25.2 → 60.0 | ## | ## | Roadside Research | 4× | Odin2 Portal, Adreno
740 | 0.7.11 Stable |


*Report 1 — coleslaw117*

*Report 2 — twitchlemaxou*

*Report 3 — Dylon*

**NEW DroidDeck FrameGen**

| FPS (reported) | 1% low | Frametime | Game | DDFG | Device | DD
version |
|:--:|:--:|:--:|:--|:--:|:--|:--|



## Testing

- All checkd on Github green
- APK compiles
- All verification passed on my fork
- Working on test build
2026-11-29 08:25:26 +03:00
LunaDL 30fddaf53a Preserve motion dispatch and rate-limit right-stick scrolling 2026-11-29 01:20:58 -04:00
LunaDL c833514757 Restore HDR caches when rolling back layer swap 2026-11-29 01:17:14 -04:00
LunaDL 97a998a3b9 Defer pool cleanup only for layers still in use 2026-11-29 01:04:11 -04:00
LunaDL 31ee95250c Keep layer recovery pending when surface creation fails 2026-11-29 01:03:58 -04:00
LunaDL 689ecc40ad Guard pool drain against pending layer callbacks 2026-11-29 01:03:36 -04:00
LunaDL 3bef9a4200 Fix deferred zero-copy layer retirement and rollback 2026-11-29 01:03:25 -04:00
LunaDL cd1e9dde15 Fix zero-copy layer transition callback failures 2026-11-29 00:47:47 -04:00
superboo07 16e92db234 Option to not mount the phones storage to the container (#1443) 2026-11-28 22:48:47 -05:00
Kurt Himebauch e0d9f8537a fix(components): install the real ARM64 Visual C++ runtime instead of registry entries (#2430) 2026-11-28 22:36:18 -05:00
Kurt Himebauch 6349a171b5 feat(stores): editable launch options for EA store games (#2444) 2026-11-28 22:34:31 -05:00
The412Banner 9a76e75ee9 fix(ci): retry other Ubuntu mirrors on runners without the deb822 sources file (#3063) 2026-11-28 22:22:11 -05:00
LunaDL 55d97d82fd Handle unknown right-stick layout in mouse mode 2026-11-28 22:26:48 -04:00
LunaDL 9e98ed45dd Fix right-stick scroll focus and compatibility handling 2026-11-28 22:26:44 -04:00
LunaDL 53bd564298 Remove obsolete right-stick scroll timestamp 2026-11-28 18:38:27 -04:00
LunaDL 3e32e71af4 Avoid newer Handler callback API for scroll ticks 2026-11-28 18:38:20 -04:00
LunaDL d750412e0f Repeat right-stick scrolling while held and stop safely 2026-11-28 18:38:14 -04:00
LunaDL 378c4dc84a Fix right-stick scroll routing and trigger event order 2026-11-28 18:18:44 -04:00
LunaDL 7761d0aba7 Distinguish undecided right-stick axis layouts 2026-11-28 18:18:38 -04:00
LunaDL efb1b5437a Route right-stick movement as Compose scroll events 2026-11-28 18:06:26 -04:00
LunaDL 8154a79420 Expose existing right-stick axis detection for launcher scrolling 2026-11-28 18:06:18 -04:00
LunaDL 01b2527e0f Add right-stick page scrolling to launcher 2026-11-28 18:04:03 -04:00
LunaDL 0c9b113290 Fix fake present semaphore handles in effects test 2026-11-27 17:01:19 -04:00
LunaDL f632f2b577 Stub semaphore cleanup in swapchain idle test 2026-11-27 16:52:55 -04:00
LunaDL 22ff7377ea Fix effects resolution harness semaphore count 2026-11-27 16:52:53 -04:00
LunaDL f3e8ce8de0 Fix Vulkan caller test semaphore fixture 2026-11-27 16:42:36 -04:00
LunaDL 183ae70246 Merge upstream main into Perf/DDframegen
Merge Droid-Deck/DroidDeck main into Perf/DDframegen while preserving existing DDFG commits.
2026-11-27 16:34:31 -04:00
LunaDL e20dd00d29 Remove two comments from vk_present.c 2026-11-27 16:21:19 -04:00
LunaDL e0a20311d5 Log per-image present semaphore setup 2026-11-27 16:18:51 -04:00
LunaDL b9cc1c80af Handle swapchain image setup failures 2026-11-27 16:18:34 -04:00
LunaDL 9a7a469ed6 Fix present semaphore reuse per swapchain image 2026-11-27 16:18:24 -04:00
LunaDL 00264207ed Reset global motion before FrameGen resize rebuild 2026-11-27 13:48:24 -04:00
LunaDL 992f251a6b Route device-loss cleanup through FrameGen helper 2026-11-27 13:19:50 -04:00
LunaDL 995aea5740 Allow safe scratch teardown on device loss 2026-11-27 13:19:46 -04:00
LunaDL 4c977a0c9c Allow safe scratch teardown on device loss 2026-11-27 13:19:44 -04:00
LunaDL 08b4d9121d Clean up FrameGen resources after device loss 2026-11-27 13:19:37 -04:00
LunaDL 31503e610b Fix transactional FrameGen reconfiguration 2026-11-27 13:19:32 -04:00
LunaDL 62926245a0 Track device ownership for partial scratch builds 2026-11-27 12:41:11 -04:00
LunaDL f337d284e8 Guard FrameGen teardown and resize on idle failure 2026-11-27 12:41:06 -04:00
LunaDL 734a2679ef Guard global scratch against cross-device reuse 2026-11-27 12:40:58 -04:00
LunaDL 0fb426ac45 Cover prior compute and transfer work in init barriers 2026-11-27 12:39:08 -04:00
LunaDL 39ce344c9b Use fixed storage for image initialization barriers 2026-11-27 12:31:34 -04:00
LunaDL c1e27b4092 Include array for fixed barrier storage 2026-11-27 12:31:32 -04:00
LunaDL 300ed8061f Skip unused global motion reduction sums 2026-11-27 12:25:58 -04:00
LunaDL 4352645f3c Batch equivalent compute image barriers 2026-11-27 12:19:13 -04:00
LunaDL fabbe8137d Reserve capacity for image initialization barriers 2026-11-27 02:40:08 -04:00
LunaDL 0c7bd64b48 Fix batched image barrier arguments 2026-11-27 02:34:47 -04:00
LunaDL 2cb19a34cf Skip unused FLOWREG image initialization 2026-11-27 02:32:24 -04:00
LunaDL 5b08b4714f Batch fresh FrameGen image initialization barriers 2026-11-27 02:23:52 -04:00
LunaDL e40f898bb2 Track FrameGen image generation 2026-11-27 02:14:51 -04:00
LunaDL 9a8bd7b482 Track image recreation during FrameGen resize 2026-11-27 02:14:49 -04:00
LunaDL 720a2f56ad Invalidate scratch descriptors when images are recreated 2026-11-27 02:14:46 -04:00
LunaDL e597e01e8e Batch FrameGen image descriptor updates 2026-11-27 02:09:27 -04:00
LunaDL 49d470588c Disable FrameGen after idle wait failure 2026-11-27 02:01:40 -04:00
LunaDL e9078c4612 Handle device idle failures before scratch cleanup 2026-11-27 02:01:32 -04:00
LunaDL 30e5c27b11 Check device idle result during FrameGen teardown 2026-11-27 02:01:28 -04:00
LunaDL a9a92dfea0 Release scratch resources before destroying FrameGen 2026-11-27 01:42:38 -04:00
LunaDL f4cbe28532 Add owned-device scratch cleanup helper 2026-11-27 01:42:35 -04:00
LunaDL 06717ec356 Declare FrameGen scratch cleanup helper 2026-11-27 01:42:32 -04:00
LunaDL 068d7d7fdf Use initialization barriers for fresh framegen images 2026-11-27 01:26:50 -04:00
LunaDL df2eea3985 Use precise Vulkan barrier for image initialization 2026-11-27 01:26:47 -04:00
LunaDL f5bde33adc Add dedicated image initialization barrier 2026-11-27 01:26:45 -04:00
LunaDL 555df00917 Remove redundant final FLOWREG barrier 2026-11-27 00:19:13 -04:00
LunaDL c0719a5d9e Derive OF3_FLOW_LEN from shader array 2026-11-27 00:14:53 -04:00
EnzoDLofi ea3365232f Optimize DD FrameGen flow regularization shader 2026-11-27 00:10:51 -04:00
LunaDL 898fdf7606 Add conservative OF3_FLOWREG shader optimization variant 2026-11-27 00:04:48 -04:00
EnzoDLofi 24adee99f8 Optimize DD FrameGen flow shader sampling 2026-11-26 23:59:23 -04:00
LunaDL 7b0b811db1 Optimize DD FrameGen flow image initialization 2026-11-26 23:12:46 -04:00
LunaDL ce4647d990 Fix DD FrameGen scratch resource leak on resize 2026-11-26 23:00:34 -04:00
131 changed files with 3550 additions and 377 deletions

No files matched your search

@@ -6,8 +6,216 @@ static const uint32_t OF3_LUMA_SPV[] = {0x07230203u,0x00010300u,0x0008000bu,0x00
static const size_t OF3_LUMA_LEN = 481;
static const uint32_t OF3_DOWNSAMPLE_SPV[] = {0x07230203u,0x00010300u,0x0008000bu,0x0000008au,0x00000000u,0x00020011u,0x00000001u,0x00020011u,0x00000032u,0x0006000bu,0x00000001u,0x4c534c47u,0x6474732eu,0x3035342eu,0x00000000u,0x0003000eu,0x00000000u,0x00000001u,0x0006000fu,0x00000005u,0x00000004u,0x6e69616du,0x00000000u,0x0000000du,0x00060010u,0x00000004u,0x00000011u,0x00000010u,0x00000010u,0x00000001u,0x00030003u,0x00000002u,0x000001c2u,0x00040005u,0x00000004u,0x6e69616du,0x00000000u,0x00030005u,0x00000009u,0x00646967u,0x00080005u,0x0000000du,0x475f6c67u,0x61626f6cu,0x766e496cu,0x7461636fu,0x496e6f69u,0x00000044u,0x00030005u,0x00000012u,0x006d6964u,0x00040005u,0x00000016u,0x74734475u,0x00000000u,0x00040005u,0x00000030u,0x44637273u,0x00006d69u,0x00040005u,0x00000034u,0x63725375u,0x00000000u,0x00040005u,0x0000003au,0x65736162u,0x00000000u,0x00030005u,0x00000044u,0x00000068u,0x00030005u,0x0000004au,0x00000061u,0x00030005u,0x00000059u,0x00000062u,0x00030005u,0x00000065u,0x00000063u,0x00030005u,0x00000071u,0x00000064u,0x00040047u,0x0000000du,0x0000000bu,0x0000001cu,0x00030047u,0x00000016u,0x00000019u,0x00040047u,0x00000016u,0x00000021u,0x00000030u,0x00040047u,0x00000016u,0x00000022u,0x00000000u,0x00040047u,0x00000034u,0x00000021u,0x00000020u,0x00040047u,0x00000034u,0x00000022u,0x00000000u,0x00040047u,0x00000089u,0x0000000bu,0x00000019u,0x00020013u,0x00000002u,0x00030021u,0x00000003u,0x00000002u,0x00040015u,0x00000006u,0x00000020u,0x00000001u,0x00040017u,0x00000007u,0x00000006u,0x00000002u,0x00040020u,0x00000008u,0x00000007u,0x00000007u,0x00040015u,0x0000000au,0x00000020u,0x00000000u,0x00040017u,0x0000000bu,0x0000000au,0x00000003u,0x00040020u,0x0000000cu,0x00000001u,0x0000000bu,0x0004003bu,0x0000000cu,0x0000000du,0x00000001u,0x00040017u,0x0000000eu,0x0000000au,0x00000002u,0x00030016u,0x00000013u,0x00000020u,0x00090019u,0x00000014u,0x00000013u,0x00000001u,0x00000000u,0x00000000u,0x00000000u,0x00000002u,0x00000003u,0x00040020u,0x00000015u,0x00000000u,0x00000014u,0x0004003bu,0x00000015u,0x00000016u,0x00000000u,0x00020014u,0x00000019u,0x0004002bu,0x0000000au,0x0000001au,0x00000000u,0x00040020u,0x0000001bu,0x00000007u,0x00000006u,0x0004002bu,0x0000000au,0x00000024u,0x00000001u,0x00040017u,0x0000002eu,0x00000013u,0x00000002u,0x00040020u,0x0000002fu,0x00000007u,0x0000002eu,0x00090019u,0x00000031u,0x00000013u,0x00000001u,0x00000000u,0x00000000u,0x00000000u,0x00000001u,0x00000000u,0x0003001bu,0x00000032u,0x00000031u,0x00040020u,0x00000033u,0x00000000u,0x00000032u,0x0004003bu,0x00000033u,0x00000034u,0x00000000u,0x0004002bu,0x00000006u,0x00000036u,0x00000000u,0x0004002bu,0x00000013u,0x0000003du,0x40000000u,0x0004002bu,0x00000013u,0x0000003fu,0x3f800000u,0x0004002bu,0x00000013u,0x00000045u,0x3f000000u,0x00040020u,0x00000049u,0x00000007u,0x00000013u,0x0004002bu,0x00000013u,0x00000055u,0x00000000u,0x00040017u,0x00000056u,0x00000013u,0x00000004u,0x0004002bu,0x00000013u,0x00000085u,0x3e800000u,0x0004002bu,0x0000000au,0x00000088u,0x00000010u,0x0006002cu,0x0000000bu,0x00000089u,0x00000088u,0x00000088u,0x00000024u,0x00050036u,0x00000002u,0x00000004u,0x00000000u,0x00000003u,0x000200f8u,0x00000005u,0x0004003bu,0x00000008u,0x00000009u,0x00000007u,0x0004003bu,0x00000008u,0x00000012u,0x00000007u,0x0004003bu,0x0000002fu,0x00000030u,0x00000007u,0x0004003bu,0x0000002fu,0x0000003au,0x00000007u,0x0004003bu,0x0000002fu,0x00000044u,0x00000007u,0x0004003bu,0x00000049u,0x0000004au,0x00000007u,0x0004003bu,0x00000049u,0x00000059u,0x00000007u,0x0004003bu,0x00000049u,0x00000065u,0x00000007u,0x0004003bu,0x00000049u,0x00000071u,0x00000007u,0x0004003du,0x0000000bu,0x0000000fu,0x0000000du,0x0007004fu,0x0000000eu,0x00000010u,0x0000000fu,0x0000000fu,0x00000000u,0x00000001u,0x0004007cu,0x00000007u,0x00000011u,0x00000010u,0x0003003eu,0x00000009u,0x00000011u,0x0004003du,0x00000014u,0x00000017u,0x00000016u,0x00040068u,0x00000007u,0x00000018u,0x00000017u,0x0003003eu,0x00000012u,0x00000018u,0x00050041u,0x0000001bu,0x0000001cu,0x00000009u,0x0000001au,0x0004003du,0x00000006u,0x0000001du,0x0000001cu,0x00050041u,0x0000001bu,0x0000001eu,0x00000012u,0x0000001au,0x0004003du,0x00000006u,0x0000001fu,0x0000001eu,0x000500afu,0x00000019u,0x00000020u,0x0000001du,0x0000001fu,0x000400a8u,0x00000019u,0x00000021u,0x00000020u,0x000300f7u,0x00000023u,0x00000000u,0x000400fau,0x00000021u,0x00000022u,0x00000023u,0x000200f8u,0x00000022u,0x00050041u,0x0000001bu,0x00000025u,0x00000009u,0x00000024u,0x0004003du,0x00000006u,0x00000026u,0x00000025u,0x00050041u,0x0000001bu,0x00000027u,0x00000012u,0x00000024u,0x0004003du,0x00000006u,0x00000028u,0x00000027u,0x000500afu,0x00000019u,0x00000029u,0x00000026u,0x00000028u,0x000200f9u,0x00000023u,0x000200f8u,0x00000023u,0x000700f5u,0x00000019u,0x0000002au,0x00000020u,0x00000005u,0x00000029u,0x00000022u,0x000300f7u,0x0000002cu,0x00000000u,0x000400fau,0x0000002au,0x0000002bu,0x0000002cu,0x000200f8u,0x0000002bu,0x000100fdu,0x000200f8u,0x0000002cu,0x0004003du,0x00000032u,0x00000035u,0x00000034u,0x00040064u,0x00000031u,0x00000037u,0x00000035u,0x0005006Line truncated
static const size_t OF3_DOWNSAMPLE_LEN = 753;
static const uint32_t OF3_FLOW_SPV[] = {0x07230203u,0x00010300u,0x0008000bu,0x00000185u,0x00000000u,0x00020011u,0x00000001u,0x00020011u,0x00000032u,0x0006000bu,0x00000001u,0x4c534c47u,0x6474732eu,0x3035342eu,0x00000000u,0x0003000eu,0x00000000u,0x00000001u,0x0006000fu,0x00000005u,0x00000004u,0x6e69616du,0x00000000u,0x0000000du,0x00060010u,0x00000004u,0x00000011u,0x00000010u,0x00000010u,0x00000001u,0x00030003u,0x00000002u,0x000001c2u,0x00040005u,0x00000004u,0x6e69616du,0x00000000u,0x00030005u,0x00000009u,0x00646967u,0x00080005u,0x0000000du,0x475f6c67u,0x61626f6cu,0x766e496cu,0x7461636fu,0x496e6f69u,0x00000044u,0x00030005u,0x00000012u,0x006d6964u,0x00040005u,0x00000016u,0x6f6c4675u,0x00000077u,0x00040005u,0x00000030u,0x44766e69u,0x00006d69u,0x00030005u,0x00000036u,0x00007675u,0x00040005u,0x0000003fu,0x654c6f74u,0x006c6576u,0x00030005u,0x00000040u,0x00000055u,0x00060006u,0x00000040u,0x00000000u,0x776f6c66u,0x6c616353u,0x00000065u,0x00050006u,0x00000040u,0x00000001u,0x6576656cu,0x0000006cu,0x00050006u,0x00000040u,0x00000002u,0x30646170u,0x00000000u,0x00050006u,0x00000040u,0x00000003u,0x31646170u,0x00000000u,0x00030005u,0x00000042u,0x00000000u,0x00050005u,0x0000004au,0x64657270u,0x6c6c7546u,0x00000000u,0x00050005u,0x0000004eu,0x65725075u,0x74636964u,0x0000726fu,0x00050005u,0x00000055u,0x64657270u,0x6576654cu,0x0000006cu,0x00040005u,0x00000059u,0x74736562u,0x00646153u,0x00050005u,0x0000005bu,0x74736562u,0x70736944u,0x00000000u,0x00030005u,0x0000005du,0x00007973u,0x00030005u,0x00000067u,0x00007873u,0x00040005u,0x0000006fu,0x646e6163u,0x00000000u,0x00030005u,0x00000077u,0x00646173u,0x00030005u,0x00000078u,0x00007962u,0x00030005u,0x00000081u,0x00007862u,0x00030005u,0x00000089u,0x00006f62u,0x00030005u,0x0000008fu,0x00000070u,0x00050005u,0x00000090u,0x6d754c75u,0x65725061u,0x00000076u,0x00030005u,0x00000099u,0x00000063u,0x00050005u,0x0000009au,0x6d754c75u,0x72754361u,0x00000072u,0x00040005u,0x000000cau,0x43646173u,0x00000000u,0x00040005u,0x000000ccu,0x58646173u,0x0000006du,0x00040005u,0x000000cdu,0x58646173u,0x00000070u,0x00040005u,0x000000ceu,0x59646173u,0x0000006du,0x00040005u,0x000000cfu,0x59646173u,0x00000070u,0x00030005u,0x000000d0u,0x00007962u,0x00030005u,0x000000d8u,0x00007862u,0x00030005u,0x000000e0u,0x00006f62u,0x00030005u,0x000000e6u,0x00000070u,0x00040005u,0x000000efu,0x646e6163u,0x00006d58u,0x00040005u,0x000000f4u,0x646e6163u,0x00007058u,0x00040005u,0x000000f8u,0x646e6163u,0x00006d59u,0x00040005u,0x000000fcu,0x646e6163u,0x00007059u,0x00030005u,0x00000148u,0x00007864u,0x00030005u,0x00000149u,0x00007964u,0x00040005u,0x0000014au,0x6f6e6564u,0x0000586du,0x00040005u,0x00000152u,0x6f6e6564u,0x0000596du,0x00050005u,0x00000176u,0x776f6c66u,0x6c6c7546u,0x00000000u,0x00040047u,0x0000000du,0x0000000bu,0x0000001cu,0x00030047u,0x00000016u,0x00000019u,0x00040047u,0x00000016u,0x00000021u,0x00000030u,0x00040047u,0x00000016u,0x00000022u,0x00000000u,0x00030047u,0x00000040u,0x00000002u,0x00050048u,0x00000040u,0x00000000u,0x00000023u,0x00000000u,0x00050048u,0x00000040u,0x00000001u,0x00000023u,0x00000004u,0x00050048u,0x00000040u,0x00000002u,0x00000023u,0x00000008u,0x00050048u,0x00000040u,0x00000003u,0x00000023u,0x0000000cu,0x00040047u,0x00000042u,0x00000021u,0x00000000u,0x00040047u,0x00000042u,0x00000022u,0x00000000u,0x00040047u,0x0000004eu,0x00000021u,0x00000022u,0x00040047u,0x0000004eu,0x00000022u,0x00000000u,0x00040047u,0x00000090u,0x00000021u,0x00000020u,0x00040047u,0x00000090u,0x00000022u,0x00000000u,0x00040047u,0x0000009au,0x00000021u,0x00000021u,0x00040047u,0x0000009au,0x00000022u,0x00000000u,0x00040047u,0x00000184u,0x0000000bu,0x00000019u,0x00020013u,0x00000002u,0x00030021u,0x00000003u,0x00000002u,0x00040015u,0x00000006u,0x00000020u,0x00000001u,0x00040017u,0x00000007u,0x00000006u,0x00000002u,0x00040020u,0x00000008u,0x00000007u,0x00000007u,0x00040015u,0x0000000au,0x00000020u,0x00000000u,0x00040017u,0x0000000bu,0x0000000au,0x00000003u,0x00040020u,0x0000000cu,0x00000001u,0x0000000bu,0x0004003bu,0x0000000cu,0x0000000du,0x00000001u,0x00040017u,0x0000000eu,0x0000000au,0x00000002u,0x00030016u,0x00000013u,0x00000020u,0x00090019u,0x00000014u,0x00000013u,0x00000001u,0x00000000u,0x00000000u,0x00000000u,0x00000002u,0x00000002u,0x00040020u,0x00000015u,0x00000000u,0x00000014u,0x0004003bu,0x00000015u,0x00000016u,0x00000000u,0x00020014u,0x00000019u,0x0004002bu,0x0000000au,0x0000001au,0x00000000u,0x00040020u,0x0000001bu,0x00000007u,0x00000006u,0x0004002bu,0x0000000au,0x00000024u,0x00000001u,0x00040017u,0x0000002eu,0x00000013u,0x00000002u,0x00040020u,0x0000002fu,0x00000007u,0x0000002eu,0x0004002bu,0x00000013u,0x00000031u,0x3f800000u,0x0004002bu,0x00000013u,0x00000039u,0x3f000000u,0x00040020u,0x0000003eu,0x00000007u,0x00000013u,0x0006001eu,0x00000040u,0x00000013u,0x0000000au,0x0000000au,0x0000000au,0x00040020u,0x00000041u,0x00000002u,0x00000040u,0x0004003bu,0x00000041u,0x00000042u,0x00000002u,0x0004002bu,0x00000006u,0x00000043u,0x00000001u,0x00040020u,0x00000044u,0x00000002u,0x0000000au,0x00090019u,0x0000004bu,0x00000013u,0x00000001u,0x0Line truncated
static const size_t OF3_FLOW_LEN = 2253;
static const uint32_t OF3_FLOW_SPV[] = {
0x07230203u,0x00010300u,0x0008000bu,0x000001feu,0x00000000u,0x00020011u,0x00000001u,0x00020011u,
0x00000032u,0x0006000bu,0x00000001u,0x4c534c47u,0x6474732eu,0x3035342eu,0x00000000u,0x0003000eu,
0x00000000u,0x00000001u,0x0006000fu,0x00000005u,0x00000004u,0x6e69616du,0x00000000u,0x0000000du,
0x00060010u,0x00000004u,0x00000011u,0x00000010u,0x00000010u,0x00000001u,0x00030003u,0x00000002u,
0x000001c2u,0x00040005u,0x00000004u,0x6e69616du,0x00000000u,0x00080005u,0x0000000du,0x475f6c67u,
0x61626f6cu,0x766e496cu,0x7461636fu,0x496e6f69u,0x00000044u,0x00040005u,0x00000016u,0x6f6c4675u,
0x00000077u,0x00030005u,0x00000040u,0x00000055u,0x00060006u,0x00000040u,0x00000000u,0x776f6c66u,
0x6c616353u,0x00000065u,0x00050006u,0x00000040u,0x00000001u,0x6576656cu,0x0000006cu,0x00050006u,
0x00000040u,0x00000002u,0x30646170u,0x00000000u,0x00050006u,0x00000040u,0x00000003u,0x31646170u,
0x00000000u,0x00030005u,0x00000042u,0x00000000u,0x00050005u,0x0000004eu,0x65725075u,0x74636964u,
0x0000726fu,0x00050005u,0x0000007bu,0x76657270u,0x63746150u,0x00000068u,0x00050005u,0x0000007du,
0x6d754c75u,0x65725061u,0x00000076u,0x00050005u,0x000000c9u,0x6d754c75u,0x72754361u,0x00000072u,
0x00040047u,0x0000000du,0x0000000bu,0x0000001cu,0x00030047u,0x00000016u,0x00000019u,0x00040047u,
0x00000016u,0x00000021u,0x00000030u,0x00040047u,0x00000016u,0x00000022u,0x00000000u,0x00030047u,
0x00000040u,0x00000002u,0x00050048u,0x00000040u,0x00000000u,0x00000023u,0x00000000u,0x00050048u,
0x00000040u,0x00000001u,0x00000023u,0x00000004u,0x00050048u,0x00000040u,0x00000002u,0x00000023u,
0x00000008u,0x00050048u,0x00000040u,0x00000003u,0x00000023u,0x0000000cu,0x00040047u,0x00000042u,
0x00000021u,0x00000000u,0x00040047u,0x00000042u,0x00000022u,0x00000000u,0x00040047u,0x0000004eu,
0x00000021u,0x00000022u,0x00040047u,0x0000004eu,0x00000022u,0x00000000u,0x00040047u,0x0000007du,
0x00000021u,0x00000020u,0x00040047u,0x0000007du,0x00000022u,0x00000000u,0x00040047u,0x000000c9u,
0x00000021u,0x00000021u,0x00040047u,0x000000c9u,0x00000022u,0x00000000u,0x00040047u,0x000001b3u,
0x0000000bu,0x00000019u,0x00020013u,0x00000002u,0x00030021u,0x00000003u,0x00000002u,0x00040015u,
0x00000006u,0x00000020u,0x00000001u,0x00040017u,0x00000007u,0x00000006u,0x00000002u,0x00040015u,
0x0000000au,0x00000020u,0x00000000u,0x00040017u,0x0000000bu,0x0000000au,0x00000003u,0x00040020u,
0x0000000cu,0x00000001u,0x0000000bu,0x0004003bu,0x0000000cu,0x0000000du,0x00000001u,0x00040017u,
0x0000000eu,0x0000000au,0x00000002u,0x00030016u,0x00000013u,0x00000020u,0x00090019u,0x00000014u,
0x00000013u,0x00000001u,0x00000000u,0x00000000u,0x00000000u,0x00000002u,0x00000002u,0x00040020u,
0x00000015u,0x00000000u,0x00000014u,0x0004003bu,0x00000015u,0x00000016u,0x00000000u,0x00020014u,
0x00000019u,0x0004002bu,0x0000000au,0x0000001au,0x00000000u,0x0004002bu,0x0000000au,0x00000024u,
0x00000001u,0x00040017u,0x0000002eu,0x00000013u,0x00000002u,0x0004002bu,0x00000013u,0x00000031u,
0x3f800000u,0x0004002bu,0x00000013u,0x00000039u,0x3f000000u,0x00040020u,0x0000003eu,0x00000007u,
0x00000013u,0x0006001eu,0x00000040u,0x00000013u,0x0000000au,0x0000000au,0x0000000au,0x00040020u,
0x00000041u,0x00000002u,0x00000040u,0x0004003bu,0x00000041u,0x00000042u,0x00000002u,0x0004002bu,
0x00000006u,0x00000043u,0x00000001u,0x00040020u,0x00000044u,0x00000002u,0x0000000au,0x00090019u,
0x0000004bu,0x00000013u,0x00000001u,0x00000000u,0x00000000u,0x00000000u,0x00000001u,0x00000000u,
0x0003001bu,0x0000004cu,0x0000004bu,0x00040020u,0x0000004du,0x00000000u,0x0000004cu,0x0004003bu,
0x0000004du,0x0000004eu,0x00000000u,0x0004002bu,0x00000013u,0x00000051u,0x00000000u,0x00040017u,
0x00000052u,0x00000013u,0x00000004u,0x0004002bu,0x00000006u,0x0000005au,0xffffffffu,0x0004002bu,
0x00000006u,0x0000006du,0x00000003u,0x0004002bu,0x0000000au,0x00000078u,0x00000009u,0x0004001cu,
0x00000079u,0x00000013u,0x00000078u,0x00040020u,0x0000007au,0x00000007u,0x00000079u,0x0004003bu,
0x0000004du,0x0000007du,0x00000000u,0x0004002bu,0x00000013u,0x0000008cu,0x7f7fffffu,0x0004002bu,
0x00000006u,0x00000090u,0xfffffffdu,0x0004003bu,0x0000004du,0x000000c9u,0x00000000u,0x0004002bu,
0x00000013u,0x000000deu,0x3bc49ba6u,0x0004002bu,0x00000013u,0x00000120u,0xbf800000u,0x0005002cu,
0x0000002eu,0x00000121u,0x00000120u,0x00000051u,0x0005002cu,0x0000002eu,0x00000125u,0x00000031u,
0x00000051u,0x0005002cu,0x0000002eu,0x00000129u,0x00000051u,0x00000120u,0x0005002cu,0x0000002eu,
0x0000012du,0x00000051u,0x00000031u,0x0004002bu,0x00000013u,0x0000017bu,0x40000000u,0x0004002bu,
0x00000013u,0x00000189u,0x358637bdu,0x0004002bu,0x00000013u,0x00000193u,0xbf000000u,0x0004002bu,
0x0000000au,0x000001b2u,0x00000010u,0x0006002cu,0x0000000bu,0x000001b3u,0x000001b2u,0x000001b2u,
0x00000024u,0x0005002cu,0x0000002eu,0x000001efu,0x00000031u,0x00000031u,0x0005002cu,0x0000002eu,
0x000001f0u,0x00000039u,0x00000039u,0x00040017u,0x000001fbu,0x00000019u,0x00000002u,0x00050036u,
0x00000002u,0x00000004u,0x00000000u,0x00000003u,0x000200f8u,0x00000005u,0x0004003bu,0x0000007au,
0x0000007bu,0x00000007u,0x000300f7u,0x000001b4u,0x00000000u,0x000300fbu,0x0000001au,0x000001b5u,
0x000200f8u,0x000001b5u,0x0004003du,0x0000000bu,0x0000000fu,0x0000000du,0x0007004fu,0x0000000eu,
0x00000010u,0x0000000fu,0x0000000fu,0x00000000u,0x00000001u,0x0004007cu,0x00000007u,0x00000011u,
0x00000010u,0x0004003du,0x00000014u,0x00000017u,0x00000016u,0x00040068u,0x00000007u,0x00000018u,
0x00000017u,0x00050051u,0x00000006u,0x0000001du,0x00000011u,0x00000000u,0x00050051u,0x00000006u,
0x0000001fu,0x00000018u,0x00000000u,0x000500afu,0x00000019u,0x00000020u,0x0000001du,0x0000001fu,
0x000400a8u,0x00000019u,0x00000021u,0x00000020u,0x000300f7u,0x00000023u,0x00000000u,0x000400fau,
0x00000021u,0x00000022u,0x00000023u,0x000200f8u,0x00000022u,0x00050051u,0x00000006u,0x00000026u,
0x00000011u,0x00000001u,0x00050051u,0x00000006u,0x00000028u,0x00000018u,0x00000001u,0x000500afu,
0x00000019u,0x00000029u,0x00000026u,0x00000028u,0x000200f9u,0x00000023u,0x000200f8u,0x00000023u,
0x000700f5u,0x00000019u,0x0000002au,0x00000020u,0x000001b5u,0x00000029u,0x00000022u,0x000300f7u,
0x0000002cu,0x00000000u,0x000400fau,0x0000002au,0x0000002bu,0x0000002cu,0x000200f8u,0x0000002bu,
0x000200f9u,0x000001b4u,0x000200f8u,0x0000002cu,0x0004006fu,0x0000002eu,0x00000033u,0x00000018u,
0x00050088u,0x0000002eu,0x00000035u,0x000001efu,0x00000033u,0x0004006fu,0x0000002eu,0x00000038u,
0x00000011u,0x00050081u,0x0000002eu,0x0000003bu,0x00000038u,0x000001f0u,0x00050085u,0x0000002eu,
0x0000003du,0x0000003bu,0x00000035u,0x00050041u,0x00000044u,0x00000045u,0x00000042u,0x00000043u,
0x0004003du,0x0000000au,0x00000046u,0x00000045u,0x00040070u,0x00000013u,0x00000047u,0x00000046u,
0x0004007fu,0x00000013u,0x00000048u,0x00000047u,0x0006000cu,0x00000013u,0x00000049u,0x00000001u,
0x0000001du,0x00000048u,0x0004003du,0x0000004cu,0x0000004fu,0x0000004eu,0x00070058u,0x00000052u,
0x00000053u,0x0000004fu,0x0000003du,0x00000002u,0x00000051u,0x0007004fu,0x0000002eu,0x00000054u,
0x00000053u,0x00000053u,0x00000000u,0x00000001u,0x0005008eu,0x0000002eu,0x00000058u,0x00000054u,
0x00000049u,0x000200f9u,0x0000005bu,0x000200f8u,0x0000005bu,0x000700f5u,0x00000006u,0x000001beu,
0x0000005au,0x0000002cu,0x0000008au,0x0000005eu,0x000500b3u,0x00000019u,0x00000061u,0x000001beu,
0x00000043u,0x000400f6u,0x0000005du,0x0000005eu,0x00000000u,0x000400fau,0x00000061u,0x0000005cu,
0x0000005du,0x000200f8u,0x0000005cu,0x000200f9u,0x00000063u,0x000200f8u,0x00000063u,0x000700f5u,
0x00000006u,0x000001e4u,0x0000005au,0x0000005cu,0x00000070u,0x00000064u,0x000500b3u,0x00000019u,
0x00000069u,0x000001e4u,0x00000043u,0x000400f6u,0x00000065u,0x00000064u,0x00000000u,0x000400fau,
0x00000069u,0x00000064u,0x00000065u,0x000200f8u,0x00000064u,0x00050080u,0x00000006u,0x0000006cu,
0x000001beu,0x00000043u,0x00050084u,0x00000006u,0x0000006eu,0x0000006cu,0x0000006du,0x00050080u,
0x00000006u,0x00000070u,0x000001e4u,0x00000043u,0x00050080u,0x00000006u,0x00000071u,0x0000006eu,
0x00000070u,0x0004006fu,0x00000013u,0x00000074u,0x000001e4u,0x0004006fu,0x00000013u,0x00000076u,
0x000001beu,0x00050050u,0x0000002eu,0x00000077u,0x00000074u,0x00000076u,0x0004003du,0x0000004cu,
0x0000007eu,0x0000007du,0x00050085u,0x0000002eu,0x00000082u,0x00000077u,0x00000035u,0x00050081u,
0x0000002eu,0x00000083u,0x0000003du,0x00000082u,0x00070058u,0x00000052u,0x00000084u,0x0000007eu,
0x00000083u,0x00000002u,0x00000051u,0x00050051u,0x00000013u,0x00000085u,0x00000084u,0x00000000u,
0x00050041u,0x0000003eu,0x00000086u,0x0000007bu,0x00000071u,0x0003003eu,0x00000086u,0x00000085u,
0x000200f9u,0x00000063u,0x000200f8u,0x00000065u,0x000200f9u,0x0000005eu,0x000200f8u,0x0000005eu,
0x00050080u,0x00000006u,0x0000008au,0x000001beu,0x00000043u,0x000200f9u,0x0000005bu,0x000200f8u,
0x0000005du,0x000200f9u,0x00000091u,0x000200f8u,0x00000091u,0x000700f5u,0x0000002eu,0x000001cfu,
0x00000058u,0x0000005du,0x000001e6u,0x00000094u,0x000700f5u,0x00000013u,0x000001c0u,0x0000008cu,
0x0000005du,0x000001dfu,0x00000094u,0x000700f5u,0x00000006u,0x000001bfu,0x00000090u,0x0000005du,
0x000000f3u,0x00000094u,0x000500b3u,0x00000019u,0x00000097u,0x000001bfu,0x0000006du,0x000400f6u,
0x00000093u,0x00000094u,0x00000000u,0x000400fau,0x00000097u,0x00000092u,0x00000093u,0x000200f8u,
0x00000092u,0x000200f9u,0x00000099u,0x000200f8u,0x00000099u,0x000700f5u,0x00000013u,0x000001dfu,
0x000001c0u,0x00000092u,0x000001fau,0x0000009cu,0x000700f5u,0x00000006u,0x000001d8u,0x00000090u,
0x00000092u,0x000000f1u,0x0000009cu,0x000700f5u,0x0000002eu,0x000001e6u,0x000001cfu,0x00000092u,
0x000001fdu,0x0000009cu,0x000500b3u,0x00000019u,0x0000009fu,0x000001d8u,0x0000006du,0x000400f6u,
0x0000009bu,0x0000009cu,0x00000000u,0x000400fau,0x0000009fu,0x0000009au,0x0000009bu,0x000200f8u,
0x0000009au,0x0004006fu,0x00000013u,0x000000a3u,0x000001d8u,0x0004006fu,0x00000013u,0x000000a5u,
0x000001bfu,0x00050050u,0x0000002eu,0x000000a6u,0x000000a3u,0x000000a5u,0x00050081u,0x0000002eu,
0x000000a7u,0x00000058u,0x000000a6u,0x000200f9u,0x000000aau,0x000200f8u,0x000000aau,0x000700f5u,
0x00000013u,0x000001ddu,0x00000051u,0x0000009au,0x000001e3u,0x000000adu,0x000700f5u,0x00000006u,
0x000001dau,0x0000005au,0x0000009au,0x000000ddu,0x000000adu,0x000500b3u,0x00000019u,0x000000b0u,
0x000001dau,0x00000043u,0x000400f6u,0x000000acu,0x000000adu,0x00000000u,0x000400fau,0x000000b0u,
0x000000abu,0x000000acu,0x000200f8u,0x000000abu,0x000200f9u,0x000000b2u,0x000200f8u,0x000000b2u,
0x000700f5u,0x00000013u,0x000001e3u,0x000001ddu,0x000000abu,0x000000d9u,0x000000b3u,0x000700f5u,
0x00000006u,0x000001e1u,0x0000005au,0x000000abu,0x000000c4u,0x000000b3u,0x000500b3u,0x00000019u,
0x000000b8u,0x000001e1u,0x00000043u,0x000400f6u,0x000000b4u,0x000000b3u,0x00000000u,0x000400fau,
0x000000b8u,0x000000b3u,0x000000b4u,0x000200f8u,0x000000b3u,0x0004006fu,0x00000013u,0x000000bbu,
0x000001e1u,0x0004006fu,0x00000013u,0x000000bdu,0x000001dau,0x00050050u,0x0000002eu,0x000000beu,
0x000000bbu,0x000000bdu,0x00050080u,0x00000006u,0x000000c1u,0x000001dau,0x00000043u,0x00050084u,
0x00000006u,0x000000c2u,0x000000c1u,0x0000006du,0x00050080u,0x00000006u,0x000000c4u,0x000001e1u,
0x00000043u,0x00050080u,0x00000006u,0x000000c5u,0x000000c2u,0x000000c4u,0x00050041u,0x0000003eu,
0x000000c6u,0x0000007bu,0x000000c5u,0x0004003du,0x00000013u,0x000000c7u,0x000000c6u,0x0004003du,
0x0000004cu,0x000000cau,0x000000c9u,0x00050081u,0x0000002eu,0x000000ceu,0x000000beu,0x000000a7u,
0x00050085u,0x0000002eu,0x000000d0u,0x000000ceu,0x00000035u,0x00050081u,0x0000002eu,0x000000d1u,
0x0000003du,0x000000d0u,0x00070058u,0x00000052u,0x000000d2u,0x000000cau,0x000000d1u,0x00000002u,
0x00000051u,0x00050051u,0x00000013u,0x000000d3u,0x000000d2u,0x00000000u,0x00050083u,0x00000013u,
0x000000d6u,0x000000c7u,0x000000d3u,0x0006000cu,0x00000013u,0x000000d7u,0x00000001u,0x00000004u,
0x000000d6u,0x00050081u,0x00000013u,0x000000d9u,0x000001e3u,0x000000d7u,0x000200f9u,0x000000b2u,
0x000200f8u,0x000000b4u,0x000200f9u,0x000000adu,0x000200f8u,0x000000adu,0x00050080u,0x00000006u,
0x000000ddu,0x000001dau,0x00000043u,0x000200f9u,0x000000aau,0x000200f8u,0x000000acu,0x0006000cu,
0x00000013u,0x000000e1u,0x00000001u,0x00000004u,0x000000a3u,0x0006000cu,0x00000013u,0x000000e4u,
0x00000001u,0x00000004u,0x000000a5u,0x00050081u,0x00000013u,0x000000e5u,0x000000e1u,0x000000e4u,
0x00050085u,0x00000013u,0x000000e6u,0x000000deu,0x000000e5u,0x00050081u,0x00000013u,0x000000e8u,
0x000001ddu,0x000000e6u,0x000500b8u,0x00000019u,0x000000ebu,0x000000e8u,0x000001dfu,0x000600a9u,
0x00000013u,0x000001fau,0x000000ebu,0x000000e8u,0x000001dfu,0x00050050u,0x000001fbu,0x000001fcu,
0x000000ebu,0x000000ebu,0x000600a9u,0x0000002eu,0x000001fdu,0x000001fcu,0x000000a7u,0x000001e6u,
0x000200f9u,0x0000009cu,0x000200f8u,0x0000009cu,0x00050080u,0x00000006u,0x000000f1u,0x000001d8u,
0x00000043u,0x000200f9u,0x00000099u,0x000200f8u,0x0000009bu,0x000200f9u,0x00000094u,0x000200f8u,
0x00000094u,0x00050080u,0x00000006u,0x000000f3u,0x000001bfu,0x00000043u,0x000200f9u,0x00000091u,
0x000200f8u,0x00000093u,0x000500aau,0x00000019u,0x000000f6u,0x00000046u,0x0000001au,0x000300f7u,
0x000000f8u,0x00000000u,0x000400fau,0x000000f6u,0x000000f7u,0x000000f8u,0x000200f8u,0x000000f7u,
0x000200f9u,0x00000100u,0x000200f8u,0x00000100u,0x000700f5u,0x00000013u,0x000001c5u,0x00000051u,
0x000000f7u,0x000001d7u,0x00000103u,0x000700f5u,0x00000013u,0x000001c4u,0x00000051u,0x000000f7u,
0x000001d6u,0x00000103u,0x000700f5u,0x00000013u,0x000001c3u,0x00000051u,0x000000f7u,0x000001d5u,
0x00000103u,0x000700f5u,0x00000013u,0x000001c2u,0x00000051u,0x000000f7u,0x000001d4u,0x00000103u,
0x000700f5u,0x00000006u,0x000001c1u,0x0000005au,0x000000f7u,0x0000016eu,0x00000103u,0x000500b3u,
0x00000019u,0x00000106u,0x000001c1u,0x00000043u,0x000400f6u,0x00000102u,0x00000103u,0x00000000u,
0x000400fau,0x00000106u,0x00000101u,0x00000102u,0x000200f8u,0x00000101u,0x000200f9u,0x00000108u,
0x000200f8u,0x00000108u,0x000700f5u,0x00000013u,0x000001d7u,0x000001c5u,0x00000101u,0x0000016au,
0x00000109u,0x000700f5u,0x00000013u,0x000001d6u,0x000001c4u,0x00000101u,0x0000015bu,0x00000109u,
0x000700f5u,0x00000013u,0x000001d5u,0x000001c3u,0x00000101u,0x0000014cu,0x00000109u,0x000700f5u,
0x00000013u,0x000001d4u,0x000001c2u,0x00000101u,0x0000013du,0x00000109u,0x000700f5u,0x00000006u,
0x000001d1u,0x0000005au,0x00000101u,0x0000011au,0x00000109u,0x000500b3u,0x00000019u,0x0000010eu,
0x000001d1u,0x00000043u,0x000400f6u,0x0000010au,0x00000109u,0x00000000u,0x000400fau,0x0000010eu,
0x00000109u,0x0000010au,0x000200f8u,0x00000109u,0x0004006fu,0x00000013u,0x00000111u,0x000001d1u,
0x0004006fu,0x00000013u,0x00000113u,0x000001c1u,0x00050050u,0x0000002eu,0x00000114u,0x00000111u,
0x00000113u,0x00050080u,0x00000006u,0x00000117u,0x000001c1u,0x00000043u,0x00050084u,0x00000006u,
0x00000118u,0x00000117u,0x0000006du,0x00050080u,0x00000006u,0x0000011au,0x000001d1u,0x00000043u,
0x00050080u,0x00000006u,0x0000011bu,0x00000118u,0x0000011au,0x00050041u,0x0000003eu,0x0000011cu,
0x0000007bu,0x0000011bu,0x0004003du,0x00000013u,0x0000011du,0x0000011cu,0x00050081u,0x0000002eu,
0x00000122u,0x000001cfu,0x00000121u,0x00050081u,0x0000002eu,0x00000126u,0x000001cfu,0x00000125u,
0x00050081u,0x0000002eu,0x0000012au,0x000001cfu,0x00000129u,0x00050081u,0x0000002eu,0x0000012eu,
0x000001cfu,0x0000012du,0x0004003du,0x0000004cu,0x00000130u,0x000000c9u,0x00050081u,0x0000002eu,
0x00000134u,0x00000114u,0x00000122u,0x00050085u,0x0000002eu,0x00000136u,0x00000134u,0x00000035u,
0x00050081u,0x0000002eu,0x00000137u,0x0000003du,0x00000136u,0x00070058u,0x00000052u,0x00000138u,
0x00000130u,0x00000137u,0x00000002u,0x00000051u,0x00050051u,0x00000013u,0x00000139u,0x00000138u,
0x00000000u,0x00050083u,0x00000013u,0x0000013au,0x0000011du,0x00000139u,0x0006000cu,0x00000013u,
0x0000013bu,0x00000001u,0x00000004u,0x0000013au,0x00050081u,0x00000013u,0x0000013du,0x000001d4u,
0x0000013bu,0x0004003du,0x0000004cu,0x0000013fu,0x000000c9u,0x00050081u,0x0000002eu,0x00000143u,
0x00000114u,0x00000126u,0x00050085u,0x0000002eu,0x00000145u,0x00000143u,0x00000035u,0x00050081u,
0x0000002eu,0x00000146u,0x0000003du,0x00000145u,0x00070058u,0x00000052u,0x00000147u,0x0000013fu,
0x00000146u,0x00000002u,0x00000051u,0x00050051u,0x00000013u,0x00000148u,0x00000147u,0x00000000u,
0x00050083u,0x00000013u,0x00000149u,0x0000011du,0x00000148u,0x0006000cu,0x00000013u,0x0000014au,
0x00000001u,0x00000004u,0x00000149u,0x00050081u,0x00000013u,0x0000014cu,0x000001d5u,0x0000014au,
0x0004003du,0x0000004cu,0x0000014eu,0x000000c9u,0x00050081u,0x0000002eu,0x00000152u,0x00000114u,
0x0000012au,0x00050085u,0x0000002eu,0x00000154u,0x00000152u,0x00000035u,0x00050081u,0x0000002eu,
0x00000155u,0x0000003du,0x00000154u,0x00070058u,0x00000052u,0x00000156u,0x0000014eu,0x00000155u,
0x00000002u,0x00000051u,0x00050051u,0x00000013u,0x00000157u,0x00000156u,0x00000000u,0x00050083u,
0x00000013u,0x00000158u,0x0000011du,0x00000157u,0x0006000cu,0x00000013u,0x00000159u,0x00000001u,
0x00000004u,0x00000158u,0x00050081u,0x00000013u,0x0000015bu,0x000001d6u,0x00000159u,0x0004003du,
0x0000004cu,0x0000015du,0x000000c9u,0x00050081u,0x0000002eu,0x00000161u,0x00000114u,0x0000012eu,
0x00050085u,0x0000002eu,0x00000163u,0x00000161u,0x00000035u,0x00050081u,0x0000002eu,0x00000164u,
0x0000003du,0x00000163u,0x00070058u,0x00000052u,0x00000165u,0x0000015du,0x00000164u,0x00000002u,
0x00000051u,0x00050051u,0x00000013u,0x00000166u,0x00000165u,0x00000000u,0x00050083u,0x00000013u,
0x00000167u,0x0000011du,0x00000166u,0x0006000cu,0x00000013u,0x00000168u,0x00000001u,0x00000004u,
0x00000167u,0x00050081u,0x00000013u,0x0000016au,0x000001d7u,0x00000168u,0x000200f9u,0x00000108u,
0x000200f8u,0x0000010au,0x000200f9u,0x00000103u,0x000200f8u,0x00000103u,0x00050080u,0x00000006u,
0x0000016eu,0x000001c1u,0x00000043u,0x000200f9u,0x00000100u,0x000200f8u,0x00000102u,0x00050081u,
0x00000013u,0x00000170u,0x000001c2u,0x000000deu,0x00050081u,0x00000013u,0x00000172u,0x000001c3u,
0x000000deu,0x00050081u,0x00000013u,0x00000174u,0x000001c4u,0x000000deu,0x00050081u,0x00000013u,
0x00000176u,0x000001c5u,0x000000deu,0x00050085u,0x00000013u,0x0000017du,0x0000017bu,0x000001c0u,
0x00050083u,0x00000013u,0x0000017eu,0x00000170u,0x0000017du,0x00050081u,0x00000013u,0x00000180u,
0x0000017eu,0x00000172u,0x00050083u,0x00000013u,0x00000185u,0x00000174u,0x0000017du,0x00050081u,
0x00000013u,0x00000187u,0x00000185u,0x00000176u,0x000500bau,0x00000019u,0x0000018au,0x00000180u,
0x00000189u,0x000300f7u,0x0000018cu,0x00000000u,0x000400fau,0x0000018au,0x0000018bu,0x0000018cu,
0x000200f8u,0x0000018bu,0x00050083u,0x00000013u,0x000001f8u,0x000001c2u,0x000001c3u,0x00050085u,
0x00000013u,0x00000190u,0x00000039u,0x000001f8u,0x00050088u,0x00000013u,0x00000192u,0x00000190u,
0x00000180u,0x0008000cu,0x00000013u,0x00000194u,0x00000001u,0x0000002bu,0x00000192u,0x00000193u,
0x00000039u,0x000200f9u,0x0000018cu,0x000200f8u,0x0000018cu,0x000700f5u,0x00000013u,0x000001c9u,
0x00000051u,0x00000102u,0x00000194u,0x0000018bu,0x000500bau,0x00000019u,0x00000196u,0x00000187u,
0x00000189u,0x000300f7u,0x00000198u,0x00000000u,0x000400fau,0x00000196u,0x00000197u,0x00000198u,
0x000200f8u,0x00000197u,0x00050083u,0x00000013u,0x000001f9u,0x000001c4u,0x000001c5u,0x00050085u,
0x00000013u,0x0000019cu,0x00000039u,0x000001f9u,0x00050088u,0x00000013u,0x0000019eu,0x0000019cu,
0x00000187u,0x0008000cu,0x00000013u,0x0000019fu,0x00000001u,0x0000002bu,0x0000019eu,0x00000193u,
0x00000039u,0x000200f9u,0x00000198u,0x000200f8u,0x00000198u,0x000700f5u,0x00000013u,0x000001cau,
0x00000051u,0x0000018cu,0x0000019fu,0x00000197u,0x00050050u,0x0000002eu,0x000001a2u,0x000001c9u,
0x000001cau,0x00050081u,0x0000002eu,0x000001a4u,0x000001cfu,0x000001a2u,0x000200f9u,0x000000f8u,
0x000200f8u,0x000000f8u,0x000700f5u,0x0000002eu,0x000001d0u,0x000001cfu,0x00000093u,0x000001a4u,
0x00000198u,0x0006000cu,0x00000013u,0x000001aau,0x00000001u,0x0000001du,0x00000047u,0x0005008eu,
0x0000002eu,0x000001abu,0x000001d0u,0x000001aau,0x0004003du,0x00000014u,0x000001acu,0x00000016u,
0x00050051u,0x00000013u,0x000001afu,0x000001abu,0x00000000u,0x00050051u,0x00000013u,0x000001b0u,
0x000001abu,0x00000001u,0x00070050u,0x00000052u,0x000001b1u,0x000001afu,0x000001b0u,0x00000051u,
0x00000051u,0x00040063u,0x000001acu,0x00000011u,0x000001b1u,0x000200f9u,0x000001b4u,0x000200f8u,
0x000001b4u,0x000100fdu,0x00010038u
};
static const size_t OF3_FLOW_LEN = sizeof(OF3_FLOW_SPV) / sizeof(OF3_FLOW_SPV[0]);
static const uint32_t OF3_EXPAND_SPV[] = {0x07230203u,0x00010300u,0x0008000bu,0x00000124u,0x00000000u,0x00020011u,0x00000001u,0x00020011u,0x00000032u,0x0006000bu,0x00000001u,0x4c534c47u,0x6474732eu,0x3035342eu,0x00000000u,0x0003000eu,0x00000000u,0x00000001u,0x0006000fu,0x00000005u,0x00000004u,0x6e69616du,0x00000000u,0x00000049u,0x00060010u,0x00000004u,0x00000011u,0x00000010u,0x00000010u,0x00000001u,0x00030003u,0x00000002u,0x000001c2u,0x00040005u,0x00000004u,0x6e69616du,0x00000000u,0x00080005u,0x0000000eu,0x3564656du,0x3b316628u,0x663b3166u,0x31663b31u,0x3b31663bu,0x00000000u,0x00030005u,0x00000009u,0x00000061u,0x00030005u,0x0000000au,0x00000062u,0x00030005u,0x0000000bu,0x00000063u,0x00030005u,0x0000000cu,0x00000064u,0x00030005u,0x0000000du,0x00000065u,0x00030005u,0x00000010u,0x00000078u,0x00030005u,0x00000034u,0x00000079u,0x00030005u,0x00000045u,0x00646967u,0x00080005u,0x00000049u,0x475f6c67u,0x61626f6cu,0x766e496cu,0x7461636fu,0x496e6f69u,0x00000044u,0x00030005u,0x0000004eu,0x006d6964u,0x00040005u,0x00000051u,0x64774675u,0x00000000u,0x00030005u,0x0000006bu,0x00007675u,0x00030005u,0x00000074u,0x00007366u,0x00050005u,0x00000079u,0x6f6c4675u,0x6e694677u,0x00000065u,0x00030005u,0x00000081u,0x00000063u,0x00030005u,0x00000088u,0x00006d78u,0x00030005u,0x00000091u,0x00007078u,0x00030005u,0x0000009au,0x00006d79u,0x00030005u,0x000000a3u,0x00007079u,0x00030005u,0x000000acu,0x00000064u,0x00040005u,0x000000adu,0x61726170u,0x0000006du,0x00040005u,0x000000b0u,0x61726170u,0x0000006du,0x00040005u,0x000000b3u,0x61726170u,0x0000006du,0x00040005u,0x000000b6u,0x61726170u,0x0000006du,0x00040005u,0x000000b9u,0x61726170u,0x0000006du,0x00040005u,0x000000bdu,0x61726170u,0x0000006du,0x00040005u,0x000000c0u,0x61726170u,0x0000006du,0x00040005u,0x000000c3u,0x61726170u,0x0000006du,0x00040005u,0x000000c6u,0x61726170u,0x0000006du,0x00040005u,0x000000c9u,0x61726170u,0x0000006du,0x00030005u,0x000000ceu,0x00000071u,0x00030005u,0x000000d2u,0x00787067u,0x00030005u,0x000000d3u,0x00004d47u,0x00050006u,0x000000d3u,0x00000000u,0x694c6d67u,0x0000006eu,0x00050006u,0x000000d3u,0x00000001u,0x694c6d67u,0x0000546eu,0x00050006u,0x000000d3u,0x00000002u,0x70416d67u,0x00000070u,0x00050006u,0x000000d3u,0x00000003u,0x70416d67u,0x00005470u,0x00030005u,0x000000d5u,0x00000000u,0x00030005u,0x000000fdu,0x00003241u,0x00040005u,0x0000010bu,0x6c6c7566u,0x00000000u,0x00040005u,0x00000117u,0x64774275u,0x00000000u,0x00030005u,0x00000121u,0x00000055u,0x00060006u,0x00000121u,0x00000000u,0x776f6c66u,0x6c616353u,0x00000065u,0x00050006u,0x00000121u,0x00000001u,0x6576656cu,0x0000006cu,0x00050006u,0x00000121u,0x00000002u,0x30646170u,0x00000000u,0x00050006u,0x00000121u,0x00000003u,0x31646170u,0x00000000u,0x00030005u,0x00000123u,0x00000000u,0x00040047u,0x00000049u,0x0000000bu,0x0000001cu,0x00030047u,0x00000051u,0x00000019u,0x00040047u,0x00000051u,0x00000021u,0x00000030u,0x00040047u,0x00000051u,0x00000022u,0x00000000u,0x00040047u,0x00000079u,0x00000021u,0x00000020u,0x00040047u,0x00000079u,0x00000022u,0x00000000u,0x00030047u,0x000000d3u,0x00000002u,0x00050048u,0x000000d3u,0x00000000u,0x00000023u,0x00000000u,0x00050048u,0x000000d3u,0x00000001u,0x00000023u,0x00000010u,0x00050048u,0x000000d3u,0x00000002u,0x00000023u,0x00000020u,0x00050048u,0x000000d3u,0x00000003u,0x00000023u,0x00000030u,0x00040047u,0x000000d5u,0x00000021u,0x00000001u,0x00040047u,0x000000d5u,0x00000022u,0x00000000u,0x00030047u,0x00000117u,0x00000019u,0x00040047u,0x00000117u,0x00000021u,0x00000031u,0x00040047u,0x00000117u,0x00000022u,0x00000000u,0x00040047u,0x00000120u,0x0000000bu,0x00000019u,0x00030047u,0x00000121u,0x00000002u,0x00050048u,0x00000121u,0x00000000u,0x00000023u,0x00000000u,0x00050048u,0x00000121u,0x00000001u,0x00000023u,0x00000004u,0x00050048u,0x00000121u,0x00000002u,0x00000023u,0x00000008u,0x00050048u,0x00000121u,0x00000003u,0x00000023u,0x0000000cu,0x00040047u,0x00000123u,0x00000021u,0x00000000u,0x00040047u,0x00000123u,0x00000022u,0x00000000u,0x00020013u,0x00000002u,0x00030021u,0x00000003u,0x00000002u,0x00030016u,0x00000006u,0x00000020u,0x00040020u,0x00000007u,0x00000007u,0x00000006u,0x00080021u,0x00000008u,0x00000006u,0x00000007u,0x00000007u,0x00000007u,0x00000007u,0x00000007u,0x00040015u,0x00000042u,0x00000020u,0x00000001u,0x00040017u,0x00000043u,0x00000042u,0x00000002u,0x00040020u,0x00000044u,0x00000007u,0x00000043u,0x00040015u,0x00000046u,0x00000020u,0x00000000u,0x00040017u,0x00000047u,0x00000046u,0x00000003u,0x00040020u,0x00000048u,0x00000001u,0x00000047u,0x0004003bu,0x00000048u,0x00000049u,0x00000001u,0x00040017u,0x0000004au,0x00000046u,0x00000002u,0x00090019u,0x0000004fu,0x00000006u,0x00000001u,0x00000000u,0x00000000u,0x00000000u,0x00000002u,0x00000002u,0x00040020u,0x00000050u,0x00000000u,0x0000004fu,0x0004003bu,0x00000050u,0x00000051u,0x00000000u,0x00020014u,0x00000054u,0x0004002bu,0x00000046u,0x00000055u,0x00000000u,0x00040020u,0x00000056u,0x00000007u,0x00000042u,0x0004002bu,0x00000046u,0x0000005fu,0x00000001u,0x00040017u,0x00000069u,0x00000006u,0x00000002u,0x00040020u,0x0000006au,0x00000007u,0Line truncated
static const size_t OF3_EXPAND_LEN = 1798;
static const uint32_t OF3_FLOW_M4_SPV[] = {0x07230203u,0x00010300u,0x0008000bu,0x00000151u,0x00000000u,0x00020011u,0x00000001u,0x00020011u,0x00000032u,0x0006000bu,0x00000001u,0x4c534c47u,0x6474732eu,0x3035342eu,0x00000000u,0x0003000eu,0x00000000u,0x00000001u,0x0006000fu,0x00000005u,0x00000004u,0x6e69616du,0x00000000u,0x000000f6u,0x00060010u,0x00000004u,0x00000011u,0x00000010u,0x00000010u,0x00000001u,0x00030003u,0x00000002u,0x000001c2u,0x00040005u,0x00000004u,0x6e69616du,0x00000000u,0x00080005u,0x00000010u,0x636f6c62u,0x6461536bu,0x31327328u,0x3132733bu,0x3266763bu,0x0000003bu,0x00030005u,0x0000000du,0x00000061u,0x00030005u,0x0000000eu,0x00000062u,0x00040005u,0x0000000fu,0x646e6163u,0x00000000u,0x00070005u,0x00000016u,0x766c6f73u,0x32732865u,0x32733b31u,0x66763b31u,0x00003b32u,0x00030005u,0x00000013u,0x00000061u,0x00030005u,0x00000014u,0x00000062u,0x00040005u,0x00000015u,0x64657270u,0x00000000u,0x00030005u,0x00000019u,0x00646173u,0x00030005u,0x0000001du,0x00007962u,0x00030005u,0x00000028u,0x00007862u,0x00030005u,0x00000030u,0x00006f62u,0x00030005u,0x00000036u,0x00006170u,0x00030005u,0x00000039u,0x00765567u,0x00050005u,0x0000003cu,0x766e4967u,0x616d754cu,0x00000000u,0x00030005u,0x00000045u,0x00006270u,0x00040005u,0x0000005du,0x74736562u,0x00646153u,0x00050005u,0x0000005fu,0x74736562u,0x70736944u,0x00000000u,0x00030005u,0x00000061u,0x00007973u,0x00030005u,0x0000006bu,0x00007873u,0x00040005u,0x00000073u,0x646e6163u,0x00000000u,0x00030005u,0x0000007bu,0x00646173u,0x00040005u,0x0000007cu,0x61726170u,0x0000006du,0x00030005u,0x00000095u,0x00000055u,0x00060006u,0x00000095u,0x00000000u,0x776f6c66u,0x6c616353u,0x00000065u,0x00050006u,0x00000095u,0x00000001u,0x6576656cu,0x0000006cu,0x00050006u,0x00000095u,0x00000002u,0x6c63636fu,0x00006f4cu,0x00050006u,0x00000095u,0x00000003u,0x6c63636fu,0x00006948u,0x00030005u,0x00000097u,0x00000000u,0x00040005u,0x0000009eu,0x43646173u,0x00000000u,0x00040005u,0x000000a1u,0x58646173u,0x0000006du,0x00040005u,0x000000a6u,0x61726170u,0x0000006du,0x00040005u,0x000000a9u,0x58646173u,0x00000070u,0x00040005u,0x000000aeu,0x61726170u,0x0000006du,0x00040005u,0x000000b1u,0x59646173u,0x0000006du,0x00040005u,0x000000b5u,0x61726170u,0x0000006du,0x00040005u,0x000000b8u,0x59646173u,0x00000070u,0x00040005u,0x000000bcu,0x61726170u,0x0000006du,0x00030005u,0x000000bfu,0x00007864u,0x00030005u,0x000000c0u,0x00007964u,0x00040005u,0x000000c1u,0x6f6e6564u,0x0000586du,0x00040005u,0x000000c9u,0x6f6e6564u,0x0000596du,0x00030005u,0x000000f3u,0x00646967u,0x00080005u,0x000000f6u,0x475f6c67u,0x61626f6cu,0x766e496cu,0x7461636fu,0x496e6f69u,0x00000044u,0x00030005u,0x000000fbu,0x006d6964u,0x00040005u,0x000000feu,0x6f6c4675u,0x00000077u,0x00050005u,0x0000011au,0x6d754c75u,0x72754361u,0x00000072u,0x00040005u,0x00000122u,0x654c6f74u,0x006c6576u,0x00040005u,0x00000129u,0x64657270u,0x00000000u,0x00050005u,0x0000012au,0x65725075u,0x74636964u,0x0000726fu,0x00030005u,0x0000012eu,0x00647766u,0x00050005u,0x0000012fu,0x6d754c75u,0x65725061u,0x00000076u,0x00040005u,0x00000134u,0x61726170u,0x0000006du,0x00030005u,0x00000136u,0x00647762u,0x00040005u,0x0000013bu,0x61726170u,0x0000006du,0x00040005u,0x0000013du,0x75466f74u,0x00006c6cu,0x00030047u,0x00000095u,0x00000002u,0x00050048u,0x00000095u,0x00000000u,0x00000023u,0x00000000u,0x00050048u,0x00000095u,0x00000001u,0x00000023u,0x00000004u,0x00050048u,0x00000095u,0x00000002u,0x00000023u,0x00000008u,0x00050048u,0x00000095u,0x00000003u,0x00000023u,0x0000000cu,0x00040047u,0x00000097u,0x00000021u,0x00000000u,0x00040047u,0x00000097u,0x00000022u,0x00000000u,0x00040047u,0x000000f6u,0x0000000bu,0x0000001cu,0x00030047u,0x000000feu,0x00000019u,0x00040047u,0x000000feu,0x00000021u,0x00000030u,0x00040047u,0x000000feu,0x00000022u,0x00000000u,0x00040047u,0x0000011au,0x00000021u,0x00000021u,0x00040047u,0x0000011au,0x00000022u,0x00000000u,0x00040047u,0x0000012au,0x00000021u,0x00000022u,0x00040047u,0x0000012au,0x00000022u,0x00000000u,0x00040047u,0x0000012fu,0x00000021u,0x00000020u,0x00040047u,0x0000012fu,0x00000022u,0x00000000u,0x00040047u,0x00000150u,0x0000000bu,0x00000019u,0x00020013u,0x00000002u,0x00030021u,0x00000003u,0x00000002u,0x00030016u,0x00000006u,0x00000020u,0x00090019u,0x00000007u,0x00000006u,0x00000001u,0x00000000u,0x00000000u,0x00000000u,0x00000001u,0x00000000u,0x0003001bu,0x00000008u,0x00000007u,0x00040020u,0x00000009u,0x00000000u,0x00000008u,0x00040017u,0x0000000au,0x00000006u,0x00000002u,0x00040020u,0x0000000bu,0x00000007u,0x0000000au,0x00060021u,0x0000000cu,0x00000006u,0x00000009u,0x00000009u,0x0000000bu,0x00060021u,0x00000012u,0x0000000au,0x00000009u,0x00000009u,0x0000000bu,0x00040020u,0x00000018u,0x00000007u,0x00000006u,0x0004002bu,0x00000006u,0x0000001au,0x00000000u,0x00040015u,0x0000001bu,0x00000020u,0x00000001u,0x00040020u,0x0000001cu,0x00000007u,0x0000001bu,0x0004002bu,0x0000001bu,0x0000001eu,0xffffffffu,0x0004002bu,0x0000001bu,0x00000025u,0x00000001u,0x00020014u,0x00000026u,0x00040020u,0x00000038u,0x00000006u,0x0000000au,0x0004003bu,0x00000038u,0x00000039u,0x00000006u,0x0004003bu,Line truncated
@@ -18,8 +226,8 @@ static const uint32_t OF3_GM_REDUCE_SPV[] = {0x07230203u,0x00010300u,0x0008000bu
static const size_t OF3_GM_REDUCE_LEN = 2584;
static const uint32_t OF3_GM_PREWARP_SPV[] = {0x07230203u,0x00010300u,0x0008000bu,0x00000074u,0x00000000u,0x00020011u,0x00000001u,0x00020011u,0x00000032u,0x0006000bu,0x00000001u,0x4c534c47u,0x6474732eu,0x3035342eu,0x00000000u,0x0003000eu,0x00000000u,0x00000001u,0x0006000fu,0x00000005u,0x00000004u,0x6e69616du,0x00000000u,0x0000000du,0x00060010u,0x00000004u,0x00000011u,0x00000010u,0x00000010u,0x00000001u,0x00030003u,0x00000002u,0x000001c2u,0x00040005u,0x00000004u,0x6e69616du,0x00000000u,0x00030005u,0x00000009u,0x00646967u,0x00080005u,0x0000000du,0x475f6c67u,0x61626f6cu,0x766e496cu,0x7461636fu,0x496e6f69u,0x00000044u,0x00030005u,0x00000012u,0x006d6964u,0x00040005u,0x00000016u,0x74734475u,0x00000000u,0x00030005u,0x00000030u,0x00007675u,0x00030005u,0x00000039u,0x00000071u,0x00040005u,0x0000003du,0x6c6f6370u,0x00000030u,0x00030005u,0x0000003fu,0x00004d47u,0x00050006u,0x0000003fu,0x00000000u,0x694c6d67u,0x0000006eu,0x00050006u,0x0000003fu,0x00000001u,0x694c6d67u,0x0000546eu,0x00050006u,0x0000003fu,0x00000002u,0x70416d67u,0x00000070u,0x00050006u,0x0000003fu,0x00000003u,0x70416d67u,0x00005470u,0x00030005u,0x00000041u,0x00000000u,0x00040005u,0x00000049u,0x6c6f6370u,0x00000031u,0x00040005u,0x00000051u,0x72537675u,0x00000063u,0x00030005u,0x00000064u,0x00000076u,0x00040005u,0x00000068u,0x72754375u,0x00000072u,0x00040047u,0x0000000du,0x0000000bu,0x0000001cu,0x00030047u,0x00000016u,0x00000019u,0x00040047u,0x00000016u,0x00000021u,0x00000030u,0x00040047u,0x00000016u,0x00000022u,0x00000000u,0x00030047u,0x0000003fu,0x00000002u,0x00050048u,0x0000003fu,0x00000000u,0x00000023u,0x00000000u,0x00050048u,0x0000003fu,0x00000001u,0x00000023u,0x00000010u,0x00050048u,0x0000003fu,0x00000002u,0x00000023u,0x00000020u,0x00050048u,0x0000003fu,0x00000003u,0x00000023u,0x00000030u,0x00040047u,0x00000041u,0x00000021u,0x00000001u,0x00040047u,0x00000041u,0x00000022u,0x00000000u,0x00040047u,0x00000068u,0x00000021u,0x00000020u,0x00040047u,0x00000068u,0x00000022u,0x00000000u,0x00040047u,0x00000073u,0x0000000bu,0x00000019u,0x00020013u,0x00000002u,0x00030021u,0x00000003u,0x00000002u,0x00040015u,0x00000006u,0x00000020u,0x00000001u,0x00040017u,0x00000007u,0x00000006u,0x00000002u,0x00040020u,0x00000008u,0x00000007u,0x00000007u,0x00040015u,0x0000000au,0x00000020u,0x00000000u,0x00040017u,0x0000000bu,0x0000000au,0x00000003u,0x00040020u,0x0000000cu,0x00000001u,0x0000000bu,0x0004003bu,0x0000000cu,0x0000000du,0x00000001u,0x00040017u,0x0000000eu,0x0000000au,0x00000002u,0x00030016u,0x00000013u,0x00000020u,0x00090019u,0x00000014u,0x00000013u,0x00000001u,0x00000000u,0x00000000u,0x00000000u,0x00000002u,0x00000003u,0x00040020u,0x00000015u,0x00000000u,0x00000014u,0x0004003bu,0x00000015u,0x00000016u,0x00000000u,0x00020014u,0x00000019u,0x0004002bu,0x0000000au,0x0000001au,0x00000000u,0x00040020u,0x0000001bu,0x00000007u,0x00000006u,0x0004002bu,0x0000000au,0x00000024u,0x00000001u,0x00040017u,0x0000002eu,0x00000013u,0x00000002u,0x00040020u,0x0000002fu,0x00000007u,0x0000002eu,0x0004002bu,0x00000013u,0x00000033u,0x3f000000u,0x00040017u,0x0000003eu,0x00000013u,0x00000004u,0x0006001eu,0x0000003fu,0x0000003eu,0x0000003eu,0x0000003eu,0x0000003eu,0x00040020u,0x00000040u,0x00000002u,0x0000003fu,0x0004003bu,0x00000040u,0x00000041u,0x00000002u,0x0004002bu,0x00000006u,0x00000042u,0x00000002u,0x00040020u,0x00000043u,0x00000002u,0x00000013u,0x0004002bu,0x0000000au,0x0000004au,0x00000002u,0x0004002bu,0x0000000au,0x0000004du,0x00000003u,0x00040020u,0x00000054u,0x00000007u,0x00000013u,0x0004002bu,0x00000006u,0x0000005eu,0x00000003u,0x00040020u,0x0000005fu,0x00000002u,0x0000003eu,0x00090019u,0x00000065u,0x00000013u,0x00000001u,0x00000000u,0x00000000u,0x00000000u,0x00000001u,0x00000000u,0x0003001bu,0x00000066u,0x00000065u,0x00040020u,0x00000067u,0x00000000u,0x00000066u,0x0004003bu,0x00000067u,0x00000068u,0x00000000u,0x0004002bu,0x00000013u,0x0000006bu,0x00000000u,0x0004002bu,0x0000000au,0x00000072u,0x00000010u,0x0006002cu,0x0000000bu,0x00000073u,0x00000072u,0x00000072u,0x00000024u,0x00050036u,0x00000002u,0x00000004u,0x00000000u,0x00000003u,0x000200f8u,0x00000005u,0x0004003bu,0x00000008u,0x00000009u,0x00000007u,0x0004003bu,0x00000008u,0x00000012u,0x00000007u,0x0004003bu,0x0000002fu,0x00000030u,0x00000007u,0x0004003bu,0x0000002fu,0x00000039u,0x00000007u,0x0004003bu,0x0000002fu,0x0000003du,0x00000007u,0x0004003bu,0x0000002fu,0x00000049u,0x00000007u,0x0004003bu,0x0000002fu,0x00000051u,0x00000007u,0x0004003bu,0x00000054u,0x00000064u,0x00000007u,0x0004003du,0x0000000bu,0x0000000fu,0x0000000du,0x0007004fu,0x0000000eu,0x00000010u,0x0000000fu,0x0000000fu,0x00000000u,0x00000001u,0x0004007cu,0x00000007u,0x00000011u,0x00000010u,0x0003003eu,0x00000009u,0x00000011u,0x0004003du,0x00000014u,0x00000017u,0x00000016u,0x00040068u,0x00000007u,0x00000018u,0x00000017u,0x0003003eu,0x00000012u,0x00000018u,0x00050041u,0x0000001bu,0x0000001cu,0x00000009u,0x0000001au,0x0004003du,0x00000006u,0x0000001du,0x0000001cu,0x00050041u,0x0000001bu,0x0000001eu,0x00000012u,0x0000001au,0x0004003du,0x00000006u,0x0000001fu,0x0000001Line truncated
static const size_t OF3_GM_PREWARP_LEN = 706;
static const uint32_t OF3_FLOWREG_SPV[] = {0x07230203u,0x00010300u,0x0008000bu,0x00000144u,0x00000000u,0x00020011u,0x00000001u,0x00020011u,0x00000032u,0x0006000bu,0x00000001u,0x4c534c47u,0x6474732eu,0x3035342eu,0x00000000u,0x0003000eu,0x00000000u,0x00000001u,0x0006000fu,0x00000005u,0x00000004u,0x6e69616du,0x00000000u,0x00000037u,0x00060010u,0x00000004u,0x00000011u,0x00000010u,0x00000010u,0x00000001u,0x00030003u,0x00000002u,0x000001c2u,0x00040005u,0x00000004u,0x6e69616du,0x00000000u,0x00060005u,0x0000000eu,0x63746566u,0x76285568u,0x763b3269u,0x003b3269u,0x00030005u,0x0000000cu,0x00000070u,0x00030005u,0x0000000du,0x006d6964u,0x00060005u,0x00000013u,0x63746566u,0x76284c68u,0x763b3269u,0x003b3269u,0x00030005u,0x00000011u,0x00000070u,0x00030005u,0x00000012u,0x006d6964u,0x00040005u,0x00000018u,0x6f6c4675u,0x006e4977u,0x00040005u,0x00000026u,0x6d754c75u,0x00000061u,0x00030005u,0x00000034u,0x00646967u,0x00080005u,0x00000037u,0x475f6c67u,0x61626f6cu,0x766e496cu,0x7461636fu,0x496e6f69u,0x00000044u,0x00030005u,0x0000003cu,0x006d6964u,0x00030005u,0x00000055u,0x00007464u,0x00030005u,0x00000056u,0x00000055u,0x00050006u,0x00000056u,0x00000000u,0x61726170u,0x0000736du,0x00030005u,0x00000058u,0x00000000u,0x00040005u,0x0000005cu,0x626d616cu,0x00006164u,0x00050005u,0x0000005fu,0x65676465u,0x68706c41u,0x00000061u,0x00040005u,0x00000063u,0x54737065u,0x00000056u,0x00030005u,0x00000068u,0x00004375u,0x00040005u,0x00000069u,0x61726170u,0x0000006du,0x00040005u,0x0000006bu,0x61726170u,0x0000006du,0x00030005u,0x0000006eu,0x00004c75u,0x00040005u,0x00000073u,0x61726170u,0x0000006du,0x00040005u,0x00000074u,0x61726170u,0x0000006du,0x00030005u,0x00000077u,0x00005275u,0x00040005u,0x0000007bu,0x61726170u,0x0000006du,0x00040005u,0x0000007cu,0x61726170u,0x0000006du,0x00030005u,0x0000007fu,0x00005575u,0x00040005u,0x00000083u,0x61726170u,0x0000006du,0x00040005u,0x00000084u,0x61726170u,0x0000006du,0x00030005u,0x00000087u,0x00004475u,0x00040005u,0x0000008bu,0x61726170u,0x0000006du,0x00040005u,0x0000008cu,0x61726170u,0x0000006du,0x00040005u,0x0000008fu,0x6d69646cu,0x00000000u,0x00030005u,0x00000093u,0x00004c6cu,0x00040005u,0x00000096u,0x61726170u,0x0000006du,0x00040005u,0x00000097u,0x61726170u,0x0000006du,0x00030005u,0x0000009au,0x0000526cu,0x00040005u,0x0000009du,0x61726170u,0x0000006du,0x00040005u,0x0000009eu,0x61726170u,0x0000006du,0x00030005u,0x000000a1u,0x0000556cu,0x00040005u,0x000000a4u,0x61726170u,0x0000006du,0x00040005u,0x000000a5u,0x61726170u,0x0000006du,0x00030005u,0x000000a8u,0x0000446cu,0x00040005u,0x000000abu,0x61726170u,0x0000006du,0x00040005u,0x000000acu,0x61726170u,0x0000006du,0x00040005u,0x000000afu,0x67616d67u,0x00000000u,0x00030005u,0x000000bbu,0x00000067u,0x00030005u,0x000000c4u,0x00004c64u,0x00030005u,0x000000c8u,0x00005264u,0x00030005u,0x000000ccu,0x00005564u,0x00030005u,0x000000d0u,0x00004464u,0x00030005u,0x000000d4u,0x00003265u,0x00030005u,0x000000d8u,0x00004c77u,0x00030005u,0x000000e1u,0x00005277u,0x00030005u,0x000000eau,0x00005577u,0x00030005u,0x000000f3u,0x00004477u,0x00040005u,0x000000fcu,0x576d7573u,0x00000000u,0x00040005u,0x00000104u,0x576d7573u,0x00000055u,0x00040005u,0x00000114u,0x66694475u,0x00000066u,0x00030005u,0x00000120u,0x00003066u,0x00050005u,0x00000121u,0x6f6c4675u,0x73624f77u,0x00000000u,0x00040005u,0x0000012au,0x74656874u,0x00000061u,0x00030005u,0x0000012eu,0x00000072u,0x00040005u,0x00000132u,0x77654e75u,0x00000000u,0x00050005u,0x0000013eu,0x6f6c4675u,0x74754f77u,0x00000000u,0x00040047u,0x00000018u,0x00000021u,0x00000020u,0x00040047u,0x00000018u,0x00000022u,0x00000000u,0x00040047u,0x00000026u,0x00000021u,0x00000022u,0x00040047u,0x00000026u,0x00000022u,0x00000000u,0x00040047u,0x00000037u,0x0000000bu,0x0000001cu,0x00030047u,0x00000056u,0x00000002u,0x00050048u,0x00000056u,0x00000000u,0x00000023u,0x00000000u,0x00040047u,0x00000058u,0x00000021u,0x00000000u,0x00040047u,0x00000058u,0x00000022u,0x00000000u,0x00040047u,0x00000121u,0x00000021u,0x00000021u,0x00040047u,0x00000121u,0x00000022u,0x00000000u,0x00030047u,0x0000013eu,0x00000019u,0x00040047u,0x0000013eu,0x00000021u,0x00000030u,0x00040047u,0x0000013eu,0x00000022u,0x00000000u,0x00040047u,0x00000143u,0x0000000bu,0x00000019u,0x00020013u,0x00000002u,0x00030021u,0x00000003u,0x00000002u,0x00040015u,0x00000006u,0x00000020u,0x00000001u,0x00040017u,0x00000007u,0x00000006u,0x00000002u,0x00040020u,0x00000008u,0x00000007u,0x00000007u,0x00030016u,0x00000009u,0x00000020u,0x00040017u,0x0000000au,0x00000009u,0x00000004u,0x00050021u,0x0000000bu,0x0000000au,0x00000008u,0x00000008u,0x00050021u,0x00000010u,0x00000009u,0x00000008u,0x00000008u,0x00090019u,0x00000015u,0x00000009u,0x00000001u,0x00000000u,0x00000000u,0x00000000u,0x00000001u,0x00000000u,0x0003001bu,0x00000016u,0x00000015u,0x00040020u,0x00000017u,0x00000000u,0x00000016u,0x0004003bu,0x00000017u,0x00000018u,0x00000000u,0x0004002bu,0x00000006u,0x0000001bu,0x00000000u,0x0005002cu,0x00000007u,0x0000001cu,0x0000001bu,0x0000001bu,0x0004002bu,0x00000006u,0x0000001eu,0x00000001u,0x0004003bu,0x00000017u,0x00000026u,0x00000000u,Line truncated
static const size_t OF3_FLOWREG_LEN = 1936;
static const uint32_t OF3_FLOWREG_SPV[] = {0x07230203u,0x00010300u,0x0008000bu,0x00000196u,0x00000000u,0x00020011u,0x00000001u,0x00020011u,0x00000032u,0x0006000bu,0x00000001u,0x4c534c47u,0x6474732eu,0x3035342eu,0x00000000u,0x0003000eu,0x00000000u,0x00000001u,0x0006000fu,0x00000005u,0x00000004u,0x6e69616du,0x00000000u,0x00000037u,0x00060010u,0x00000004u,0x00000011u,0x00000010u,0x00000010u,0x00000001u,0x00030003u,0x00000002u,0x000001c2u,0x00040005u,0x00000004u,0x6e69616du,0x00000000u,0x00040005u,0x00000018u,0x6f6c4675u,0x006e4977u,0x00040005u,0x00000026u,0x6d754c75u,0x00000061u,0x00080005u,0x00000037u,0x475f6c67u,0x61626f6cu,0x766e496cu,0x7461636fu,0x496e6f69u,0x00000044u,0x00030005u,0x00000056u,0x00000055u,0x00050006u,0x00000056u,0x00000000u,0x61726170u,0x0000736du,0x00030005u,0x00000058u,0x00000000u,0x00050005u,0x00000118u,0x6f6c4675u,0x73624f77u,0x00000000u,0x00050005u,0x00000131u,0x6f6c4675u,0x74754f77u,0x00000000u,0x00040047u,0x00000018u,0x00000021u,0x00000020u,0x00040047u,0x00000018u,0x00000022u,0x00000000u,0x00040047u,0x00000026u,0x00000021u,0x00000022u,0x00040047u,0x00000026u,0x00000022u,0x00000000u,0x00040047u,0x00000037u,0x0000000bu,0x0000001cu,0x00030047u,0x00000056u,0x00000002u,0x00050048u,0x00000056u,0x00000000u,0x00000023u,0x00000000u,0x00040047u,0x00000058u,0x00000021u,0x00000000u,0x00040047u,0x00000058u,0x00000022u,0x00000000u,0x00040047u,0x00000118u,0x00000021u,0x00000021u,0x00040047u,0x00000118u,0x00000022u,0x00000000u,0x00030047u,0x00000131u,0x00000019u,0x00040047u,0x00000131u,0x00000021u,0x00000030u,0x00040047u,0x00000131u,0x00000022u,0x00000000u,0x00040047u,0x00000136u,0x0000000bu,0x00000019u,0x00020013u,0x00000002u,0x00030021u,0x00000003u,0x00000002u,0x00040015u,0x00000006u,0x00000020u,0x00000001u,0x00040017u,0x00000007u,0x00000006u,0x00000002u,0x00030016u,0x00000009u,0x00000020u,0x00040017u,0x0000000au,0x00000009u,0x00000004u,0x00090019u,0x00000015u,0x00000009u,0x00000001u,0x00000000u,0x00000000u,0x00000000u,0x00000001u,0x00000000u,0x0003001bu,0x00000016u,0x00000015u,0x00040020u,0x00000017u,0x00000000u,0x00000016u,0x0004003bu,0x00000017u,0x00000018u,0x00000000u,0x0004002bu,0x00000006u,0x0000001bu,0x00000000u,0x0005002cu,0x00000007u,0x0000001cu,0x0000001bu,0x0000001bu,0x0004002bu,0x00000006u,0x0000001eu,0x00000001u,0x0004003bu,0x00000017u,0x00000026u,0x00000000u,0x00040015u,0x0000002fu,0x00000020u,0x00000000u,0x0004002bu,0x0000002fu,0x00000030u,0x00000000u,0x00040017u,0x00000035u,0x0000002fu,0x00000003u,0x00040020u,0x00000036u,0x00000001u,0x00000035u,0x0004003bu,0x00000036u,0x00000037u,0x00000001u,0x00040017u,0x00000038u,0x0000002fu,0x00000002u,0x00020014u,0x00000040u,0x0004002bu,0x0000002fu,0x0000004au,0x00000001u,0x0003001eu,0x00000056u,0x0000000au,0x00040020u,0x00000057u,0x00000002u,0x00000056u,0x0004003bu,0x00000057u,0x00000058u,0x00000002u,0x00040020u,0x00000059u,0x00000002u,0x00000009u,0x0004002bu,0x0000002fu,0x00000060u,0x00000002u,0x0004002bu,0x0000002fu,0x00000064u,0x00000003u,0x0004002bu,0x00000006u,0x0000006fu,0xffffffffu,0x0005002cu,0x00000007u,0x00000070u,0x0000006fu,0x0000001bu,0x0005002cu,0x00000007u,0x00000078u,0x0000001eu,0x0000001bu,0x0005002cu,0x00000007u,0x00000080u,0x0000001bu,0x0000006fu,0x0005002cu,0x00000007u,0x00000088u,0x0000001bu,0x0000001eu,0x0004002bu,0x00000009u,0x000000abu,0x3f000000u,0x00040017u,0x000000b2u,0x00000009u,0x00000002u,0x0004002bu,0x00000009u,0x000000bcu,0x3d4ccccdu,0x0004002bu,0x00000009u,0x000000bdu,0x3f800000u,0x0004003bu,0x00000017u,0x00000118u,0x00000000u,0x00090019u,0x0000012fu,0x00000009u,0x00000001u,0x00000000u,0x00000000u,0x00000000u,0x00000002u,0x00000002u,0x00040020u,0x00000130u,0x00000000u,0x0000012fu,0x0004003bu,0x00000130u,0x00000131u,0x00000000u,0x0004002bu,0x0000002fu,0x00000135u,0x00000010u,0x0006002cu,0x00000035u,0x00000136u,0x00000135u,0x00000135u,0x0000004au,0x0005002cu,0x00000007u,0x00000195u,0x0000001eu,0x0000001eu,0x00050036u,0x00000002u,0x00000004u,0x00000000u,0x00000003u,0x000200f8u,0x00000005u,0x000300f7u,0x00000137u,0x00000000u,0x000300fbu,0x00000030u,0x00000138u,0x000200f8u,0x00000138u,0x0004003du,0x00000035u,0x00000039u,0x00000037u,0x0007004fu,0x00000038u,0x0000003au,0x00000039u,0x00000039u,0x00000000u,0x00000001u,0x0004007cu,0x00000007u,0x0000003bu,0x0000003au,0x0004003du,0x00000016u,0x0000003du,0x00000018u,0x00040064u,0x00000015u,0x0000003eu,0x0000003du,0x00050067u,0x00000007u,0x0000003fu,0x0000003eu,0x0000001bu,0x00050051u,0x00000006u,0x00000043u,0x0000003bu,0x00000000u,0x00050051u,0x00000006u,0x00000045u,0x0000003fu,0x00000000u,0x000500afu,0x00000040u,0x00000046u,0x00000043u,0x00000045u,0x000400a8u,0x00000040u,0x00000047u,0x00000046u,0x000300f7u,0x00000049u,0x00000000u,0x000400fau,0x00000047u,0x00000048u,0x00000049u,0x000200f8u,0x00000048u,0x00050051u,0x00000006u,0x0000004cu,0x0000003bu,0x00000001u,0x00050051u,0x00000006u,0x0000004eu,0x0000003fu,0x00000001u,0x000500afu,0x00000040u,0x0000004fu,0x0000004cu,0x0000004eu,0x000200f9u,0x00000049u,0x000200f8u,0x00000049u,0x000700f5u,0x00000040u,0x00000050u,0x00000046u,Line truncated
static const size_t OF3_FLOWREG_LEN = 981;
static const uint32_t DDFG_SYNTH_SPV[] = {0x07230203u,0x00010300u,0x0008000bu,0x00000208u,0x00000000u,0x00020011u,0x00000001u,0x00020011u,0x00000032u,0x0006000bu,0x00000001u,0x4c534c47u,0x6474732eu,0x3035342eu,0x00000000u,0x0003000eu,0x00000000u,0x00000001u,0x0006000fu,0x00000005u,0x00000004u,0x6e69616du,0x00000000u,0x0000001cu,0x00060010u,0x00000004u,0x00000011u,0x00000010u,0x00000010u,0x00000001u,0x00030003u,0x00000002u,0x000001c2u,0x00040005u,0x00000004u,0x6e69616du,0x00000000u,0x00050005u,0x0000000bu,0x616d756cu,0x33667628u,0x0000003bu,0x00030005u,0x0000000au,0x00000063u,0x00030005u,0x00000018u,0x00646967u,0x00080005u,0x0000001cu,0x475f6c67u,0x61626f6cu,0x766e496cu,0x7461636fu,0x496e6f69u,0x00000044u,0x00030005u,0x00000021u,0x006d6964u,0x00040005u,0x00000024u,0x74754f75u,0x00000000u,0x00040005u,0x0000003eu,0x44766e69u,0x00006d69u,0x00030005u,0x00000044u,0x00007675u,0x00030005u,0x0000004du,0x00000055u,0x00060006u,0x0000004du,0x00000000u,0x776f6c66u,0x6c616353u,0x00000065u,0x00050006u,0x0000004du,0x00000001u,0x68706c61u,0x00000061u,0x00050006u,0x0000004du,0x00000002u,0x61746562u,0x00000000u,0x00050006u,0x0000004du,0x00000003u,0x626d616cu,0x00006164u,0x00050006u,0x0000004du,0x00000004u,0x69737065u,0x006e6f6cu,0x00060006u,0x0000004du,0x00000005u,0x746f6870u,0x6163536fu,0x0000656cu,0x00050006u,0x0000004du,0x00000006u,0x30646170u,0x00000000u,0x00050006u,0x0000004du,0x00000007u,0x31646170u,0x00000000u,0x00050006u,0x0000004du,0x00000008u,0x52647568u,0x00746365u,0x00030005u,0x0000004fu,0x00000000u,0x00040005u,0x0000008cu,0x72754375u,0x00000072u,0x00030005u,0x00000098u,0x00676264u,0x00030005u,0x0000009fu,0x00007366u,0x00040005u,0x000000a9u,0x64774273u,0x00000000u,0x00050005u,0x000000aau,0x6f6c4675u,0x64774277u,0x00000000u,0x00040005u,0x000000aeu,0x64774673u,0x00000000u,0x00050005u,0x000000afu,0x6f6c4675u,0x64774677u,0x00000000u,0x00030005u,0x000000b3u,0x00313046u,0x00030005u,0x000000bau,0x00303146u,0x00040005u,0x000000c1u,0x31306663u,0x00000000u,0x00040005u,0x000000c5u,0x30316663u,0x00000000u,0x00030005u,0x000000c9u,0x0031306du,0x00030005u,0x000000d5u,0x0030316du,0x00030005u,0x000000e0u,0x00004170u,0x00030005u,0x000000e8u,0x00004270u,0x00030005u,0x000000f0u,0x00003043u,0x00040005u,0x000000f1u,0x65725075u,0x00000076u,0x00030005u,0x000000f6u,0x00003143u,0x00030005u,0x000000fbu,0x00004165u,0x00040005u,0x000000fcu,0x61726170u,0x0000006du,0x00040005u,0x0000010cu,0x61726170u,0x0000006du,0x00030005u,0x00000111u,0x00004265u,0x00040005u,0x00000112u,0x61726170u,0x0000006du,0x00040005u,0x00000122u,0x61726170u,0x0000006du,0x00040005u,0x00000127u,0x76556266u,0x00000000u,0x00040005u,0x0000012bu,0x65526266u,0x00646973u,0x00040005u,0x00000138u,0x736e6f63u,0x00747369u,0x00030005u,0x00000149u,0x0000305au,0x00030005u,0x00000157u,0x0000315au,0x00040005u,0x00000163u,0x30756174u,0x00000000u,0x00040005u,0x00000167u,0x31756174u,0x00000000u,0x00040005u,0x0000016au,0x78616d7au,0x00000000u,0x00030005u,0x0000016eu,0x00003057u,0x00030005u,0x00000179u,0x00003157u,0x00040005u,0x00000183u,0x6d757357u,0x00000000u,0x00040005u,0x00000187u,0x70726177u,0x00006465u,0x00050005u,0x000001a0u,0x736f7263u,0x64616673u,0x00000065u,0x00050005u,0x000001adu,0x746f6870u,0x7272456fu,0x00000000u,0x00050005u,0x000001b1u,0x746f6870u,0x7572546fu,0x00007473u,0x00040005u,0x000001b7u,0x73757274u,0x00000074u,0x00040005u,0x000001c3u,0x76657270u,0x00000043u,0x00040005u,0x000001c8u,0x72727563u,0x00000043u,0x00050005u,0x000001cdu,0x746e6f63u,0x44746e65u,0x00666669u,0x00050005u,0x000001d2u,0x72746e75u,0x65747375u,0x00000064u,0x00040005u,0x000001d7u,0x44676962u,0x00666669u,0x00050005u,0x000001dcu,0x70616e73u,0x75436f54u,0x00007272u,0x00040005u,0x000001e5u,0x6374756fu,0x00000000u,0x00030005u,0x000001eeu,0x0067616du,0x00030005u,0x000001f2u,0x0000006eu,0x00030005u,0x000001f6u,0x00746173u,0x00040047u,0x0000001cu,0x0000000bu,0x0000001cu,0x00030047u,0x00000024u,0x00000019u,0x00040047u,0x00000024u,0x00000021u,0x00000030u,0x00040047u,0x00000024u,0x00000022u,0x00000000u,0x00030047u,0x0000004du,0x00000002u,0x00050048u,0x0000004du,0x00000000u,0x00000023u,0x00000000u,0x00050048u,0x0000004du,0x00000001u,0x00000023u,0x00000004u,0x00050048u,0x0000004du,0x00000002u,0x00000023u,0x00000008u,0x00050048u,0x0000004du,0x00000003u,0x00000023u,0x0000000cu,0x00050048u,0x0000004du,0x00000004u,0x00000023u,0x00000010u,0x00050048u,0x0000004du,0x00000005u,0x00000023u,0x00000014u,0x00050048u,0x0000004du,0x00000006u,0x00000023u,0x00000018u,0x00050048u,0x0000004du,0x00000007u,0x00000023u,0x0000001cu,0x00050048u,0x0000004du,0x00000008u,0x00000023u,0x00000020u,0x00040047u,0x0000004fu,0x00000021u,0x00000000u,0x00040047u,0x0000004fu,0x00000022u,0x00000000u,0x00040047u,0x0000008cu,0x00000021u,0x00000021u,0x00040047u,0x0000008cu,0x00000022u,0x00000000u,0x00040047u,0x000000aau,0x00000021u,0x00000023u,0x00040047u,0x000000aau,0x00000022u,0x00000000u,0x00040047u,0x000000afu,0x00000021u,0x00000022u,0x00040047u,0x000000afu,0x00000022u,0x00000000u,0x00040047u,0x000000f1u,0x00000021u,0x00000020u,0x00040047u,0x000000f1u,0Line truncated
static const size_t DDFG_SYNTH_LEN = 3082;
struct Blob { const uint32_t* code; size_t words; };
+35 -1
View File
@@ -3,6 +3,7 @@
#include "log.hpp"
#include <cmath>
#include <cstdio>
#include <array>
namespace ddfg {
@@ -168,6 +169,14 @@ bool FrameGen::onResize(VkExtent2D extent, VkFormat , bool force) {
if (!force && ready_ && extent.width == extent_.width && extent.height == extent_.height) return true;
if (ready_) {
const VkResult idleResult = dd_->DeviceWaitIdle(device_);
if (idleResult != VK_SUCCESS) {
DDFG_LOGE("framegen resize: DeviceWaitIdle failed (%d); keeping existing images", (int)idleResult);
return false;
}
}
++imageGeneration_;
for (auto& i : pyrA_) destroyImage(i); pyrA_.clear();
for (auto& i : pyrB_) destroyImage(i); pyrB_.clear();
for (auto& i : pyrAs_) destroyImage(i); pyrAs_.clear();
@@ -211,10 +220,35 @@ void FrameGen::barrier(VkCommandBuffer cmd, VkImage img, VkImageLayout from, VkI
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &b);
}
void FrameGen::initializeImage(VkCommandBuffer cmd, VkImage img, VkImageLayout to) {
VkImageMemoryBarrier b{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER};
b.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
b.newLayout = to;
b.srcAccessMask = 0;
b.dstAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
b.image = img;
b.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1};
b.srcQueueFamilyIndex = b.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
dd_->CmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &b);
}
void FrameGen::destroy() {
if (!device_) return;
dd_->DeviceWaitIdle(device_);
const VkResult idleResult = dd_->DeviceWaitIdle(device_);
if (idleResult != VK_SUCCESS && idleResult != VK_ERROR_DEVICE_LOST) {
DDFG_LOGE("framegen destroy: DeviceWaitIdle failed (%d); preserving resources for safe retry", (int)idleResult);
return;
}
if (idleResult == VK_ERROR_DEVICE_LOST) {
// A lost device cannot become idle again. Still explicitly destroy its
// child objects; skip descriptor-pool reset and release scratch ownership.
DDFG_LOGE("framegen destroy: device lost; releasing owned resources without waiting");
destroyScratchResources(false);
} else {
destroyScratchResources();
}
for (auto& i : pyrA_) destroyImage(i); pyrA_.clear();
for (auto& i : pyrB_) destroyImage(i); pyrB_.clear();
for (auto& i : pyrAs_) destroyImage(i); pyrAs_.clear();
@@ -63,6 +63,8 @@ private:
const std::vector<VkDescriptorType>& bindings);
void destroyPipe(Pipe& p);
void barrier(VkCommandBuffer cmd, VkImage img, VkImageLayout from, VkImageLayout to);
void initializeImage(VkCommandBuffer cmd, VkImage img, VkImageLayout to);
void destroyScratchResources(bool resetPool = true);
const DeviceDispatch* dd_ = nullptr;
const InstanceDispatch* id_ = nullptr;
@@ -76,6 +78,7 @@ private:
Config cfg_;
VkExtent2D extent_{};
uint64_t imageGeneration_ = 0;
bool ready_ = false;
int flowFinest_ = kFlowFinestDefault;
+192 -57
View File
@@ -1,6 +1,7 @@
namespace {
struct ScratchState {
VkDevice ownerDevice = VK_NULL_HANDLE;
VkBuffer synthUbo[ddfg::FrameGen::kSynthSlots]{};
VkDeviceMemory synthUboMem[ddfg::FrameGen::kSynthSlots]{};
void* synthUboPtr[ddfg::FrameGen::kSynthSlots]{};
@@ -21,6 +22,7 @@ struct ScratchState {
VkDescriptorSet sGmReduce[ddfg::FrameGen::kGmSlots]{};
std::vector<VkDescriptorSet> sGmPrewarp[ddfg::FrameGen::kGmSlots];
VkExtent2D builtFor{0,0};
uint64_t builtGeneration = 0;
bool built = false;
bool flowInited = false;
bool flowReady = false;
@@ -58,6 +60,26 @@ static void wImg(const ddfg::DeviceDispatch* dd, VkDevice dev, VkDescriptorSet s
w.dstSet = set; w.dstBinding = binding; w.descriptorCount = 1; w.descriptorType = type; w.pImageInfo = &ii;
dd->UpdateDescriptorSets(dev, 1, &w, 0, nullptr);
}
static void wImgBatch(const ddfg::DeviceDispatch* dd, VkDevice dev,
const VkDescriptorSet* sets, const uint32_t* bindings,
const VkDescriptorType* types, const VkImageView* views,
const VkSampler* samplers, const VkImageLayout* layouts,
uint32_t count) {
VkDescriptorImageInfo infos[3]{};
VkWriteDescriptorSet writes[3]{};
for (uint32_t i = 0; i < count; ++i) {
infos[i].imageView = views[i];
infos[i].sampler = samplers[i];
infos[i].imageLayout = layouts[i];
writes[i] = {VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET};
writes[i].dstSet = sets[i];
writes[i].dstBinding = bindings[i];
writes[i].descriptorCount = 1;
writes[i].descriptorType = types[i];
writes[i].pImageInfo = &infos[i];
}
dd->UpdateDescriptorSets(dev, count, writes, 0, nullptr);
}
static void wUbo(const ddfg::DeviceDispatch* dd, VkDevice dev, VkDescriptorSet set, uint32_t binding,
VkBuffer buf, VkDeviceSize range) {
VkDescriptorBufferInfo bi{}; bi.buffer = buf; bi.range = range;
@@ -133,9 +155,11 @@ static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev,
const FrameGen::Pipe& pSynth, const FrameGen::Pipe& pGmReduce,
const FrameGen::Pipe& pGmPrewarp, const FrameGen::Pipe& pFlowReg,
FrameGen::Img& flowRegA, FrameGen::Img& flowRegB, VkBuffer* gmSsbo,
int kLevels, const Config& cfg);
int kLevels, const Config& cfg, uint64_t imageGeneration);
static void destroyScratch(const DeviceDispatch* dd, VkDevice dev, VkDescriptorPool pool) {
static void destroyScratch(const DeviceDispatch* dd, VkDevice dev, VkDescriptorPool pool,
bool resetPool = true) {
if (g_scratch.ownerDevice != VK_NULL_HANDLE && g_scratch.ownerDevice != dev) return;
auto freeUbo = [&](VkBuffer& b, VkDeviceMemory& m, void*& p) {
if (m) dd->UnmapMemory(dev, m);
if (b) dd->DestroyBuffer(dev, b, nullptr);
@@ -148,40 +172,68 @@ static void destroyScratch(const DeviceDispatch* dd, VkDevice dev, VkDescriptorP
freeUbo(S.flowRegUbo, S.flowRegUboMem, S.flowRegUboPtr);
for (size_t i = 0; i < S.flowUbo.size(); ++i) freeUbo(S.flowUbo[i], S.flowUboMem[i], S.flowUboPtr[i]);
for (int s = 0; s < FrameGen::kGmSlots; ++s) freeUbo(S.gmUbo[s], S.gmUboMem[s], S.gmUboPtr[s]);
if (pool && dd->ResetDescriptorPool) dd->ResetDescriptorPool(dev, pool, 0);
if (resetPool && pool && dd->ResetDescriptorPool) dd->ResetDescriptorPool(dev, pool, 0);
S = ScratchState{};
}
void FrameGen::destroyScratchResources(bool resetPool) {
destroyScratch(dd_, device_, descPool_, resetPool);
}
void FrameGen::configure(const Config& c) {
cfg_ = c; cfg_.sanitize();
int want = flowFinestForPreset(cfg_.perfPreset);
Config nextCfg = c;
nextCfg.sanitize();
int want = flowFinestForPreset(nextCfg.perfPreset);
const int maxFinest = kLevels - 2;
if (want > maxFinest) {
DDFG_LOGE("perf-preset=%d wants kFlowFinest=%d but only %d pyramid levels exist "
"(need >=2 solved) - clamping to %d", cfg_.perfPreset, want, kLevels, maxFinest);
"(need >=2 solved) - clamping to %d", nextCfg.perfPreset, want, kLevels, maxFinest);
want = maxFinest;
}
if (want < 1) want = 1;
const int prevFinest = flowFinest_;
flowFinest_ = want;
const bool live = (flowFinest_ != prevFinest) && ready_;
const bool live = (want != prevFinest) && ready_;
DDFG_LOGI("perf-preset=%d -> kFlowFinest=%d (was %d) live-rebuild=%d ready=%d",
cfg_.perfPreset, flowFinest_, prevFinest, live ? 1 : 0, ready_ ? 1 : 0);
nextCfg.perfPreset, want, prevFinest, live ? 1 : 0, ready_ ? 1 : 0);
if (!live) return;
if (!live) {
cfg_ = nextCfg;
flowFinest_ = want;
return;
}
// Keep the previous configuration and image set if the device cannot idle.
const VkResult idleResult = dd_->DeviceWaitIdle(device_);
if (idleResult != VK_SUCCESS) {
DDFG_LOGE("framegen configure: DeviceWaitIdle failed (%d); keeping previous configuration and images",
(int)idleResult);
return;
}
dd_->DeviceWaitIdle(device_);
destroyScratch(dd_, device_, descPool_);
if (!onResize(extent_, VK_FORMAT_UNDEFINED, true))
DDFG_LOGE("perf-preset live rebuild: onResize FAILED at %ux%u - FG disabled until next resize",
extent_.width, extent_.height);
// The device is idle, so reset motion history before rebuilding. This
// also leaves the predictor reset if onResize fails.
for (int i = 0; i < 6; ++i) gmRun_[i] = 0.0;
for (int s = 0; s < kGmSlots; ++s) { gmSlotValid_[s] = false; for (int i = 0; i < 6; ++i) gmLinAt_[s][i] = 0.0; }
gmHaveEst_ = false; gmEngaged_ = false; gmStableCount_ = 0; gmLastTransPx_ = 0.0f;
for (int s = 0; s < kGmSlots; ++s) {
gmSlotValid_[s] = false;
for (int i = 0; i < 6; ++i) gmLinAt_[s][i] = 0.0;
}
gmHaveEst_ = false;
gmEngaged_ = false;
gmStableCount_ = 0;
gmLastTransPx_ = 0.0f;
// Prevent onResize from issuing a second wait.
destroyScratch(dd_, device_, descPool_);
cfg_ = nextCfg;
flowFinest_ = want;
ready_ = false;
if (!onResize(extent_, VK_FORMAT_UNDEFINED, true)) {
ready_ = false;
DDFG_LOGE("perf-preset live rebuild: onResize FAILED at %ux%u - FG disabled until next resize",
extent_.width, extent_.height);
return;
}
DDFG_LOGI("perf-preset live rebuild DONE (kFlowFinest=%d, flow predictor reset)", flowFinest_);
}
@@ -199,10 +251,10 @@ bool FrameGen::updateGlobalMotion(uint32_t gmSlot, VkExtent2D fullExtent) {
bool good = false;
if (gmSlotValid_[gmSlot]) {
const float* pt = (const float*)gmSsboPtr_[gmSlot];
double sums[32]; for (int k = 0; k < 32; ++k) sums[k] = 0.0;
double sums[28]{};
for (int t = 0; t < kGmThreads; ++t) {
const float* row = pt + (size_t)t * kGmStride;
for (int k = 0; k < kGmStride; ++k) sums[k] += (double)row[k];
for (int k = 0; k < 28; ++k) sums[k] += (double)row[k];
}
double coverage = sums[27];
double lvlpx = double((fullExtent.width >> kGmLevel) * (fullExtent.height >> kGmLevel));
@@ -260,13 +312,25 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur
const Pipe& flowP = m4 ? pFlowM4_ : pFlow_;
const Pipe& expandP = m4 ? pExpandM4_ : pExpand_;
if (!g_scratch.built || g_scratch.builtFor.width != extent_.width || g_scratch.builtFor.height != extent_.height) {
ensureScratch(this, dd_, device_, memProps_, descPool_, linear_, extent_,
pyrA_, pyrB_, pyrAs_, flowLvl_, flowExpA_, flowExpB_,
pLuma_, pDown_, flowP, expandP, pSynth_, pGmReduce_, pGmPrewarp_,
pFlowReg_, flowRegA_, flowRegB_, gmSsbo_, kLevels, cfg_);
if (!g_scratch.built || g_scratch.builtFor.width != extent_.width ||
g_scratch.builtFor.height != extent_.height ||
g_scratch.builtGeneration != imageGeneration_) {
if (g_scratch.built) {
const VkResult idleResult = dd_->DeviceWaitIdle(device_);
if (idleResult != VK_SUCCESS) {
DDFG_LOGE("framegen record: DeviceWaitIdle failed (%d); skipping scratch rebuild", (int)idleResult);
return;
}
destroyScratch(dd_, device_, descPool_);
}
if (!ensureScratch(this, dd_, device_, memProps_, descPool_, linear_, extent_,
pyrA_, pyrB_, pyrAs_, flowLvl_, flowExpA_, flowExpB_,
pLuma_, pDown_, flowP, expandP, pSynth_, pGmReduce_, pGmPrewarp_,
pFlowReg_, flowRegA_, flowRegB_, gmSsbo_, kLevels, cfg_, imageGeneration_))
return;
}
if (g_scratch.ownerDevice != device_) return;
if (reuseFlow && !g_scratch.flowReady) return;
if (!reuseFlow) {
bool gmEngaged = updateGlobalMotion(gmSlot, extent_);
@@ -289,8 +353,16 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur
}
}
wImg(dd_, device_, g_scratch.sLumaCurr, 32, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, currView, linear_, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
wImg(dd_, device_, g_scratch.sLumaPrev, 32, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, prevView, linear_, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
const VkDescriptorSet lumaSets[] = {g_scratch.sLumaCurr, g_scratch.sLumaPrev};
const uint32_t lumaBindings[] = {32, 32};
const VkDescriptorType lumaTypes[] = {
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER};
const VkImageView lumaViews[] = {currView, prevView};
const VkSampler lumaSamplers[] = {linear_, linear_};
const VkImageLayout lumaLayouts[] = {
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL};
wImgBatch(dd_, device_, lumaSets, lumaBindings, lumaTypes, lumaViews,
lumaSamplers, lumaLayouts, 2);
}
SynthUBO su{cfg_.flowScale, alpha, cfg_.beta, cfg_.lambda, cfg_.epsilon, cfg_.photoScale, 0, 0,
@@ -298,9 +370,20 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur
if (g_scratch.synthUboPtr[synthSlot]) std::memcpy(g_scratch.synthUboPtr[synthSlot], &su, sizeof(su));
const VkDescriptorSet synthSet = g_scratch.sSynth[synthSlot];
wImg(dd_, device_, synthSet, 32, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, prevView, linear_, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
wImg(dd_, device_, synthSet, 33, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, currView, linear_, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
wImg(dd_, device_, synthSet, 48, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, outView, VK_NULL_HANDLE, VK_IMAGE_LAYOUT_GENERAL);
const VkDescriptorSet synthSets[] = {synthSet, synthSet, synthSet};
const uint32_t synthBindings[] = {32, 33, 48};
const VkDescriptorType synthTypes[] = {
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE};
const VkImageView synthViews[] = {prevView, currView, outView};
const VkSampler synthSamplers[] = {linear_, linear_, VK_NULL_HANDLE};
const VkImageLayout synthLayouts[] = {
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
VK_IMAGE_LAYOUT_GENERAL};
wImgBatch(dd_, device_, synthSets, synthBindings, synthTypes, synthViews,
synthSamplers, synthLayouts, 3);
auto disp = [&](const Pipe& p, VkDescriptorSet set, VkExtent2D e) {
dd_->CmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_COMPUTE, p.pipeline);
@@ -308,39 +391,90 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur
dd_->CmdDispatch(cmd, (e.width + 15) / 16, (e.height + 15) / 16, 1);
};
auto bar = [&](FrameGen::Img& i){ barrier(cmd, i.image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL); };
auto barPair = [&](FrameGen::Img& a, FrameGen::Img& b) {
VkImageMemoryBarrier barriers[2]{};
FrameGen::Img* images[] = {&a, &b};
for (uint32_t i = 0; i < 2; ++i) {
barriers[i].sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
barriers[i].srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
barriers[i].dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
barriers[i].oldLayout = VK_IMAGE_LAYOUT_GENERAL;
barriers[i].newLayout = VK_IMAGE_LAYOUT_GENERAL;
barriers[i].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
barriers[i].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
barriers[i].image = images[i]->image;
barriers[i].subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1};
}
dd_->CmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr,
0, nullptr, 2, barriers);
};
const bool frEngaged = (cfg_.frMode != 2) && (cfg_.frIters > 0);
if (!reuseFlow) {
for (auto& i : pyrA_) barrier(cmd, i.image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL);
for (auto& i : pyrB_) barrier(cmd, i.image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL);
for (int l = flowFinest_; l < kLevels; ++l) barrier(cmd, pyrAs_[l].image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL);
barrier(cmd, flowExpA_.image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL);
barrier(cmd, flowExpB_.image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL);
barrier(cmd, flowRegA_.image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL);
barrier(cmd, flowRegB_.image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL);
// Batch fresh-image transitions that share the same stage and access masks.
std::array<VkImageMemoryBarrier, 4 * kLevels + 1> initBarriers{};
size_t initBarrierCount = 0;
auto addInitBarrier = [&](VkImage image) {
VkImageMemoryBarrier b{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER};
b.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
b.newLayout = VK_IMAGE_LAYOUT_GENERAL;
b.srcAccessMask = 0;
b.dstAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
b.image = image;
b.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1};
b.srcQueueFamilyIndex = b.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
initBarriers[initBarrierCount++] = b;
};
for (auto& i : pyrA_) addInitBarrier(i.image);
for (auto& i : pyrB_) addInitBarrier(i.image);
for (int l = flowFinest_; l < kLevels; ++l) addInitBarrier(pyrAs_[l].image);
addInitBarrier(flowExpA_.image);
addInitBarrier(flowExpB_.image);
if (frEngaged) {
addInitBarrier(flowRegA_.image);
addInitBarrier(flowRegB_.image);
}
// The final flow level is cleared through TRANSFER_DST_OPTIMAL below;
// the other levels can use the common initialization barrier.
for (int l = flowFinest_; l < kLevels - 1; ++l) addInitBarrier(flowLvl_[l].image);
if (initBarrierCount != 0) {
dd_->CmdPipelineBarrier(cmd,
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT,
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr,
0, nullptr, static_cast<uint32_t>(initBarrierCount), initBarriers.data());
}
{
VkClearColorValue zero{};
VkImageSubresourceRange rng{VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1};
for (int l = flowFinest_; l < kLevels; ++l) {
VkImageMemoryBarrier b{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER};
b.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED; b.newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
b.srcAccessMask = 0; b.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
b.image = flowLvl_[l].image; b.subresourceRange = rng;
b.srcQueueFamilyIndex = b.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
dd_->CmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, 1, &b);
dd_->CmdClearColorImage(cmd, flowLvl_[l].image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &zero, 1, &rng);
b.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; b.newLayout = VK_IMAGE_LAYOUT_GENERAL;
b.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; b.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
dd_->CmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &b);
}
VkImageMemoryBarrier b{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER};
b.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
b.newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
b.srcAccessMask = 0;
b.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
b.image = flowLvl_[kLevels - 1].image;
b.subresourceRange = rng;
b.srcQueueFamilyIndex = b.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
dd_->CmdPipelineBarrier(cmd,
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT,
VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, 1, &b);
dd_->CmdClearColorImage(cmd, flowLvl_[kLevels - 1].image,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &zero, 1, &rng);
b.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
b.newLayout = VK_IMAGE_LAYOUT_GENERAL;
b.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
b.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
dd_->CmdPipelineBarrier(cmd, VK_PIPELINE_STAGE_TRANSFER_BIT,
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, &b);
}
disp(pLuma_, g_scratch.sLumaCurr, levelExtent(extent_, 0));
disp(pLuma_, g_scratch.sLumaPrev, levelExtent(extent_, 0));
bar(pyrA_[0]); bar(pyrB_[0]);
barPair(pyrA_[0], pyrB_[0]);
for (int l = 1; l < kLevels; ++l) {
disp(pDown_, g_scratch.sDownA[l - 1], levelExtent(extent_, l));
disp(pDown_, g_scratch.sDownB[l - 1], levelExtent(extent_, l));
bar(pyrA_[l]); bar(pyrB_[l]);
barPair(pyrA_[l], pyrB_[l]);
}
if (gmBuffersReady_ && g_scratch.sGmReduce[gmSlot]) {
dd_->CmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_COMPUTE, pGmReduce_.pipeline);
@@ -360,7 +494,6 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur
bar(flowLvl_[l]);
}
const bool frEngaged = (cfg_.frMode != 2) && (cfg_.frIters > 0);
if (frEngaged) {
const int F = flowFinest_;
const VkExtent2D fe = levelExtent(extent_, F);
@@ -377,7 +510,7 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur
dd_->CmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_COMPUTE, pFlowReg_.pipeline);
dd_->CmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_COMPUTE, pFlowReg_.layout, 0, 1, &set, 0, nullptr);
dd_->CmdDispatch(cmd, (fe.width + 15) / 16, (fe.height + 15) / 16, 1);
bar(*outImg);
if (it + 1 < cfg_.frIters) bar(*outImg);
last = outImg;
}
VkMemoryBarrier mb{VK_STRUCTURE_TYPE_MEMORY_BARRIER};
@@ -408,7 +541,7 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur
}
disp(expandP, g_scratch.sExpand[gmSlot], levelExtent(extent_, 0));
bar(flowExpA_); bar(flowExpB_);
barPair(flowExpA_, flowExpB_);
g_scratch.flowReady = true;
}
disp(pSynth_, synthSet, levelExtent(extent_, 0));
@@ -425,9 +558,11 @@ static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev,
const FrameGen::Pipe& pSynth, const FrameGen::Pipe& pGmReduce,
const FrameGen::Pipe& pGmPrewarp, const FrameGen::Pipe& pFlowReg,
FrameGen::Img& flowRegA, FrameGen::Img& flowRegB, VkBuffer* gmSsbo,
int kLevels, const Config& cfg) {
int kLevels, const Config& cfg, uint64_t imageGeneration) {
auto& S = g_scratch;
if (S.ownerDevice != VK_NULL_HANDLE && S.ownerDevice != dev) return false;
S = ScratchState{};
S.ownerDevice = dev;
const auto GEN = VK_IMAGE_LAYOUT_GENERAL;
for (int s = 0; s < FrameGen::kSynthSlots; ++s)
@@ -528,7 +663,7 @@ static bool ensureScratch(FrameGen* fg, const DeviceDispatch* dd, VkDevice dev,
wImg(dd, dev, S.sSynth[s], 35, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, expB.view, samp, GEN);
}
S.builtFor = ext; S.built = true;
S.builtFor = ext; S.builtGeneration = imageGeneration; S.ownerDevice = dev; S.built = true;
return true;
}
+5 -2
View File
@@ -614,10 +614,13 @@ private:
XrSessionBeginInfo begin{XR_TYPE_SESSION_BEGIN_INFO};
begin.primaryViewConfigurationType = XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO;
check(xrBeginSession(session_, &begin), "xrBeginSession"); running_ = true;
// Meta's clock governor scales clocks by the DroidDeck process's overall load and cannot see
// SteamVR missing refreshes inside the guest; holding the top level kept it at 72 Hz.
if (setPerformance_) {
for (auto domain : {XR_PERF_SETTINGS_DOMAIN_CPU_EXT, XR_PERF_SETTINGS_DOMAIN_GPU_EXT}) {
XrResult request = setPerformance_(session_, domain, XR_PERF_SETTINGS_LEVEL_SUSTAINED_HIGH_EXT);
__android_log_print(ANDROID_LOG_INFO, "DroidDeckXR", "sustained performance domain=%d result=%d", domain, request);
XrResult request = setPerformance_(session_, domain, XR_PERF_SETTINGS_LEVEL_BOOST_EXT);
if (XR_FAILED(request)) request = setPerformance_(session_, domain, XR_PERF_SETTINGS_LEVEL_SUSTAINED_HIGH_EXT);
__android_log_print(ANDROID_LOG_INFO, "DroidDeckXR", "performance domain=%d result=%d", domain, request);
}
}
} else if (state_ == XR_SESSION_STATE_STOPPING) {
@@ -133,10 +133,10 @@ static void handle_released(uint64_t id, int fd) {
if (fd >= 0) {
struct droiddeck_dma_buf_sync_file imp = {.flags = DROIDDECK_DMA_BUF_SYNC_READ, .fd = fd};
int dmabuf_fd = droiddeck_dmabuf_fd(ab->b);
if (!ab->display && dmabuf_fd >= 0 && ioctl(dmabuf_fd, DROIDDECK_DMA_BUF_IOCTL_IMPORT_SYNC_FILE, &imp) == 0) {
if (dmabuf_fd >= 0 && ioctl(dmabuf_fd, DROIDDECK_DMA_BUF_IOCTL_IMPORT_SYNC_FILE, &imp) == 0) {
close(fd);
} else {
if (!ab->display && !g_import_failed_logged) {
if (!g_import_failed_logged) {
g_import_failed_logged = 1;
droiddeck_log("layer", "zero-copy: DMA_BUF_IOCTL_IMPORT_SYNC_FILE failed (%s): releases wait for the display's fence here instead",
strerror(errno));
+108 -33
View File
@@ -148,6 +148,7 @@ struct slot {
uint32_t fmt;
int release_fd;
int busy;
uint64_t generation;
};
struct layer {
@@ -175,6 +176,7 @@ struct layer {
int votes_rate;
float fps_applied;
int recreate_pending;
int pending_callbacks;
int32_t ds_applied;
@@ -222,6 +224,7 @@ struct complete_ctx {
ASurfaceControl *sc;
int layer;
int prev_slot;
uint64_t prev_generation;
void *prev_token;
int retire;
};
@@ -288,12 +291,16 @@ static void on_complete(void *context, ASurfaceTransactionStats *stats) {
pthread_mutex_lock(&g_lock);
if (ctx->layer >= 0 && ctx->layer < SC_LAYER_COUNT && ctx->prev_slot >= 0 && ctx->prev_slot < POOL_MAX) {
struct slot *s = &g_layers[ctx->layer].slots[ctx->prev_slot];
int fd = (stats && ctx->sc) ? api.prevReleaseFence(stats, ctx->sc) : -1;
if (s->release_fd >= 0) close(s->release_fd);
s->release_fd = fd;
s->busy = 0;
if (s->generation == ctx->prev_generation) {
int fd = (stats && ctx->sc) ? api.prevReleaseFence(stats, ctx->sc) : -1;
if (s->release_fd >= 0) close(s->release_fd);
s->release_fd = fd;
s->busy = 0;
}
}
if (g_pending_cb > 0) g_pending_cb--;
if (ctx->layer >= 0 && ctx->layer < SC_LAYER_COUNT && g_layers[ctx->layer].pending_callbacks > 0)
g_layers[ctx->layer].pending_callbacks--;
pthread_mutex_unlock(&g_lock);
if (ctx->prev_token) {
int fd = (stats && ctx->sc) ? api.prevReleaseFence(stats, ctx->sc) : -1;
@@ -308,9 +315,15 @@ static int add_complete_on(ASurfaceTransaction *tx, struct layer *l, ASurfaceCon
struct complete_ctx *ctx = calloc(1, sizeof(*ctx));
if (!ctx) return -1;
ctx->sc = sc; ctx->layer = (int)(l - g_layers); ctx->prev_slot = prev_slot;
if (prev_slot >= 0 && prev_slot < POOL_MAX) {
pthread_mutex_lock(&g_lock);
ctx->prev_generation = l->slots[prev_slot].generation;
pthread_mutex_unlock(&g_lock);
}
ctx->prev_token = prev_token; ctx->retire = retire;
pthread_mutex_lock(&g_lock);
g_pending_cb++;
l->pending_callbacks++;
pthread_mutex_unlock(&g_lock);
api.setOnComplete(tx, ctx, on_complete);
return 0;
@@ -397,12 +410,16 @@ static void retire_sc(struct layer *l) {
ASurfaceTransaction *tx = api.txCreate();
if (tx) {
retire_ops(tx, l->sc);
if (add_complete(tx, l, l->cur_slot, l->cur_token, 1) != 0) api.release(l->sc);
if (add_complete(tx, l, l->cur_slot, l->cur_token, 1) != 0) {
api.txDelete(tx);
droiddeck_log("layer", "%s: retirement deferred because its release callback could not be allocated", l->name);
return;
}
api.txApply(tx);
api.txDelete(tx);
} else {
if (l->cur_token) ahb_swapchain_layer_released(l->cur_token, -1);
api.release(l->sc);
droiddeck_log("layer", "%s: retirement deferred because a transaction could not be allocated", l->name);
return;
}
droiddeck_log("layer", "%s: SurfaceControl retired (window %p)", l->name, (void *)l->win);
l->sc = NULL; l->win = NULL;
@@ -421,20 +438,28 @@ static void drain_and_free_pools(void) {
if (!pending || now_ns() > deadline) break;
usleep(2000);
}
pthread_mutex_lock(&g_lock);
for (int i = 0; i < SC_LAYER_COUNT; i++) {
struct layer *l = &g_layers[i];
pthread_mutex_lock(&g_lock);
const int pending = l->pending_callbacks;
if (pending || l->sc) {
pthread_mutex_unlock(&g_lock);
droiddeck_log("layer", "pool drain deferred for %s (%s)", l->name,
pending ? "SurfaceControl callbacks are pending" : "SurfaceControl retirement is deferred");
continue;
}
for (int j = 0; j < POOL_MAX; j++) {
struct slot *s = &g_layers[i].slots[j];
struct slot *s = &l->slots[j];
if (s->release_fd >= 0) { struct pollfd p = {.fd = s->release_fd, .events = POLLIN}; poll(&p, 1, 100); close(s->release_fd); }
if (s->img) vkp_image_destroy(s->img);
if (s->ahb) AHardwareBuffer_release(s->ahb);
memset(s, 0, sizeof(*s));
s->release_fd = -1;
}
g_layers[i].first_logged = 0;
g_layers[i].logged_w = g_layers[i].logged_h = 0;
l->first_logged = 0;
l->logged_w = l->logged_h = 0;
pthread_mutex_unlock(&g_lock);
}
pthread_mutex_unlock(&g_lock);
}
static int sniff_modifier(const struct droiddeck_native_handle *h, uint64_t *mod) {
@@ -612,7 +637,10 @@ static int take_free_slot(struct layer *l, int w, int h, uint32_t fmt, int *wait
if (pending < 0) pending = i;
}
if (idx < 0) idx = pending;
if (idx >= 0) { fd = l->slots[idx].release_fd; l->slots[idx].release_fd = -1; }
if (idx >= 0) {
fd = l->slots[idx].release_fd; l->slots[idx].release_fd = -1;
l->slots[idx].generation++;
}
pthread_mutex_unlock(&g_lock);
if (idx < 0) return -1;
if (fd >= 0 && fence_signalled(fd)) { close(fd); fd = -1; }
@@ -620,7 +648,8 @@ static int take_free_slot(struct layer *l, int w, int h, uint32_t fmt, int *wait
if (s->ahb && (s->w != w || s->h != h || s->fmt != fmt)) {
if (fd >= 0) { close(fd); fd = -1; }
vkp_image_destroy(s->img); AHardwareBuffer_release(s->ahb);
memset(s, 0, sizeof(*s)); s->release_fd = -1;
const uint64_t generation = s->generation;
memset(s, 0, sizeof(*s)); s->release_fd = -1; s->generation = generation;
}
if (fd >= 0 && !vkp_can_wait_sync_fd()) {
if (fence_wait(fd, 100) == 0) { slot_keep_fence(s, fd); return -1; }
@@ -659,7 +688,13 @@ static int ensure_sc(struct layer *l) {
if (load_api() != 0) return -1;
ANativeWindow *win = vkp_window();
if (!win) return -1;
if (l->sc && l->win != win) retire_sc(l);
if (l->sc && l->win != win) {
retire_sc(l);
if (l->sc) {
droiddeck_log("layer", "%s: keeping the old SurfaceControl until retirement completes", l->name);
return -1;
}
}
if (!l->sc) {
l->sc = api.createFromWindow(win, l->name);
if (!l->sc) { droiddeck_log("error", "layer: ASurfaceControl_createFromWindow(%s) failed", l->name); return -1; }
@@ -818,6 +853,7 @@ static ASurfaceControl *swap_sc_begin(struct layer *l) {
if (!win || win != l->win) return NULL;
ASurfaceControl *fresh = api.createFromWindow(win, l->name);
if (!fresh) {
l->recreate_pending = 1;
droiddeck_log("error", "layer: %s: composition recovery could not create a new SurfaceControl", l->name);
return NULL;
}
@@ -832,24 +868,45 @@ static ASurfaceControl *swap_sc_begin(struct layer *l) {
return old;
}
static void rollback_swap_sc(struct layer *l, ASurfaceControl *old, int was_shown,
int32_t ds_applied, uint32_t md_applied, float hr_applied) {
if (!old) return;
ASurfaceControl *fresh = l->sc;
l->sc = old;
l->shown = was_shown;
l->recreate_pending = 1;
l->geo_valid = 0;
l->fps_applied = -1.0f;
l->ds_applied = ds_applied; l->md_applied = md_applied; l->hr_applied = hr_applied;
if (fresh) api.release(fresh);
}
static int present_slot(struct layer *l, int idx, const int r[8], const struct droiddeck_color *color,
int translucent) {
struct slot *s = &l->slots[idx];
ASurfaceTransaction *tx = api.txCreate();
if (!tx) return -1;
const int was_shown = l->shown;
const int32_t ds_applied = l->ds_applied;
const uint32_t md_applied = l->md_applied;
const float hr_applied = l->hr_applied;
ASurfaceControl *old = swap_sc_begin(l);
if (old) api.setZOrder(tx, l->sc, l->z);
api.setBuffer(tx, l->sc, s->ahb, -1);
if (api.setEnableBackPressure) api.setEnableBackPressure(tx, l->sc, true);
api.setBufferTransparency(tx, l->sc,
translucent ? ASC_TRANSPARENCY_TRANSLUCENT : ASC_TRANSPARENCY_OPAQUE);
if (!l->shown) api.setVisibility(tx, l->sc, ASC_VISIBILITY_SHOW);
if (old) retire_ops(tx, old);
if (add_complete_on(tx, l, old ? old : l->sc, l->cur_slot, l->cur_token, old ? 1 : 0) != 0) {
api.txDelete(tx);
rollback_swap_sc(l, old, was_shown, ds_applied, md_applied, hr_applied);
droiddeck_log("layer", "%s: frame transition skipped because its release callback could not be allocated", l->name);
return -1;
}
apply_geometry(tx, l, r);
apply_frame_rate(tx, l);
apply_colour(tx, l, color);
if (!l->shown) api.setVisibility(tx, l->sc, ASC_VISIBILITY_SHOW);
if (old) retire_ops(tx, old);
if (add_complete_on(tx, l, old ? old : l->sc, l->cur_slot, l->cur_token, old ? 1 : 0) != 0 && old)
api.release(old);
pthread_mutex_lock(&g_lock);
s->busy = 1;
pthread_mutex_unlock(&g_lock);
@@ -904,23 +961,27 @@ int sc_layer_present_ahb(AHardwareBuffer *ahb, int w, int h, int acquire_fd, voi
}
ASurfaceTransaction *tx = api.txCreate();
if (!tx) goto unavailable;
const int was_shown = l->shown;
const int32_t ds_applied = l->ds_applied;
const uint32_t md_applied = l->md_applied;
const float hr_applied = l->hr_applied;
ASurfaceControl *old = swap_sc_begin(l);
if (old) api.setZOrder(tx, l->sc, l->z);
api.setBuffer(tx, l->sc, ahb, acquire_fd);
if (api.setEnableBackPressure) api.setEnableBackPressure(tx, l->sc, true);
api.setBufferTransparency(tx, l->sc, ASC_TRANSPARENCY_OPAQUE);
apply_geometry(tx, l, r);
apply_frame_rate(tx, l);
apply_colour(tx, l, color);
if (!l->shown) api.setVisibility(tx, l->sc, ASC_VISIBILITY_SHOW);
if (old) retire_ops(tx, old);
if (add_complete_on(tx, l, old ? old : l->sc, l->cur_slot,
l->cur_token == token ? NULL : l->cur_token, old ? 1 : 0) != 0) {
api.txDelete(tx);
if (old) api.release(old);
l->ds_applied = -1; l->md_applied = 0; l->hr_applied = -1.0f;
rollback_swap_sc(l, old, was_shown, ds_applied, md_applied, hr_applied);
droiddeck_log("layer", "zero-copy: frame transition skipped because its release callback could not be allocated");
return -1;
}
apply_geometry(tx, l, r);
apply_frame_rate(tx, l);
apply_colour(tx, l, color);
apply_present_time(tx, 1);
api.txApply(tx);
api.txDelete(tx);
@@ -1167,15 +1228,26 @@ int sc_layer_present_overlay(struct vkp_image *src, const int geo[8], int transl
return 0;
}
static void hide_layer(struct layer *l) {
if (!l->sc || !l->shown || api.state != 1) return;
static int hide_layer(struct layer *l) {
if (!l->sc || !l->shown || api.state != 1) return 0;
ASurfaceTransaction *tx = api.txCreate();
if (!tx) return;
replace_with_blank(tx, l);
if (!tx) return -1;
api.setVisibility(tx, l->sc, ASC_VISIBILITY_HIDE);
add_complete(tx, l, l->cur_slot, l->cur_token, 0);
if (add_complete(tx, l, l->cur_slot, l->cur_token, 0) != 0) {
/*
* Keep the current buffer attached when its release callback cannot
* be allocated. The hide can still apply without releasing the slot.
*/
api.txApply(tx);
api.txDelete(tx);
l->shown = 0;
droiddeck_log("layer", "%s: hidden; buffer release deferred because its callback could not be allocated", l->name);
return 0;
}
replace_with_blank(tx, l);
api.txApply(tx); api.txDelete(tx);
l->shown = 0; l->cur_slot = -1; l->cur_token = NULL;
return 0;
}
void sc_layer_hide(void) {
@@ -1183,17 +1255,20 @@ void sc_layer_hide(void) {
int said = g_layers[SC_LAYER_GAME].shown || g_layers[SC_LAYER_OVERLAY].sc;
if (g_layers[SC_LAYER_OVERLAY].sc) sc_layer_hide_overlay();
if (g_layers[SC_LAYER_GAME].shown) hide_layer(&g_layers[SC_LAYER_GAME]);
if (said) droiddeck_log("layer", "layers hidden (scene is not a single fullscreen window)");
if (said && !g_layers[SC_LAYER_GAME].shown && !g_layers[SC_LAYER_OVERLAY].shown)
droiddeck_log("layer", "layers hidden (scene is not a single fullscreen window)");
}
void sc_layer_hide_overlay(void) {
layers_init();
struct layer *l = &g_layers[SC_LAYER_OVERLAY];
if (!l->sc) return;
if (l->shown) hide_layer(l);
if (l->shown && hide_layer(l) != 0) return;
retire_sc(l);
droiddeck_log("layer", "%s: gone (nothing is above the game any more)", l->name);
if (g_layers[SC_LAYER_GAME].sc) g_layers[SC_LAYER_GAME].recreate_pending = 1;
if (!l->sc) {
droiddeck_log("layer", "%s: gone (nothing is above the game any more)", l->name);
if (g_layers[SC_LAYER_GAME].sc) g_layers[SC_LAYER_GAME].recreate_pending = 1;
}
}
void sc_layer_window_gone(void) {
+85 -9
View File
@@ -161,7 +161,9 @@ static uint32_t g_qfam;
static VkCommandPool g_pool;
#define MAX_PRESENTS (1 + VKP_FG_MAX_GENERATIONS)
static VkCommandBuffer g_cmds[MAX_PRESENTS];
static VkSemaphore g_acqs[MAX_PRESENTS], g_rnds[MAX_PRESENTS];
static VkSemaphore g_acqs[MAX_PRESENTS];
static VkSemaphore *g_rnds;
static uint32_t g_rnd_count;
static VkFence g_fence;
static int g_swap_extra;
#define SCENE_FMT VK_FORMAT_R8G8B8A8_UNORM
@@ -230,6 +232,16 @@ static VkResult timed_wait(VkFence fence, uint64_t timeout) {
return g_dev_state == -2 ? VK_ERROR_DEVICE_LOST : VK_ERROR_UNKNOWN;
int64_t t0 = perf_now();
VkResult r = g_vk.WaitForFences(g_dev, 1, &fence, VK_TRUE, timeout);
if (r == VK_TIMEOUT) {
droiddeck_log("gpu", "GPU fence delayed: retaining frame resources until completion");
/* A scheduling delay does not invalidate the device. Keep this submission's
* resources and call stack alive, as the main render path already does. */
do {
r = g_vk.WaitForFences(g_dev, 1, &fence, VK_TRUE, UINT64_MAX);
} while (r == VK_TIMEOUT);
if (r == VK_SUCCESS)
droiddeck_log("gpu", "GPU fence completed: continuing presentation");
}
perf_add(&g_perf.wait_ns, &g_perf.wait_max_ns, &g_perf.waits, perf_now() - t0);
if (r != VK_SUCCESS && r != VK_ERROR_DEVICE_LOST)
quarantine_pending_work(r, "fence wait");
@@ -323,12 +335,44 @@ static void reset_sync(void) {
VkSemaphoreCreateInfo semci = {.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO};
for (int k = 0; k < MAX_PRESENTS; k++) {
if (g_acqs[k]) g_vk.DestroySemaphore(g_dev, g_acqs[k], NULL);
if (g_rnds[k]) g_vk.DestroySemaphore(g_dev, g_rnds[k], NULL);
g_vk.CreateSemaphore(g_dev, &semci, NULL, &g_acqs[k]);
g_vk.CreateSemaphore(g_dev, &semci, NULL, &g_rnds[k]);
g_acqs[k] = VK_NULL_HANDLE;
if (g_vk.CreateSemaphore(g_dev, &semci, NULL, &g_acqs[k]) != VK_SUCCESS)
droiddeck_log("error", "present: failed to recreate acquire semaphore %d", k);
}
}
static void destroy_present_semaphores(void) {
if (g_dev && g_vk.DestroySemaphore) {
for (uint32_t i = 0; i < g_rnd_count; i++)
if (g_rnds[i]) g_vk.DestroySemaphore(g_dev, g_rnds[i], NULL);
}
free(g_rnds);
g_rnds = NULL;
g_rnd_count = 0;
}
static int create_present_semaphores(void) {
if (!g_nimg) return -1;
VkSemaphore *sems = calloc(g_nimg, sizeof(*sems));
if (!sems) return -1;
VkSemaphoreCreateInfo semci = {.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO};
for (uint32_t i = 0; i < g_nimg; i++) {
VkResult r = g_vk.CreateSemaphore(g_dev, &semci, NULL, &sems[i]);
if (r != VK_SUCCESS) {
droiddeck_log("error", "present: failed to create image semaphore %u (%s)",
i, vk_result_name(r));
for (uint32_t j = 0; j < i; j++)
if (sems[j]) g_vk.DestroySemaphore(g_dev, sems[j], NULL);
free(sems);
return -1;
}
}
destroy_present_semaphores();
g_rnds = sems;
g_rnd_count = g_nimg;
return 0;
}
static void destroy_swapchain(void) {
g_base_black = 0;
if (g_dev_state != 1) return;
@@ -338,10 +382,11 @@ static void destroy_swapchain(void) {
else quarantine_pending_work(idle, "swapchain idle");
return;
}
reset_sync();
for (uint32_t i = 0; i < g_nimg; i++) blendp_forget_image(g_images[i]);
if (g_swapchain) g_vk.DestroySwapchainKHR(g_dev, g_swapchain, NULL);
g_swapchain = VK_NULL_HANDLE;
destroy_present_semaphores();
reset_sync();
g_swap_md_identity = 0;
if (g_surface) g_vk.DestroySurfaceKHR(g_inst, g_surface, NULL);
g_surface = VK_NULL_HANDLE;
@@ -1365,12 +1410,35 @@ static int swap_init_locked(void) {
SWLOGE("present: vkCreateSwapchainKHR failed (%d)", (int)cr);
return -1;
}
g_vk.GetSwapchainImagesKHR(g_dev, g_swapchain, &g_nimg, NULL);
cr = g_vk.GetSwapchainImagesKHR(g_dev, g_swapchain, &g_nimg, NULL);
if (cr != VK_SUCCESS || !g_nimg) {
SWLOGE("present: vkGetSwapchainImagesKHR count failed (%s)", vk_result_name(cr));
g_nimg = 0;
return -1;
}
g_images = calloc(g_nimg, sizeof(VkImage));
g_vk.GetSwapchainImagesKHR(g_dev, g_swapchain, &g_nimg, g_images);
if (!g_images) {
SWLOGE("present: failed to allocate swapchain image list");
g_nimg = 0;
return -1;
}
cr = g_vk.GetSwapchainImagesKHR(g_dev, g_swapchain, &g_nimg, g_images);
if (cr != VK_SUCCESS) {
SWLOGE("present: vkGetSwapchainImagesKHR failed (%s)", vk_result_name(cr));
free(g_images);
g_images = NULL;
g_nimg = 0;
return -1;
}
if (create_present_semaphores() != 0) {
SWLOGE("present: failed to initialize per-image present semaphores");
return -1;
}
droiddeck_log("gpu", "screen output %ux%u, %u buffers, vsync%s", g_extent.width, g_extent.height, g_nimg,
g_swap_extra ? " (frame generation: several presents per frame)" : "");
droiddeck_log("gpu", "present synchronization: %u render-finished semaphores, one per swapchain image",
g_rnd_count);
return 0;
}
@@ -2879,9 +2947,17 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i
}
const int last = (k + 1 == presents);
VkPipelineStageFlags wait = VK_PIPELINE_STAGE_TRANSFER_BIT;
/* A present-wait semaphore is reused only after this exact swapchain image
* has been acquired again; a frame-slot fence cannot prove present completion. */
if (img >= g_rnd_count || !g_rnds[img]) {
droiddeck_log("error", "present: image index %u exceeds semaphore count %u",
img, g_rnd_count);
destroy_swapchain();
return -1;
}
VkSubmitInfo si = {.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO, .waitSemaphoreCount = 1,
.pWaitSemaphores = &g_acqs[k], .pWaitDstStageMask = &wait, .commandBufferCount = 1,
.pCommandBuffers = &g_cmds[k], .signalSemaphoreCount = 1, .pSignalSemaphores = &g_rnds[k]};
.pCommandBuffers = &g_cmds[k], .signalSemaphoreCount = 1, .pSignalSemaphores = &g_rnds[img]};
VkResult qr = g_vk.QueueSubmit(g_queue, 1, &si, last ? g_fence : VK_NULL_HANDLE);
if (qr != VK_SUCCESS) {
if (qr == VK_ERROR_DEVICE_LOST) device_lost("submit");
@@ -2891,7 +2967,7 @@ static int render_impl(int scene_w, int scene_h, const struct vkp_draw *draws, i
}
fence_submitted = last;
VkPresentInfoKHR pi = {.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, .waitSemaphoreCount = 1,
.pWaitSemaphores = &g_rnds[k], .swapchainCount = 1,
.pWaitSemaphores = &g_rnds[img], .swapchainCount = 1,
.pSwapchains = &g_swapchain, .pImageIndices = &img};
const int64_t t_pres = perf_now();
pr = g_vk.QueuePresentKHR(g_queue, &pi);
@@ -430,21 +430,28 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl
*/
private fun useMaliFallback(missing: String?): String {
val oldVulkan = com.droiddeck.launcher.session.VenusComponent.hostVulkanTooOld(activity)
val venus = oldVulkan == null && com.droiddeck.launcher.session.VenusComponent.available(activity)
val venusByUser = venusExplicit()
val venus = MaliAutoRoute.venusStandsIn(
com.droiddeck.launcher.session.VenusComponent.available(activity), oldVulkan == null,
SessionPrefs.venus(activity), venusByUser, gpu.name,
)
if (oldVulkan != null) Log.i(TAG, "auto: Mali driver reports Vulkan $oldVulkan; Venus needs 1.2, the bridge stands in")
val ownership = MaliAutoRoute.fallbackOwnership(
venus,
SessionPrefs.vkBridge(activity), bridgeExplicit(),
SessionPrefs.venus(activity), venusExplicit(),
SessionPrefs.venus(activity), venusByUser,
)
if (venus && !SessionPrefs.venus(activity)) {
SessionPrefs.setVenus(activity, true)
if (SessionPrefs.vkBridge(activity) && !bridgeExplicit())
SessionPrefs.setVkBridge(activity, false)
SessionPrefs.setMaliFallbackByAuto(activity, ownership)
} else if (!venus && !SessionPrefs.vkBridge(activity)) {
SessionPrefs.setVkBridge(activity, true)
SessionPrefs.setMaliFallbackByAuto(activity, ownership)
} else if (!venus) {
val venusOff = SessionPrefs.venus(activity) && !venusByUser
val bridgeOn = !SessionPrefs.vkBridge(activity)
if (venusOff) SessionPrefs.clearVenus(activity)
if (bridgeOn) SessionPrefs.setVkBridge(activity, true)
if (venusOff || bridgeOn || ownership != MaliAutoRoute.NONE) SessionPrefs.setMaliFallbackByAuto(activity, ownership)
} else if (ownership != MaliAutoRoute.NONE) {
SessionPrefs.setMaliFallbackByAuto(activity, ownership)
}
@@ -467,7 +474,7 @@ internal class DriverMenus(private val activity: Activity, private val ui: Handl
/** A pair is installed for this Mali: the route Auto switched on in its place goes off again. */
private fun endMaliFallback() {
when (SessionPrefs.maliFallbackByAuto(activity)) {
"venus" -> SessionPrefs.setVenus(activity, false)
"venus" -> SessionPrefs.clearVenus(activity)
"bridge" -> SessionPrefs.setVkBridge(activity, false)
else -> return
}
@@ -1038,14 +1038,18 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
onHandled()
return
}
val files = game.gameFiles
if (game.source != com.droiddeck.launcher.stores.Store.XBOX.id || files == null) {
val files = game.gameFiles?.takeIf { game.source == com.droiddeck.launcher.stores.Store.XBOX.id }
val steamClient = Library.fromSteamClient(game)
if (files == null && !steamClient) {
if (startGame(game, returnHome, onHandled, request)) onSettled()
else launchCoordinator.releaseHandling(request)
return
}
val app = applicationContext
Thread({
val refused = com.droiddeck.launcher.stores.xbox.XboxManifest.needsAppModel(files)
val refused = files != null && com.droiddeck.launcher.stores.xbox.XboxManifest.needsAppModel(files)
val uncached = steamClient && !com.droiddeck.launcher.session.NoSteamLaunch.enabled(app, game) &&
com.droiddeck.launcher.session.OfflineMode.lacksAppInfo(app, game.appId)
ui.post {
when {
!launchCoordinator.isCurrent(request) || isFinishing || isDestroyed -> {
@@ -1057,11 +1061,14 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
android.widget.Toast.makeText(this, getString(R.string.game_needs_app_model, game.name), android.widget.Toast.LENGTH_LONG).show()
onSettled()
}
startGame(game, returnHome, onHandled, request) -> onSettled()
else -> launchCoordinator.releaseHandling(request)
else -> {
if (uncached) android.widget.Toast.makeText(this, getString(R.string.game_steam_offline_uncached, game.name), android.widget.Toast.LENGTH_LONG).show()
if (startGame(game, returnHome, onHandled, request)) onSettled()
else launchCoordinator.releaseHandling(request)
}
}
}
}, "xbox-app-model").start()
}, "game-launch-check").start()
}
private fun startGame(game: Library.SteamGame, returnHome: Boolean, onHandled: () -> Unit, ticket: LaunchTicket): Boolean {
@@ -1993,11 +2000,7 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
}
}
val askAllFiles = Build.VERSION.SDK_INT >= 30 && com.droiddeck.launcher.files.AllFilesAccess.missing() &&
!SessionPrefs.allFilesAsked(this)
if (savedInstanceState == null) {
if (!askAllFiles) ui.post { startSteamAtStartupIfEnabled(cold = true) }
}
if (savedInstanceState == null) ui.post { startSteamAtStartupIfEnabled(cold = true) }
saved?.let { state ->
restoreCompatLaunch(state)
pendingSwitch = savedIntent(state, KEY_PENDING_SWITCH)
@@ -2005,13 +2008,8 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
}
val wanted = ArrayList<String>()
if (Build.VERSION.SDK_INT >= 30) {
// From targetSdk 30, shared storage outside the app's own folders is all-files access or nothing.
if (askAllFiles) {
SessionPrefs.setAllFilesAsked(this)
com.droiddeck.launcher.files.AllFilesAccess.open(this)
}
} else if (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
// From Android 11, shared storage outside the app's own folders is all-files access, which the file picker asks for when a shared drive is opened.
if (Build.VERSION.SDK_INT < 30 && checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
wanted.add(Manifest.permission.WRITE_EXTERNAL_STORAGE)
}
if (SessionPrefs.micEnabled(this) && !SessionPrefs.micAsked(this)
@@ -2020,6 +2018,7 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
SessionPrefs.setMicAsked(this)
}
if (wanted.isNotEmpty()) requestPermissions(wanted.toTypedArray(), 1)
com.droiddeck.launcher.session.Onboarding.onFirstRunReady = firstRunReady
Thread({ com.droiddeck.launcher.stores.StoreAccounts.encryptAll(this) }, "store-credentials").start()
if (!SessionState.running) Thread({
com.droiddeck.launcher.session.LogMigration.run(this)
@@ -2111,7 +2110,10 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
override fun onWindowFocusChanged(hasFocus: Boolean) {
super.onWindowFocusChanged(hasFocus)
if (!hasFocus) triggerKeys.cancel()
if (!hasFocus) {
triggerKeys.cancel()
stopRightStickScroll()
}
if (hasFocus) {
com.droiddeck.launcher.ui.DualScreenPanel.yieldTo(taskId, false)
applyLauncherFullscreen()
@@ -2208,15 +2210,111 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
}
private val triggerKeys = com.droiddeck.launcher.input.TriggerKeys { dispatchKeyEvent(it) }
private val rightStickLayouts = HashMap<Int, Boolean>()
private val rightStickScrollHandler = android.os.Handler(android.os.Looper.getMainLooper())
private var rightStickScrollDeviceId = -1
private var rightStickScrollDeflection = 0f
private var rightStickScrollScheduled = false
private var rightStickNextDispatchAt = 0L
private val rightStickScrollTick = object : Runnable {
override fun run() {
val deviceId = rightStickScrollDeviceId
if (!hasWindowFocus() || (compatLaunch != null && !compatLaunch!!.loading.ended) ||
deviceId == -1 ||
android.view.InputDevice.getDevice(deviceId) == null ||
kotlin.math.abs(rightStickScrollDeflection) < 0.55f) {
stopRightStickScroll()
return
}
rightStickScrollScheduled = false
dispatchRightStickScroll(rightStickScrollDeflection, deviceId)
rightStickNextDispatchAt = android.os.SystemClock.uptimeMillis() + 130L
rightStickScrollHandler.postDelayed(this, 130L)
rightStickScrollScheduled = true
}
}
private fun stopRightStickScroll() {
rightStickScrollHandler.removeCallbacks(rightStickScrollTick)
rightStickScrollDeviceId = -1
rightStickScrollDeflection = 0f
rightStickScrollScheduled = false
}
private fun dispatchRightStickScroll(value: Float, deviceId: Int) {
val now = android.os.SystemClock.uptimeMillis()
val root = window.decorView
if (root.width <= 0 || root.height <= 0) return
val properties = android.view.MotionEvent.PointerProperties().apply {
id = 0
toolType = android.view.MotionEvent.TOOL_TYPE_MOUSE
}
val coordinates = android.view.MotionEvent.PointerCoords().apply {
x = root.width * 0.65f
y = root.height * 0.5f
setAxisValue(android.view.MotionEvent.AXIS_VSCROLL, -value * 3f)
}
val scroll = android.view.MotionEvent.obtain(
now, now, android.view.MotionEvent.ACTION_SCROLL, 1,
arrayOf(properties), arrayOf(coordinates), 0, 0, 1f, 1f,
deviceId, 0, android.view.InputDevice.SOURCE_MOUSE, 0,
)
try {
super.dispatchGenericMotionEvent(scroll)
} finally {
scroll.recycle()
}
}
private fun scrollPageWithRightStick(event: android.view.MotionEvent) {
if (event.actionMasked != android.view.MotionEvent.ACTION_MOVE ||
!com.droiddeck.launcher.input.PadBridge.isControllerMotionEvent(event)) return
val device = event.device ?: return
val rxRy = com.droiddeck.launcher.input.PadBridge.rightStickUsesRxRy(event, device, rightStickLayouts)
?: return
val axis = if (rxRy) android.view.MotionEvent.AXIS_RY else android.view.MotionEvent.AXIS_RZ
val value = event.getAxisValue(axis)
if (kotlin.math.abs(value) < 0.55f) {
if (rightStickScrollDeviceId == event.deviceId) stopRightStickScroll()
return
}
rightStickScrollDeviceId = event.deviceId
rightStickScrollDeflection = value
if (!rightStickScrollScheduled) {
val delay = (rightStickNextDispatchAt - android.os.SystemClock.uptimeMillis()).coerceAtLeast(0L)
rightStickScrollHandler.postDelayed(rightStickScrollTick, delay)
rightStickScrollScheduled = true
}
}
override fun dispatchGenericMotionEvent(event: android.view.MotionEvent): Boolean {
if (compatLaunch != null && !compatLaunch!!.loading.ended &&
com.droiddeck.launcher.input.PadBridge.isControllerMotionEvent(event)) return true
com.droiddeck.launcher.input.PadBridge.isControllerMotionEvent(event)) {
stopRightStickScroll()
return true
}
triggerKeys.onMotion(event)
scrollPageWithRightStick(event)
return super.dispatchGenericMotionEvent(event)
}
@Volatile private var inFront = false
private var autoSteamPending = false
/** Runs on the worker thread that finishes setup, so the foreground state is read as setup completes, not when the UI thread gets to it. */
private val firstRunReady: () -> Unit = {
val front = inFront
runOnUiThread { if (front) autoStartSteam() }
}
private fun autoStartSteam() {
if (isFinishing || isDestroyed || SessionState.running || !inFront) return
if (busy) autoSteamPending = true else playSteam()
}
override fun onPause() {
inFront = false
stopRightStickScroll()
compatLaunchVisible = false
if (android.os.Build.VERSION.SDK_INT >= 29) com.droiddeck.launcher.ui.DualScreenPanel.ownerPaused(taskId, true)
super.onPause()
@@ -2224,6 +2322,7 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
override fun onResume() {
super.onResume()
inFront = true
if (!homeChoiceOpen) {
HomeApp.releaseUnusedHomeEntry(this)
refreshHomeAppState()
@@ -2359,6 +2458,7 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
override fun onDestroy() {
// The queued launch was saved before this; a restored activity keeps its copy, and this one must not start it too.
if (com.droiddeck.launcher.session.Onboarding.onFirstRunReady === firstRunReady) com.droiddeck.launcher.session.Onboarding.onFirstRunReady = null
queuedLaunchRunner.destroy()
triggerKeys.cancel()
launchCoordinator.cancelAll()
@@ -3658,6 +3758,7 @@ class FrontEndActivity : ComponentActivity(), com.droiddeck.launcher.ui.AgentPet
refresh()
com.droiddeck.launcher.agent.AgentHost.refresh(this)
if (ok == true && LinuxRuntime.isInstalled(this)) { protons.checkUpdates(); protons.ensureSteamClient() }
if (autoSteamPending) { autoSteamPending = false; autoStartSteam() }
}
}, "runtime-operation").start()
}
@@ -26,6 +26,12 @@ internal object MaliAutoRoute {
fun userChoice(keyStored: Boolean, owner: String, route: String): Boolean = keyStored && owner != route
fun venusStandsIn(available: Boolean, hostVulkanOk: Boolean, venusOn: Boolean, venusExplicit: Boolean, gpuName: String): Boolean =
available && hostVulkanOk && if (venusExplicit) venusOn else !venusStallsOn(gpuName)
// Steam's web helper dies on its first window through Venus on these (#2879), so the bridge stands in.
fun venusStallsOn(gpuName: String): Boolean = gpuName.contains("G2-Ultra", ignoreCase = true)
fun shouldEnd(ownsRoute: String, mali: Boolean, installedPair: Boolean): Boolean =
mali && installedPair && ownsRoute != NONE
}
@@ -0,0 +1,36 @@
package com.droiddeck.launcher
import com.droiddeck.launcher.gpu.SteamVr
internal class QuestSteamVrWatch(start: Long) {
private var startupDeadline = start + STARTUP_MS
private var lastRunning: Long? = null
private var graceUntil = start
private var wasPaused = false
// A frozen guest cannot answer the status call, so a status read during a freeze, or one that
// started before it, says nothing about SteamVR.
fun stopped(now: Long, status: SteamVr.Status, paused: Boolean): Boolean {
if (paused) {
wasPaused = true
return false
}
if (wasPaused) {
wasPaused = false
graceUntil = now + RESUME_GRACE_MS
}
if (status == SteamVr.Status.RUNNING) {
lastRunning = now
graceUntil = now
return false
}
val deadline = lastRunning?.plus(RUNNING_GRACE_MS) ?: startupDeadline
return now >= maxOf(deadline, graceUntil)
}
companion object {
const val STARTUP_MS = 30_000L
const val RUNNING_GRACE_MS = 5_000L
const val RESUME_GRACE_MS = 15_000L
}
}
@@ -52,18 +52,17 @@ class QuestXrActivity : NativeActivity() {
if (!closing) leaveXr("SteamVR start failed", sessionAlive())
return@Thread
}
val startupDeadline = SystemClock.elapsedRealtime() + 30_000
var lastRunning: Long? = null
val watch = QuestSteamVrWatch(SystemClock.elapsedRealtime())
while (!closing) {
if (!sessionAlive()) {
leaveXr("Steam session ended", false)
break
}
steamVrStatus = SteamVr.status(this)
val now = SystemClock.elapsedRealtime()
if (steamVrStatus == SteamVr.Status.RUNNING) lastRunning = now
val deadline = lastRunning?.plus(5_000) ?: startupDeadline
if (steamVrStatus != SteamVr.Status.RUNNING && now >= deadline) {
val pausedBefore = guestPaused()
val status = SteamVr.status(this)
val paused = pausedBefore || guestPaused()
if (!paused) steamVrStatus = status
if (watch.stopped(SystemClock.elapsedRealtime(), status, paused)) {
leaveXr("SteamVR stopped or did not finish starting", true)
break
}
@@ -81,6 +80,8 @@ class QuestXrActivity : NativeActivity() {
}
}
private fun guestPaused() = SessionState.suspending || SessionState.suspended || SessionState.resuming
private fun sessionAlive() = SessionState.running && !SessionState.stopRequested &&
sessionId != null && SessionState.sessionId == sessionId
@@ -2916,6 +2916,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
val runtimeDir = File(filesDir, ".wayland-rt").apply { mkdirs() }
FileUtils.copyAsset(this, "wayland/keymap.xkb", File(runtimeDir, "keymap.xkb"))
com.droiddeck.launcher.input.VrControllers.publish(this)
com.droiddeck.launcher.session.QuestSteamVrLaunch.publish(this)
val turnip = TurnipDriver(this)
com.droiddeck.launcher.gpu.DriverSetupLog.write(this, "surface.driver-setup")
@@ -6371,6 +6372,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
}
if (CompositorHost.isStarted) applyFrameGen(force = true)
applyFollowOrientation(resources.configuration)
uiHandler.removeCallbacks(questSteamVrRequest)
if (com.droiddeck.launcher.session.QuestExperimental.isSupported()) uiHandler.post(questSteamVrRequest)
if (runtimeRemovalBlocked) return
if (!SessionState.suspended) pausedFrame = null
com.droiddeck.launcher.ui.Motion.refresh(this)
@@ -6430,10 +6433,19 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
}
override fun onPause() {
uiHandler.removeCallbacks(questSteamVrRequest)
departureCleanup()
super.onPause()
}
private val questSteamVrRequest = object : Runnable {
override fun run() {
if (com.droiddeck.launcher.session.QuestSteamVrLaunch.takeRequest(this@SessionActivity) &&
SessionState.running && SessionState.mode == SessionService.MODE_STEAM) steamVrAction("start")
uiHandler.postDelayed(this, 1000)
}
}
private fun departureCleanup() {
com.droiddeck.launcher.input.SystemKeyCapture.detach(this)
com.droiddeck.launcher.input.HomeButtonShortcuts.detach(this)
@@ -1,7 +1,6 @@
package com.droiddeck.launcher.agent
import android.content.Context
import android.os.Environment
import android.os.Handler
import android.os.Looper
import android.os.SystemClock
@@ -564,7 +563,7 @@ object AgentHost {
(if (connectAdb) "adb start-server >/dev/null 2>&1; adb connect \"\$ADB_SERIAL\" >/dev/null 2>&1; " else "") +
"cd \"$1\" 2>/dev/null; shift; exec \"$@\"", "sh", workdir,
)
val proot = LinuxRuntime.command(app, null, null, Environment.getExternalStorageDirectory(), null, env + shell + command, fakeRoot)
val proot = LinuxRuntime.command(app, null, null, LinuxRuntime.sharedStorage(app), null, env + shell + command, fakeRoot)
return ProcessBuilder(proot).redirectErrorStream(true).apply {
environment().apply {
remove("LD_PRELOAD"); remove("LD_AUDIT"); remove("LD_LIBRARY_PATH")
@@ -8,9 +8,18 @@ import android.os.Environment
import android.provider.Settings
object AllFilesAccess {
private val VOLUME = Regex("^(/storage/emulated/\\d+|/storage/[^/]+|/sdcard)(/.*)?$")
private val APP_FOLDERS = listOf("/Android/data", "/Android/obb")
fun missing(sdk: Int = Build.VERSION.SDK_INT, granted: () -> Boolean = { Environment.isExternalStorageManager() }): Boolean =
sdk >= Build.VERSION_CODES.R && !granted()
/** Whether reading [path] takes all-files access: shared storage, outside the per-app folders directly under a volume's root, which Android always lets the app use. */
fun covers(path: String): Boolean {
val inside = VOLUME.matchEntire(path)?.groupValues?.get(2) ?: return false
return APP_FOLDERS.none { inside == it || inside.startsWith("$it/") }
}
fun open(context: Context) {
val app = Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION, Uri.parse("package:" + context.packageName))
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
@@ -504,13 +504,15 @@ fun FileManagerScreen(
}
val drives = remember(storageTick) { StorageRoots.list(context) }
var accessDrive by remember { mutableStateOf<String?>(null) }
var accessWasMissing by remember { mutableStateOf(AllFilesAccess.missing()) }
var accessDeclined by remember { mutableStateOf(false) }
fun unreadable(drive: StorageRoot) {
if (AllFilesAccess.missing()) accessDrive = drive.label
else Toast.makeText(context, context.getString(R.string.fm_drive_not_readable, drive.label), Toast.LENGTH_SHORT).show()
}
accessDrive?.let { label ->
OutlinedAlertDialog(
onDismissRequest = { accessDrive = null },
onDismissRequest = { accessDrive = null; accessDeclined = true },
title = { Text(stringResource(R.string.fm_drive_access_title, label)) },
text = { Text(stringResource(R.string.fm_drive_access_text)) },
confirmButton = {
@@ -519,9 +521,17 @@ fun FileManagerScreen(
AllFilesAccess.open(context)
}, modifier = Modifier.focusGlide(CircleShape)) { Text(stringResource(R.string.upd_open_settings)) }
},
dismissButton = { TextButton(onClick = { accessDrive = null }, modifier = Modifier.focusGlide(CircleShape)) { Text(stringResource(R.string.common_cancel)) } },
dismissButton = { TextButton(onClick = { accessDrive = null; accessDeclined = true }, modifier = Modifier.focusGlide(CircleShape)) { Text(stringResource(R.string.common_cancel)) } },
)
}
LaunchedEffect(currentDir, storageTick) {
if (!AllFilesAccess.missing()) {
if (accessWasMissing) { accessWasMissing = false; loadDirectory(currentDir, resetScroll = false, record = false) }
} else {
accessWasMissing = true
if (!accessDeclined && accessDrive == null && AllFilesAccess.covers(currentDir.path)) accessDrive = drives.firstOrNull { currentDir.path.startsWith(it.dir.path) }?.label ?: context.getString(R.string.fm_drive_internal)
}
}
val linuxRoot = remember(storageTick) {
com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context).takeIf { File(it, "usr").isDirectory }
}
@@ -499,6 +499,7 @@ object AddedGames {
launchOptions = when {
sidecar == null -> SessionPrefs.addedGameLaunch(context, folder.path)
sidecar.store == Store.UBISOFT -> com.droiddeck.launcher.stores.ubisoft.UbisoftConnect.launchOptions(context)
sidecar.store == Store.EA -> SessionPrefs.addedGameLaunch(context, folder.path)
else -> ""
},
single = single != null, steamProgram = steamProgram))
@@ -80,20 +80,38 @@ object SteamAppInfo {
private fun JSONArray?.strings(): List<String> = if (this == null) emptyList() else (0 until length()).map { optString(it) }
internal fun read(file: File, appId: Int): Info? {
if (!file.isFile) return null
internal fun read(file: File, appId: Int): Info? = scan(file, appId, unreadable = null, missing = null) { raf, entry ->
if (entry.size > 64L * 1024 * 1024) return@scan null
val body = ByteArray(entry.size.toInt())
raf.readFully(body)
val strings = entry.tableAt?.let { readStrings(raf, it) }
val kv = ByteBuffer.wrap(body, entry.fixed, body.size - entry.fixed).order(ByteOrder.LITTLE_ENDIAN)
val tree = readMap(kv, strings)
@Suppress("UNCHECKED_CAST")
val app = (tree["appinfo"] as? Map<String, Any>) ?: tree
infoOf(app)
}
fun cached(file: File, appId: Int): Boolean? =
runCatching { scan(file, appId, unreadable = null, missing = false) { _, _ -> true } }
.onFailure { Log.w(TAG, "appinfo: ${it.javaClass.simpleName}") }
.getOrNull()
private class Entry(val fixed: Int, val tableAt: Long?, val size: Long)
private fun <T> scan(file: File, appId: Int, unreadable: T, missing: T, found: (RandomAccessFile, Entry) -> T): T {
if (!file.isFile) return unreadable
RandomAccessFile(file, "r").use { raf ->
val head = ByteBuffer.allocate(16).order(ByteOrder.LITTLE_ENDIAN)
raf.readFully(head.array(), 0, 8)
val magic = head.getInt(0)
val version = magic and 0xFF
if (magic ushr 8 != 0x075644 || version !in 0x27..0x29) return null
var strings: List<String>? = null
if (magic ushr 8 != 0x075644 || version !in 0x27..0x29) return unreadable
var tableAt: Long? = null
var pos = 8L
if (version >= 0x29) {
raf.readFully(head.array(), 8, 8)
val tableAt = head.getLong(8)
strings = readStrings(raf, tableAt)
tableAt = head.getLong(8)
pos = 16L
}
val fixed = if (version >= 0x28) 4 + 4 + 8 + 20 + 4 + 20 else 4 + 4 + 8 + 20 + 4
@@ -103,20 +121,11 @@ object SteamAppInfo {
raf.readFully(entry.array(), 0, 8)
val id = entry.getInt(0)
val size = entry.getInt(4).toLong() and 0xFFFFFFFFL
if (id == 0) return null
if (id == appId) {
if (size > 64L * 1024 * 1024) return null
val body = ByteArray(size.toInt())
raf.readFully(body)
val kv = ByteBuffer.wrap(body, fixed, body.size - fixed).order(ByteOrder.LITTLE_ENDIAN)
val tree = readMap(kv, strings)
@Suppress("UNCHECKED_CAST")
val app = (tree["appinfo"] as? Map<String, Any>) ?: tree
return infoOf(app)
}
if (id == 0) return missing
if (id == appId) return found(raf, Entry(fixed, tableAt, size))
pos += 8 + size
}
return null
return missing
}
}
@@ -59,7 +59,7 @@ public final class PadBridge {
private final PadState[] playerStates = new PadState[SLOTS];
private final float[][] rawSticks = new float[SLOTS][4];
private final Map<Integer, Boolean> rightStickLayouts = new HashMap<>();
private final boolean[][] keyTriggers = new boolean[SLOTS][2];
private final TriggerKey[][] keyTriggers = TriggerKey.slots(SLOTS);
private final int[] retainedSticks = new int[SLOTS];
private final PadState effectiveState = new PadState();
private final PadState homeGuideReport = new PadState();
@@ -484,7 +484,7 @@ public final class PadBridge {
stateFor(slot).clear();
retainedSticks[slot] = 0;
Arrays.fill(rawSticks[slot], 0f);
Arrays.fill(keyTriggers[slot], false);
for (TriggerKey key : keyTriggers[slot]) key.reset();
}
private void mutateState(java.util.function.Consumer<PadState> mutation) {
@@ -530,7 +530,7 @@ public final class PadBridge {
float lx = event.getAxisValue(MotionEvent.AXIS_X);
float ly = event.getAxisValue(MotionEvent.AXIS_Y);
boolean wired = wiredXboxLayout(device, event.getSource());
boolean rxRyStick = rightStickUsesRxRy(event, device, rightStickLayouts);
boolean rxRyStick = Boolean.TRUE.equals(rightStickUsesRxRy(event, device, rightStickLayouts));
float rx = event.getAxisValue(rxRyStick ? MotionEvent.AXIS_RX : MotionEvent.AXIS_Z);
float ry = event.getAxisValue(rxRyStick ? MotionEvent.AXIS_RY : MotionEvent.AXIS_RZ);
retainStick(slot, JoyCon.LEFT, lx, ly);
@@ -570,26 +570,76 @@ public final class PadBridge {
return true;
}
static float keyTrigger(float current, boolean pressed, int repeatCount, boolean analog, boolean[] held, int side) {
static final class TriggerKey {
static final float RELEASE_FROM_PEAK = 0.05f;
boolean held;
boolean handoff;
boolean axisLive;
boolean axisMovedWhilePressed;
float peak;
float axis;
static TriggerKey[][] slots(int count) {
TriggerKey[][] keys = new TriggerKey[count][2];
for (TriggerKey[] pair : keys) {
pair[0] = new TriggerKey();
pair[1] = new TriggerKey();
}
return keys;
}
void reset() {
held = false;
handoff = false;
axisLive = false;
axisMovedWhilePressed = false;
peak = 0f;
axis = 0f;
}
}
static float keyTrigger(float current, boolean pressed, int repeatCount, boolean analog, TriggerKey[] keys, int side) {
TriggerKey key = keys[side];
if (repeatCount > 0) return current;
if (!analog) {
held[side] = pressed;
key.held = pressed;
return pressed ? 1f : 0f;
}
if (pressed) {
if (current != 0f) return current;
held[side] = true;
key.axisMovedWhilePressed = false;
if (key.axisLive || current != 0f) return current;
key.held = true;
return 1f;
}
if (!held[side]) return current;
held[side] = false;
if (!key.axisMovedWhilePressed) key.axisLive = false;
if (key.handoff) {
key.handoff = false;
return key.axis;
}
if (!key.held) return current;
key.held = false;
return 0f;
}
static float axisTrigger(float value, boolean[] held, int side) {
if (!held[side]) return value;
if (value == 0f) return 1f;
held[side] = false;
static float axisTrigger(float value, TriggerKey[] keys, int side) {
TriggerKey key = keys[side];
key.axis = value;
if (value != 0f) {
key.axisLive = true;
key.axisMovedWhilePressed = true;
}
if (key.held) {
if (value == 0f) return 1f;
key.held = false;
key.handoff = true;
key.peak = value;
return 1f;
}
if (key.handoff) {
key.peak = Math.max(key.peak, value);
if (value > key.peak - TriggerKey.RELEASE_FROM_PEAK) return 1f;
key.handoff = false;
}
return value;
}
@@ -604,14 +654,14 @@ public final class PadBridge {
return false;
}
static boolean rightStickUsesRxRy(MotionEvent event, InputDevice device, Map<Integer, Boolean> layouts) {
public static Boolean rightStickUsesRxRy(MotionEvent event, InputDevice device, Map<Integer, Boolean> layouts) {
int source = event.getSource();
if (wiredXboxLayout(device, source)) return true;
boolean hasRxRy = hasAxis(device, source, MotionEvent.AXIS_RX)
&& hasAxis(device, source, MotionEvent.AXIS_RY);
boolean hasZRz = hasAxis(device, source, MotionEvent.AXIS_Z)
&& hasAxis(device, source, MotionEvent.AXIS_RZ);
if (!hasRxRy) return false;
if (!hasRxRy) return hasZRz ? false : null;
if (!hasZRz) return true;
Boolean cached = layouts.get(event.getDeviceId());
if (cached != null) return cached;
@@ -619,7 +669,7 @@ public final class PadBridge {
&& nearCentre(device, source, event, MotionEvent.AXIS_RX, MotionEvent.AXIS_RY);
boolean zRzEvidence = atMinimum(device, source, event, MotionEvent.AXIS_RX, MotionEvent.AXIS_RY)
&& nearCentre(device, source, event, MotionEvent.AXIS_Z, MotionEvent.AXIS_RZ);
if (rxRyEvidence == zRzEvidence) return false;
if (rxRyEvidence == zRzEvidence) return null;
boolean useRxRy = rxRyEvidence;
layouts.put(event.getDeviceId(), useRxRy);
return useRxRy;
@@ -90,7 +90,7 @@ class PadMouse(private val listener: Listener, private val clock: () -> Long = S
val sticks = physical.getOrPut(event.deviceId) { Sticks() }
val device = event.device
val wired = wiredLayout.getOrPut(event.deviceId) { PadBridge.wiredXboxLayout(device, event.source) }
val rxRyStick = PadBridge.rightStickUsesRxRy(event, device, rightStickLayouts)
val rxRyStick = PadBridge.rightStickUsesRxRy(event, device, rightStickLayouts) ?: false
sticks.leftX = event.getAxisValue(MotionEvent.AXIS_X)
sticks.leftY = event.getAxisValue(MotionEvent.AXIS_Y)
sticks.rightX = scrollAxis(event, if (rxRyStick) MotionEvent.AXIS_RX else MotionEvent.AXIS_Z)
@@ -1,7 +1,6 @@
package com.droiddeck.launcher.runtime
import android.content.Context
import android.os.Environment
import com.droiddeck.launcher.core.DownloadSource
import com.droiddeck.launcher.core.HostProcess
import com.droiddeck.launcher.session.OrphanReaper
@@ -37,7 +36,7 @@ object GuestCommand {
SessionFiles.stage(context, root)
LinuxNetworkLinkComponent(context, root).publish()
val runtimeDir = File(context.filesDir, ".flatpak-rt").apply { mkdirs() }
val binds = LinuxRuntime.binds(context, null, runtimeDir, Environment.getExternalStorageDirectory(), extraBinds)
val binds = LinuxRuntime.binds(context, null, runtimeDir, LinuxRuntime.sharedStorage(context), extraBinds)
val native = NativeGuest.forSession(context)
val fastPathKey = if (!native && fastPath && !fakeRoot && linkDir == null && ProotFastPath.enabled(context)) ProotFastPath.key(root, binds) else null
val guest = mutableListOf(
@@ -302,9 +302,9 @@ class LinuxNetworkLinkComponent(
val etc = File(rootDir, "etc")
replace(File(etc, "resolv.conf"), text)
val hosts = File(etc, "hosts")
if (!hosts.isFile || !hosts.readText().contains("localhost")) {
hosts.writeText("127.0.0.1 localhost\n::1 localhost\n")
}
val existing = if (hosts.isFile) hosts.readText() else null
val wanted = hostsText(existing)
if (wanted != existing) replace(hosts, wanted)
Log.i(TAG, "resolver: " + servers.joinToString(" "))
} catch (e: IOException) {
Log.w(TAG, "Could not write the resolver", e)
@@ -338,6 +338,42 @@ class LinuxNetworkLinkComponent(
companion object {
private val WRITES = Any()
private const val HOSTS_BLOCK_START = "# DroidDeck: Unity telemetry is refused (start)"
private const val HOSTS_BLOCK_END = "# DroidDeck: Unity telemetry is refused (end)"
// Unity 5's player seeds its bundled OpenSSL before its first HTTPS request, and that code jumps
// to a bad address under FEX (Windlands, 428370). Refusing these telemetry hosts makes the request
// fail before TLS starts; the games run without them.
internal val UNITY_TELEMETRY_HOSTS = listOf(
"config.uca.cloud.unity3d.com", "api.uca.cloud.unity3d.com", "cdp.cloud.unity3d.com",
"stats.unity3d.com", "perf-events.cloud.unity3d.com",
)
internal fun hostsText(existing: String?): String {
val kept = mutableListOf<String>()
var block: MutableList<String>? = null
for (line in existing.orEmpty().lines()) {
when {
line == HOSTS_BLOCK_START -> {
block?.let(kept::addAll)
block = mutableListOf()
}
line == HOSTS_BLOCK_END -> block = null
block != null -> block!!.add(line)
else -> kept.add(line)
}
}
block?.let(kept::addAll)
kept.removeAll { it.isBlank() }
return buildString {
if (kept.none { it.substringBefore('#').contains("localhost") }) append("127.0.0.1 localhost\n::1 localhost\n")
kept.forEach { append(it).append('\n') }
append(HOSTS_BLOCK_START).append('\n')
append("0.0.0.0 ").append(UNITY_TELEMETRY_HOSTS.joinToString(" ")).append('\n')
append(HOSTS_BLOCK_END).append('\n')
}
}
internal fun gateways(properties: LinkProperties?, capabilities: NetworkCapabilities?): List<InetAddress> =
listOf(Inet4Address::class.java, Inet6Address::class.java).mapNotNull { family ->
properties?.routes.orEmpty()
@@ -185,7 +185,12 @@ public final class LinuxRuntime {
public static List<String> lastBinds(Context context) {
List<String> binds = lastBinds;
if (binds != null) return binds;
return binds(context, null, null, android.os.Environment.getExternalStorageDirectory(), null);
return binds(context, null, null, sharedStorage(context), null);
}
/** The phone's shared storage, or null when it should stay out of the container. */
public static File sharedStorage(Context context) {
return SessionPrefs.mountSharedStorage(context) ? android.os.Environment.getExternalStorageDirectory() : null;
}
public static List<String> prootPrefix(Context context, File root, String cwd) {
@@ -112,8 +112,9 @@ object NativeGuest {
File(BwrapSpawner.hostPath(binds.map { BwrapSpawner.Bind.parse(it) }, root.path, cwd)).takeIf { it.isDirectory } ?: root
/** A process for [guest] (argv) started as proot would with [binds], in guest directory [cwd]. */
fun processBuilder(context: Context, root: File, binds: List<String>, guest: List<String>, cwd: String = "/root"): ProcessBuilder =
ProcessBuilder(command(root, guest.first(), guest.drop(1)))
fun processBuilder(context: Context, root: File, binds: List<String>, guest: List<String>, cwd: String = "/root"): ProcessBuilder {
if (sessionMode == null) prepare(context, root)
return ProcessBuilder(command(root, guest.first(), guest.drop(1)))
.directory(workingDirectory(root, binds, cwd))
.also { builder ->
builder.environment().apply {
@@ -121,6 +122,7 @@ object NativeGuest {
putAll(sessionEnvironment(root, binds, guest.first(), SessionPrefs.guestHostname(context)))
}
}
}
private const val RUNPATH_CONF = "etc/ld.so.conf.d/zz-droiddeck-native.conf"
private val SCAN_DIRS = listOf("usr/lib", "usr/local/lib", "opt")
@@ -149,6 +151,7 @@ object NativeGuest {
}
/** What a rootfs needs before anything runs in it natively; cheap once done. */
@Synchronized
fun prepare(context: Context, root: File) {
val relinked = relinkAbsoluteSymlinks(context, root)
if (relinked > 0) android.util.Log.i(TAG, "native userland: $relinked absolute symlinks made relative")
@@ -14,6 +14,7 @@ import com.droiddeck.launcher.R
import com.droiddeck.launcher.core.Downloader
import com.droiddeck.launcher.core.FileUtils
import com.droiddeck.launcher.core.Hashes
import com.droiddeck.launcher.session.SessionPrefs
import com.droiddeck.launcher.store.FlathubApi
import org.json.JSONArray
import org.json.JSONObject
@@ -184,9 +185,10 @@ object UserApps {
fun binds(context: Context): List<String> {
val internal = Environment.getExternalStorageDirectory().canonicalPath
val mounted = SessionPrefs.mountSharedStorage(context)
return root(context).listFiles().orEmpty().mapNotNull { dir ->
val target = runCatching { Os.readlink(File(dir, "files").path) }.getOrNull() ?: return@mapNotNull null
target.takeIf { !it.startsWith("$internal/") && File(it).isDirectory }
target.takeIf { !(mounted && it.startsWith("$internal/")) && File(it).isDirectory }
}.distinct()
}
@@ -475,7 +477,8 @@ object UserApps {
if (!file.isFile) return context.getString(R.string.user_apps_file_gone)
if (!FlatpakManager.ready(context)) FlatpakManager.setup(context, onProgress)?.let { return it }
val shared = Environment.getExternalStorageDirectory().canonicalPath
val copy = File(LinuxRuntime.rootDir(context), "tmp/droiddeck-bundle.flatpak").takeIf { !file.canonicalPath.startsWith("$shared/") }
val copy = File(LinuxRuntime.rootDir(context), "tmp/droiddeck-bundle.flatpak")
.takeIf { !SessionPrefs.mountSharedStorage(context) || !file.canonicalPath.startsWith("$shared/") }
try {
if (copy != null) {
onProgress(context.getString(R.string.user_apps_copying, file.name), -1)
@@ -40,6 +40,7 @@ object BottomDesktop {
val generation: Int,
val installed: Boolean,
val nativeUserland: Boolean,
val sharedStorage: File?,
)
@Volatile private var launch: Launch? = null
@@ -91,10 +92,11 @@ object BottomDesktop {
sessionDir: File,
generation: Int,
nativeUserland: Boolean,
sharedStorage: File?,
stillCurrent: () -> Boolean,
) {
val prepared = Launch(ArrayList(guest), ArrayList(binds), sessionRoot, hostEnvironment.copyOf(), root, sessionDir, generation,
DesktopCatalog.desktopInstalled(root), nativeUserland)
DesktopCatalog.desktopInstalled(root), nativeUserland, sharedStorage)
synchronized(launchLock) { if (stillCurrent()) launch = prepared }
}
@@ -313,7 +315,7 @@ object BottomDesktop {
val runtime = runtimeDir(context).apply { mkdirs() }
val imeDir = File(current.sessionRoot, "bottom-desktop-ime")
main.post { if (generation == guestGeneration) watchIme(imeDir) }
val binds = LinuxRuntime.binds(context, current.sessionRoot, runtime, Environment.getExternalStorageDirectory(), current.binds)
val binds = LinuxRuntime.binds(context, current.sessionRoot, runtime, current.sharedStorage, current.binds)
val guest = ArrayList(current.guest).apply {
add("DD_WIDTH=$width")
add("DD_HEIGHT=$height")
@@ -3,6 +3,7 @@ package com.droiddeck.launcher.session
import android.content.Context
import android.util.Log
import com.droiddeck.launcher.agent.AgentGuest
import com.droiddeck.launcher.frontend.SteamAppInfo
import com.droiddeck.launcher.runtime.LinuxRuntime
import java.io.File
@@ -63,6 +64,9 @@ object OfflineMode {
fun active(context: Context): Boolean =
offline(enabled(context), isOnline(context), auto(context))
fun lacksAppInfo(context: Context, appId: Int): Boolean =
active(context) && SteamAppInfo.cached(SteamAppInfo.appinfoFile(context), appId) == false
@Synchronized
fun setEnabled(context: Context, on: Boolean) {
write(context, LinuxRuntime.rootDir(context), on)
@@ -29,6 +29,10 @@ object Onboarding {
/** The setup screens belong to the first run; later runtime, Proton and Steam client updates keep the usual Play button. */
val firstRun = MutableStateFlow(true)
/** Called once, when this process finishes the first-run downloads itself; not when everything was already in place. */
@Volatile var onFirstRunReady: (() -> Unit)? = null
@Volatile private var worked = false
fun attach(context: Context) {
appContext = context.applicationContext
val prefs = context.applicationContext.getSharedPreferences(PREFS, Context.MODE_PRIVATE)
@@ -52,8 +56,10 @@ object Onboarding {
private fun markFirstRunDone() {
val context = appContext ?: return
val live = firstRun.value && worked
context.getSharedPreferences(PREFS, Context.MODE_PRIVATE).edit().putBoolean(KEY_FIRST_RUN_DONE, true).apply()
firstRun.value = false
if (live) onFirstRunReady?.invoke()
}
/** Keeps the process in the foreground, with one notification, while a step downloads and the runtime installer is not already doing so. */
@@ -90,6 +96,7 @@ object Onboarding {
}
fun report(step: Step, label: String, percent: Int) {
worked = true
failed.value = failed.value - step
active.value = active.value + (step to Progress(label, percent))
keepAlive()
@@ -0,0 +1,35 @@
package com.droiddeck.launcher.session
import android.content.Context
import java.io.File
/**
* On a Quest, SteamVR has to run inside the immersive activity. A launch from Steam's library happens in the
* guest, so the guest's SteamVR helper leaves a request in the shared runtime directory for the session to act on.
*/
object QuestSteamVrLaunch {
private const val DIR = ".wayland-rt/droiddeck-steamvr"
private const val MARKER = "quest-immersive"
private const val REQUEST = "xr-request"
fun publish(context: Context) {
val dir = File(context.filesDir, DIR)
val marker = File(dir, MARKER)
if (!QuestExperimental.isSupported()) {
marker.delete()
return
}
runCatching {
dir.mkdirs()
marker.writeText("")
}
}
/** A request left by an earlier session must not open the immersive view in this one. */
fun clearRequest(context: Context) {
File(context.filesDir, "$DIR/$REQUEST").delete()
}
fun takeRequest(context: Context): Boolean =
QuestExperimental.isSupported() && File(context.filesDir, "$DIR/$REQUEST").delete()
}
@@ -960,12 +960,6 @@ object SessionPrefs {
fun micAsked(context: Context): Boolean = prefs(context).getBoolean("micAsked", false)
fun allFilesAsked(context: Context): Boolean = prefs(context).getBoolean("allFilesAsked", false)
fun setAllFilesAsked(context: Context) {
prefs(context).edit().putBoolean("allFilesAsked", true).apply()
}
fun bluetoothAsked(context: Context): Boolean = prefs(context).getBoolean("bluetoothAsked", false)
fun setBluetoothAsked(context: Context) {
@@ -1090,6 +1084,14 @@ object SessionPrefs {
fun gameThreadHints(context: Context): Boolean = prefs(context).getBoolean("gameThreadHints", true)
/** Whether the phone's shared storage (/sdcard) is mounted into the Linux container. */
@JvmStatic
fun mountSharedStorage(context: Context): Boolean = prefs(context).getBoolean("mountSharedStorage", true)
fun setMountSharedStorage(context: Context, on: Boolean) {
prefs(context).edit().putBoolean("mountSharedStorage", on).apply()
}
fun prootNoSeccomp(context: Context): Boolean = prefs(context).getBoolean("prootNoSeccomp", false)
fun setProotNoSeccomp(context: Context, on: Boolean) {
@@ -1227,6 +1229,11 @@ object SessionPrefs {
prefs(context).edit().putBoolean("venus", on).apply()
}
/** Venus off with no choice stored, so that Auto turning it off does not read as the user's own choice. */
fun clearVenus(context: Context) {
prefs(context).edit().remove("venus").apply()
}
fun setVkBridge(context: Context, on: Boolean) {
prefs(context).edit().putBoolean("vkBridge", on).putBoolean("bridgeFellBack", false).apply()
}
@@ -417,6 +417,7 @@ class SessionService : Service() {
SessionPrefs.screenEffectsProfileId(SessionState.mode, resolvedGameId, SessionState.program),
)
com.droiddeck.launcher.stores.battlenet.BattleNetClient.clearRequests(LinuxRuntime.sessionRoot(this))
QuestSteamVrLaunch.clearRequest(this)
val gen = synchronized(SessionState.startLock) {
synchronized(stopLock) {
SessionState.steamClientArch = null
@@ -742,14 +743,15 @@ class SessionService : Service() {
SessionEvents.step("shm-clear") { FileUtils.clear(File(LinuxRuntime.liveDir(this), "shm")) }
val binds = sessionBinds(controllersOn, fakeInputDir, sessionDir, guest, sessionRoot, runtimeDir)
val sharedStorage = LinuxRuntime.sharedStorage(this)
val binds = sessionBinds(controllersOn, fakeInputDir, sessionDir, guest, sessionRoot, runtimeDir, sharedStorage)
val nativeUserland = com.droiddeck.launcher.runtime.NativeGuest.enabled(this)
synchronized(stopLock) {
if (gen == sessionGen && SessionState.running) com.droiddeck.launcher.runtime.NativeGuest.sessionMode = nativeUserland
}
val fastPathKey = if (ProotFastPath.enabled(this)) {
val prootBinds = LinuxRuntime.binds(
this, sessionRoot, runtimeDir, Environment.getExternalStorageDirectory(), binds,
this, sessionRoot, runtimeDir, sharedStorage, binds,
)
val root = LinuxRuntime.rootDir(this)
ProotFastPath.key(root, prootBinds)?.also { key ->
@@ -763,12 +765,12 @@ class SessionService : Service() {
}
} else null
val sessionBindSpecs = LinuxRuntime.binds(this, sessionRoot, runtimeDir, Environment.getExternalStorageDirectory(), binds)
val sessionBindSpecs = LinuxRuntime.binds(this, sessionRoot, runtimeDir, sharedStorage, binds)
val command = if (nativeUserland) {
LinuxRuntime.rememberSessionBinds(sessionBindSpecs)
com.droiddeck.launcher.runtime.NativeGuest.command(root, guest.first(), guest.drop(1))
} else {
LinuxRuntime.command(this, sessionRoot, runtimeDir, Environment.getExternalStorageDirectory(), binds, guest)
LinuxRuntime.command(this, sessionRoot, runtimeDir, sharedStorage, binds, guest)
}
val prootEnv = HostEnvironment()
@@ -797,7 +799,7 @@ class SessionService : Service() {
val terminalCommand = if (nativeUserland) {
com.droiddeck.launcher.runtime.NativeGuest.command(root, shellGuest.first(), shellGuest.drop(1))
} else {
LinuxRuntime.command(this, sessionRoot, runtimeDir, Environment.getExternalStorageDirectory(), binds, shellGuest)
LinuxRuntime.command(this, sessionRoot, runtimeDir, sharedStorage, binds, shellGuest)
}
val terminalHostEnvironment = LinkedHashMap(System.getenv())
hostEnv.asArray().forEach { entry ->
@@ -808,7 +810,7 @@ class SessionService : Service() {
SessionTerminal.prepare(terminalCommand, terminalHostEnvironment.map { (key, value) -> "$key=$value" }.toTypedArray(), root, gen)
val (fastPathName, _) = ProotFastPath.hostEnv("")
BottomDesktop.prepare(desktopGuest, binds, sessionRoot,
prootEnv.asArray().filterNot { it.startsWith("$fastPathName=") }.toTypedArray(), root, sessionDir, gen, nativeUserland,
prootEnv.asArray().filterNot { it.startsWith("$fastPathName=") }.toTypedArray(), root, sessionDir, gen, nativeUserland, sharedStorage,
) { gen == sessionGen && SessionState.running }
}
@@ -1256,6 +1258,7 @@ class SessionService : Service() {
guest: MutableList<String>,
sessionRoot: File,
runtimeDir: File,
sharedStorage: File?,
): ArrayList<String> {
val binds = ArrayList<String>()
if (controllersOn) binds.add(fakeInputDir.path + ":/dev/input")
@@ -1299,7 +1302,17 @@ class SessionService : Service() {
if (controllersOn) components.add(RumbleComponent().also { it.attach(this) })
val home = File(LinuxRuntime.rootDir(this), "root")
File(home, "Storage").mkdirs()
binds.add(Environment.getExternalStorageDirectory().path + ":/root/Storage")
if (sharedStorage != null) {
binds.add(sharedStorage.path + ":/root/Storage")
} else {
for (folder in com.droiddeck.launcher.frontend.AddedExes.list(this).map { File(it.folder) }.distinctBy { it.path }) {
val guest = com.droiddeck.launcher.frontend.AddedGames.guestPath(this, folder) ?: continue
if (!guest.startsWith("/root/Storage/") || !folder.isDirectory) continue
File(LinuxRuntime.rootDir(this), guest.removePrefix("/")).mkdirs()
binds.add(folder.path + ":" + guest)
Log.i(TAG, "added game: $folder -> $guest (shared storage not mounted)")
}
}
val library = GameStorage.effective(this)
steamLibraryMounts = emptyMap()
var storageDiagnosticLibrary: File? = null
@@ -1373,7 +1386,7 @@ class SessionService : Service() {
val gamesLibraries = GameStorage.gamesFolderLibraries(this)
if (gamesLibraries.isNotEmpty()) {
var room = if (ProotFastPath.enabled(this)) {
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, Environment.getExternalStorageDirectory(), binds).size
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, sharedStorage, binds).size
} else Int.MAX_VALUE
for (games in gamesLibraries) {
if (games.host.path + ":" + games.guest !in binds) continue
@@ -1415,7 +1428,7 @@ class SessionService : Service() {
}
try {
val room = if (ProotFastPath.enabled(this)) {
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, Environment.getExternalStorageDirectory(), binds).size
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, sharedStorage, binds).size
} else Int.MAX_VALUE
val content = SecondaryLibrary.contentPath(entry.host)
val extra = SecondaryLibrary.binds(filesDir, entry.host, listOf(entry.guest), content = content)
@@ -1444,7 +1457,7 @@ class SessionService : Service() {
Log.w(TAG, "x86-64 steam library: $problem")
} else try {
val room = if (ProotFastPath.enabled(this)) {
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, Environment.getExternalStorageDirectory(), binds).size
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, sharedStorage, binds).size
} else Int.MAX_VALUE
val extra = SecondaryLibrary.binds(filesDir, x64, listOf(GameStorage.X64_CARD_GUEST)).drop(1)
if (extra.size > room) {
@@ -1466,7 +1479,7 @@ class SessionService : Service() {
}
try {
val room = if (ProotFastPath.enabled(this)) {
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, Environment.getExternalStorageDirectory(), binds).size
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, sharedStorage, binds).size
} else Int.MAX_VALUE
val extra = SecondaryLibrary.binds(filesDir, entry.x64Host, listOf(entry.x64Guest)).drop(1)
if (extra.size > room) {
@@ -1502,7 +1515,7 @@ class SessionService : Service() {
val listing = File(filesDir, "session/desktop-volumes.json").apply { parentFile?.mkdirs() }
val volumes = org.json.JSONArray()
var room = if (ProotFastPath.enabled(this)) {
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, Environment.getExternalStorageDirectory(), binds).size
ProotFastPath.MAX_BINDS - LinuxRuntime.binds(this, sessionRoot, runtimeDir, sharedStorage, binds).size
} else Int.MAX_VALUE
for (root in com.droiddeck.launcher.files.StorageRoots.list(this)) {
if (!root.removable || !root.readable) continue
@@ -22,7 +22,7 @@ object SettingsReset {
"gpuDriverMode", "androidDriver", "linuxDriver", "linuxDriver.steam", "linuxDriver.desktop",
"tuSysmem", "glThread", "noGlError", "zinkLazy", "mangoapp", "gpuClockPin", "gamescopeRealtime", "paceCores",
"directAudio", "mic", "wifiDiscovery", "clientCpusOverride", "clientCpus", "gameCpus",
"noXalia", "fastSync", "fsyncFirst", "syncFallback", "prootNoSeccomp", "prootFastPath", "nativeUserland", "cursorComposite",
"noXalia", "fastSync", "fsyncFirst", "syncFallback", "prootNoSeccomp", "prootFastPath", "nativeUserland", "cursorComposite", "mountSharedStorage",
"guestHostname", "fexPreset", "forceSsbs", "logs", "gameDebugLogsEnabled", "enhancedDiagnosticsNext", "storageDiagnostics", "buildWatermark",
"upscaler", "upscaleSharpness", "screenEffects", "blackFrameInsertion", "textureAnisotropy", "textureLodBias",
"steamDownloadsInBackground", "steam_offline", "steam_offline_auto", "steam_offline_by_network", "bootMovie", "bootMovieSound", "bootMovieVolume", "bootMovieSeconds", "skipBootMovie",
@@ -105,14 +105,9 @@ object WinComponents {
const val VCREDIST_ARM64 = "vcredist2022_arm64"
internal fun builtInArm64Runtime(): Component {
fun value(view: String, name: String, type: String, data: String) = Step("set_register_key", JSONObject()
.put("action", "set_register_key").put("key", "HKLM\\Software\\${view}Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\arm64")
.put("value", name).put("type", type).put("data", data))
val steps = listOf("", "Wow6432Node\\").flatMap { view ->
listOf(value(view, "Installed", "REG_DWORD", "1"), value(view, "Major", "REG_DWORD", "14"), value(view, "Minor", "REG_DWORD", "44"),
value(view, "Bld", "REG_DWORD", "35211"), value(view, "Rbld", "REG_DWORD", "0"), value(view, "Version", "REG_SZ", "v14.44.35211.00"))
}
return Component(VCREDIST_ARM64, "Microsoft Visual C++ 2015-2022 ARM64 runtime 14.44.35211 (registry entries only)", "Microsoft", "ready", emptyList(), steps)
val install = Step("install_exe", JSONObject().put("action", "install_exe").put("file_name", "VC_redist.arm64.exe")
.put("url", "https://aka.ms/vs/17/release/vc_redist.arm64.exe"))
return Component(VCREDIST_ARM64, "Microsoft Visual C++ 2015-2022 Redistributable (arm64)", "Microsoft", "ready", emptyList(), listOf(install), revision = 2)
}
private fun parse(body: String): List<Component>? {
@@ -97,7 +97,7 @@ object StoreLaunch {
lines += "del \"%~dp0$EA_ENV\""
lines += ":run"
lines += "if exist \"$EA_ORIGIN\" start \"\" \"$EA_ORIGIN\""
lines += run
lines += "$run %*"
lines += "taskkill /f /im Origin.exe >nul 2>&1"
} else {
lines += run
@@ -1,7 +1,6 @@
package com.droiddeck.launcher.stores.gog
import android.content.Context
import android.os.Environment
import android.util.Log
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -143,9 +142,9 @@ object GogComet {
val pb = if (com.droiddeck.launcher.runtime.NativeGuest.forSession(context)) {
val root = LinuxRuntime.rootDir(context)
com.droiddeck.launcher.runtime.NativeGuest.processBuilder(context, root,
LinuxRuntime.binds(context, null, null, Environment.getExternalStorageDirectory(), null), guest).redirectErrorStream(true)
LinuxRuntime.binds(context, null, null, LinuxRuntime.sharedStorage(context), null), guest).redirectErrorStream(true)
} else {
ProcessBuilder(LinuxRuntime.command(context, null, null, Environment.getExternalStorageDirectory(), guest)).redirectErrorStream(true).also {
ProcessBuilder(LinuxRuntime.command(context, null, null, LinuxRuntime.sharedStorage(context), guest)).redirectErrorStream(true).also {
it.environment().apply {
remove("LD_PRELOAD"); remove("LD_AUDIT"); remove("LD_LIBRARY_PATH")
put("PROOT_LOADER", LinuxRuntime.prootLoader(context).path)
@@ -94,17 +94,16 @@ internal object XboxManifest {
}
fun executable(folder: File): String {
for (path in read(folder).executables) {
val listed = read(folder).executables
for (path in listed) {
require(!path.startsWith('/') && !path.contains(':') && path.split('/').none { it == ".." || it.isEmpty() })
var file = folder
for (part in path.split('/')) {
val matches = file.listFiles().orEmpty().filter { it.name.equals(part, true) }
require(matches.size == 1) { "Missing or ambiguous Xbox launch path." }
file = matches.single()
}
val file = path.split('/').fold<String, File?>(folder) { dir, part ->
dir?.listFiles().orEmpty().filter { it.name.equals(part, true) }.singleOrNull()
} ?: continue
require(file.canonicalPath.startsWith(folder.canonicalPath + File.separator))
if (file.isFile) return forwarded(folder, file) ?: file.relativeTo(folder).invariantSeparatorsPath
}
require(listed.isEmpty()) { "Missing or ambiguous Xbox launch path." }
error("The Xbox package has no supported PC launch executable.")
}
@@ -1,7 +1,6 @@
package com.droiddeck.launcher.stores.xbox
import android.content.Context
import android.os.Environment
import com.droiddeck.launcher.core.AddonPack
import com.droiddeck.launcher.runtime.LinuxNetworkLinkComponent
import com.droiddeck.launcher.runtime.LinuxRuntime
@@ -82,7 +81,7 @@ internal object Xodus {
networkLink.start()
val runtime = (runtimeDirectory ?: File(app.filesDir, "xbox-runtime")).apply { mkdirs() }
val root = LinuxRuntime.rootDir(app)
val external = Environment.getExternalStorageDirectory()
val external = LinuxRuntime.sharedStorage(app)
val extraBinds = StoreInstallRoot.externalBindSpecsForXodus(app)
val binds = LinuxRuntime.binds(app, null, null, external, extraBinds)
val fastPathPreloaded = runCatching {
@@ -57,12 +57,17 @@ import com.droiddeck.launcher.stores.StoresState
/** What the Library pretends while a developer previews it. Nothing here is saved: a restart always comes back to [OFF]. */
internal enum class LibraryPreview { OFF, NOTHING_INSTALLED, SIGNED_OUT, SAMPLE }
/** How many games the Steam home pretends are installed. Nothing here is saved. */
internal enum class SteamHomePreview(val games: Int) { OFF(-1), NONE(0), FEW(3), MANY(12) }
internal enum class DrawerPreview { STEAM, DESKTOP, GAME }
/** Developer tools' preview states: screens that are otherwise hard to reach, shown without changing anything real. */
internal object DevPreview {
var library by mutableStateOf(LibraryPreview.OFF)
var drawer by mutableStateOf<DrawerPreview?>(null)
var steamHome by mutableStateOf(SteamHomePreview.OFF)
var openSteam by mutableStateOf(false)
/** The UI zoo sheet: where previews are picked, one at a time, only when asked for. */
var zoo by mutableStateOf(false)
/** Opt-in: a preview button where its state lives (the Library's toolbar), for switching states without the zoo. */
@@ -87,6 +92,41 @@ internal fun sampleOwned(store: Store): List<CatalogItem> =
internal fun sampleInstalled(owned: Map<Store, List<CatalogItem>>): Set<String> =
owned.values.flatMap { items -> items.take(SAMPLE_INSTALLED).map { it.key } }.toSet()
/** The Steam home's games while a developer previews it: this many invented titles, no art, nothing installed. */
internal fun sampleSteamHomeGames(count: Int): List<com.droiddeck.launcher.frontend.Library.SteamGame> = listOf(
"Portal 2", "Hades", "Celeste", "Stardew Valley", "Hollow Knight", "Balatro",
"Dead Cells", "Terraria", "Vampire Survivors", "Slay the Spire", "Cuphead", "Inscryption",
).take(count).mapIndexed { i, name ->
com.droiddeck.launcher.frontend.Library.SteamGame(1000 + i, name, art = null, library = "steam", lastPlayed = 1_700_000_000_000L - i * 86_400_000L)
}
/** The pill a previewed Steam home shows, so the fake state is never mistaken for the real one. */
@Composable
internal fun SteamHomePreviewPill(modifier: Modifier = Modifier) {
val preview = DevPreview.steamHome
if (preview == SteamHomePreview.OFF) return
val colors = MaterialTheme.colorScheme
val pal = LocalPalette.current
val label = stringResource(
when (preview) {
SteamHomePreview.NONE -> R.string.dev_preview_steam_none
SteamHomePreview.FEW -> R.string.dev_preview_steam_few
else -> R.string.dev_preview_steam_many
},
)
val end = stringResource(R.string.dev_preview_end)
Row(
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp),
modifier = modifier.background(colors.surface, CircleShape).border(1.dp, pal.signal, CircleShape)
.clickable(role = Role.Button, onClickLabel = end) { DevPreview.steamHome = SteamHomePreview.OFF }
.padding(start = 14.dp, end = 10.dp, top = 8.dp, bottom = 8.dp).testTag("dev-preview-steam-end"),
) {
Icon(Icons.Outlined.Visibility, null, tint = pal.signal, modifier = Modifier.size(18.dp))
Text(stringResource(R.string.dev_preview_banner, label), fontSize = 13.sp, fontWeight = FontWeight.SemiBold, color = colors.onBackground)
Icon(Icons.Filled.Close, end, tint = colors.onSurfaceVariant, modifier = Modifier.size(18.dp))
}
}
/** The pill a previewed Library shows, so the fake state is never mistaken for the real one. */
@Composable
internal fun LibraryPreviewPill(modifier: Modifier = Modifier) {
@@ -215,6 +255,17 @@ internal fun UiZooSheet() {
DrawerPreview.GAME to R.string.session_title_game,
)) ActionRow(stringResource(label), null, show, onClick = { close(); DevPreview.drawer = mode }, modifier = Modifier.testTag("zoo-drawer-${mode.name.lowercase()}"))
}
SettingsGroup(stringResource(R.string.dev_preview_steam_home)) {
for ((mode, label) in listOf(
SteamHomePreview.NONE to R.string.dev_preview_steam_none,
SteamHomePreview.FEW to R.string.dev_preview_steam_few,
SteamHomePreview.MANY to R.string.dev_preview_steam_many,
)) ActionRow(
stringResource(label), null, show,
onClick = { close(); DevPreview.steamHome = mode; DevPreview.openSteam = true },
modifier = Modifier.testTag("zoo-steam-${mode.name.lowercase()}"),
)
}
SettingsGroup(stringResource(R.string.dev_preview_library)) {
for ((mode, label) in listOf(
LibraryPreview.NOTHING_INSTALLED to R.string.dev_preview_library_nothing_installed,
@@ -272,7 +272,10 @@ private fun Content(
return
}
if (selected == "steam") {
SteamHome(s, a, modifier)
Box(modifier) {
SteamHome(s, a, Modifier.fillMaxSize())
SteamHomePreviewPill(Modifier.align(androidx.compose.ui.Alignment.BottomCenter).padding(bottom = 20.dp))
}
return
}
if (selected == "store") {
@@ -658,6 +658,11 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com
LaunchedEffect(SetupTabs.openSection) {
if (SetupTabs.openSection != null && (railSelection != "setup" || s.pageKey != null)) showRailPage("setup", true)
}
LaunchedEffect(DevPreview.openSteam) {
if (!DevPreview.openSteam) return@LaunchedEffect
DevPreview.openSteam = false
showRailPage("steam", true)
}
LaunchedEffect(DevPreview.openLibrary) {
if (!DevPreview.openLibrary) return@LaunchedEffect
DevPreview.openLibrary = false
@@ -96,6 +96,7 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import coil.compose.AsyncImage
import com.droiddeck.launcher.R
import com.droiddeck.launcher.frontend.AddedGameEdits
import com.droiddeck.launcher.frontend.GameRemoval
import com.droiddeck.launcher.frontend.Library
import com.droiddeck.launcher.runtime.CurseForgeApp
@@ -104,6 +105,7 @@ import com.droiddeck.launcher.runtime.WowAddonCatalog
import com.droiddeck.launcher.runtime.WowAddons
import com.droiddeck.launcher.store.UserAppsState
import com.droiddeck.launcher.session.GameSaves
import com.droiddeck.launcher.session.SessionPrefs
import com.droiddeck.launcher.session.SessionState
import com.droiddeck.launcher.stores.CatalogItem
import com.droiddeck.launcher.stores.CloudSaves
@@ -1001,6 +1003,25 @@ private fun LaunchTab(game: Library.SteamGame, s: FrontEndState, a: FrontEndActi
}
val folder = game.gameFiles
if (game.library == Library.ADDED && game.source == Library.ADDED && !s.shortcutPicker && folder != null) ShortcutFields(game, folder)
if (game.library == Library.ADDED && Store.byId(game.source) == Store.EA && folder != null) StoreLaunchOptions(folder, a)
}
}
@Composable
private fun StoreLaunchOptions(folder: File, a: FrontEndActions) {
val app = LocalContext.current.applicationContext
val scope = rememberCoroutineScope()
var saved by remember(folder.path) { mutableStateOf(SessionPrefs.addedGameLaunch(app, folder.path)) }
var editing by remember(folder.path) { mutableStateOf(false) }
Column(Modifier.fillMaxWidth().tabPanel()) {
MenuItem(stringResource(R.string.edit_launch_options), checked = false, detail = saved.ifEmpty { "—" }) { editing = true }
}
if (editing) TextEntryDialog(stringResource(R.string.edit_launch_options), saved, onDismiss = { editing = false }) { value ->
scope.launch {
withContext(Dispatchers.IO) { AddedGameEdits.setLaunchOptions(app, folder.path, value) }
saved = value
a.onAddedGamesChanged(listOf(folder.path))
}
}
}
@@ -195,6 +195,10 @@ internal fun librarySources(
}
}
internal fun alwaysLibraryTabs(signedIn: Collection<Store>, stores: Boolean, soundMode: Boolean): Set<String> =
(if (soundMode) emptyList() else signedIn.map { it.librarySource }).toSet() +
listOfNotNull(Library.ADDED.takeIf { stores }, Store.BATTLENET.id.takeIf { stores })
internal object LibraryDisplay {
const val DEFAULT_LEVEL = 2
val scales = listOf(0.75f, 0.875f, 1f, 1.2f, 1.45f)
@@ -374,7 +378,7 @@ internal fun LibraryPage(s: FrontEndState, a: FrontEndActions, selected: String,
.map { it.store.id }.toSet()
val sources = librarySources(
all, storeTabs.map { it.store.id },
listOfNotNull(Store.ITCH.id.takeIf { itchSignedIn && !soundMode }, Store.GAMEJOLT.id.takeIf { gameJoltSignedIn && !soundMode }, Library.ADDED.takeIf { stores }, Store.BATTLENET.id.takeIf { stores }).toSet() + signInChips,
alwaysLibraryTabs(owned.keys, stores, soundMode) + signInChips,
favorites, concealed,
offStores = if (soundMode) emptySet() else storeTabs.filterNot { it.shown }.map { it.store.id }.toSet(),
places = if (soundMode) DEFAULT_LIBRARY_PLACES else StoreTabsState.libraryPlaces,
@@ -3,6 +3,8 @@ package com.droiddeck.launcher.ui
import androidx.compose.foundation.shape.CircleShape
import com.droiddeck.launcher.R
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.platform.LocalContext
import com.droiddeck.launcher.session.SessionPrefs
import androidx.compose.foundation.layout.Column
import androidx.compose.ui.Modifier
import androidx.compose.foundation.layout.Spacer
@@ -22,7 +24,7 @@ fun RomsDialog(path: String?, onChoose: () -> Unit, onClear: () -> Unit, onDismi
text = {
Column {
Text(
stringResource(R.string.roms_text),
stringResource(if (SessionPrefs.mountSharedStorage(LocalContext.current)) R.string.roms_text else R.string.roms_text_unmounted),
style = MaterialTheme.typography.bodyMedium,
)
Spacer(Modifier.height(10.dp))
@@ -92,6 +92,7 @@ internal object SettingsIndex {
s(SettingsSection.CONTROLLER, R.string.setup_tab_controller, "gamepad", "buttons", "mapping", "profile", "remap"),
SettingsEntry(SettingsPlace.TAB, R.string.rail_storage, tab = "storage", words = listOf("sd card", "space", "uninstall", "disk")),
SettingsEntry(SettingsPlace.TAB, R.string.storage_shared_mount, tab = "storage", words = listOf("sdcard", "mount", "privacy", "files")),
SettingsEntry(SettingsPlace.TAB, R.string.rail_sync, tab = "sync", words = listOf("syncthing", "saves")),
SettingsEntry(SettingsPlace.TAB, R.string.rail_decky, tab = "decky", words = listOf("plugins", "plugin store", "homebrew", "loader")),
SettingsEntry(SettingsPlace.TAB, R.string.rail_boot_movies, tab = "boot-movies", words = listOf("startup movie", "boot video", "animation", "steamdeckrepo")),
@@ -113,7 +113,8 @@ internal fun SteamHome(s: FrontEndState, a: FrontEndActions, modifier: Modifier)
}
val owned = remember(ownedAll, concealed) { ownedAll.filter { it.first.toLong() !in concealed } }
val featured = remember(featuredAll, concealed) { featuredAll.filter { it.appId.toLong() !in concealed } }
val games = remember(s.steamGames, LibraryHidden.keys, LibraryHidden.steam) { s.steamGames.filterNot { LibraryHidden.isHidden(hideKey(it), it) }.sortedWith(compareByDescending<Library.SteamGame> { it.lastPlayed }.thenBy { it.gameId }) }
val previewing = DevPreview.steamHome
val games = remember(s.steamGames, previewing, LibraryHidden.keys, LibraryHidden.steam) { (if (previewing == SteamHomePreview.OFF) s.steamGames else sampleSteamHomeGames(previewing.games)).filterNot { LibraryHidden.isHidden(hideKey(it), it) }.sortedWith(compareByDescending<Library.SteamGame> { it.lastPlayed }.thenBy { it.gameId }) }
val narrow = LocalNarrowPane.current
var words by remember { mutableStateOf<Rect?>(null) }
val mode = com.droiddeck.launcher.session.SessionService.MODE_STEAM
@@ -163,12 +164,12 @@ internal fun SteamHome(s: FrontEndState, a: FrontEndActions, modifier: Modifier)
games.isEmpty() -> EmptyLibrary(
avoid = words,
wall = if (owned.isEmpty() && featured.isEmpty()) null else { { CapsuleWall(emptyList(), owned = owned, featured = featured) } },
) { Box(Modifier.fillMaxSize().graphicsLayer { scaleX = 1.06f; scaleY = 1.06f }) { WallFade() } }
) { Box(Modifier.fillMaxSize().graphicsLayer { scaleX = 1.06f; scaleY = 1.06f }) { WallFade(bottomWhenTall = true) } }
games.size < WALL_MIN_GAMES -> CapsuleFan(games)
else -> CapsuleWall(games, owned = owned, featured = featured)
}
},
scrim = { if (games.size >= WALL_MIN_GAMES) WallFade() },
scrim = { if (games.size >= WALL_MIN_GAMES) WallFade(bottomWhenTall = true) },
words = {
val onboardingActive by com.droiddeck.launcher.session.Onboarding.active.collectAsState()
val onboardingFailed by com.droiddeck.launcher.session.Onboarding.failed.collectAsState()
@@ -232,19 +233,35 @@ internal fun Modifier.overhang(by: androidx.compose.ui.unit.Dp = 4.dp): Modifier
}
@Composable
internal fun WallFade(modifier: Modifier = Modifier.fillMaxSize().overhang()) {
internal fun WallFade(modifier: Modifier = Modifier.fillMaxSize().overhang(), bottomWhenTall: Boolean = false) {
val colors = MaterialTheme.colorScheme
Box(
modifier.background(
Brush.horizontalGradient(
0f to colors.background.copy(alpha = 0.86f),
0.34f to colors.background.copy(alpha = 0.6f),
0.68f to colors.background.copy(alpha = 0.14f),
1f to colors.background.copy(alpha = 0.04f),
),
),
)
Box(modifier.background(Brush.verticalGradient(0.6f to Color.Transparent, 1f to colors.background.copy(alpha = 0.75f))))
BoxWithConstraints(modifier) {
if (bottomWhenTall && maxHeight > maxWidth) {
// The words sit at the bottom of a tall page, so the art stays clear above them and darkens only behind them.
Box(
Modifier.fillMaxSize().background(
Brush.verticalGradient(
0f to colors.background.copy(alpha = 0.12f),
0.5f to colors.background.copy(alpha = 0.18f),
0.72f to colors.background.copy(alpha = 0.72f),
1f to colors.background.copy(alpha = 0.94f),
),
),
)
} else {
Box(
Modifier.fillMaxSize().background(
Brush.horizontalGradient(
0f to colors.background.copy(alpha = 0.86f),
0.34f to colors.background.copy(alpha = 0.6f),
0.68f to colors.background.copy(alpha = 0.14f),
1f to colors.background.copy(alpha = 0.04f),
),
),
)
Box(Modifier.fillMaxSize().background(Brush.verticalGradient(0.6f to Color.Transparent, 1f to colors.background.copy(alpha = 0.75f))))
}
}
}
@Composable
@@ -387,31 +404,45 @@ private fun CapsuleFan(games: List<Library.SteamGame>) {
transition.animateFloat(0f, 1f, infiniteRepeatable(tween(ms, easing = FastOutSlowInEasing), RepeatMode.Reverse), label = "float")
}
val still = Motion.scale == 0f
val slots = listOf(
val landscape = listOf(
FanSlot(0.54f, 0.14f, 0.62f, -9f),
FanSlot(0.70f, 0.24f, 0.56f, 5f),
FanSlot(0.40f, 0.30f, 0.50f, -17f),
)
// A tall page sizes the cards from its width, so they fit any aspect; heights are fractions of the width.
val portrait = listOf(
FanSlot(0.27f, 0.11f, 0.70f, -9f),
FanSlot(0.55f, 0.19f, 0.64f, 5f),
FanSlot(0.04f, 0.26f, 0.56f, -17f),
)
BoxWithConstraints(
Modifier.fillMaxSize().drawBehind {
drawRect(
Brush.radialGradient(
listOf(pal.signal.copy(alpha = 0.14f), Color.Transparent),
center = Offset(size.width * 0.68f, size.height * 0.45f), radius = size.height * 0.6f,
center = if (size.height > size.width) Offset(size.width * 0.55f, size.height * 0.28f) else Offset(size.width * 0.68f, size.height * 0.45f),
radius = if (size.height > size.width) size.width * 0.9f else size.height * 0.6f,
),
)
},
) {
val radius = with(density) { 14.dp.toPx() }
val tall = maxHeight > maxWidth
val slots = if (tall) portrait else landscape
for (i in games.indices.reversed()) {
val slot = slots[i]
val h = maxHeight * slot.height
val h = if (tall) maxWidth * slot.height else maxHeight * slot.height
val x = if (tall) {
// The lean and the float swing the corners out by about h/2 * sin(angle).
val swing = h * kotlin.math.sin(Math.toRadians(kotlin.math.abs(slot.lean) + 2.0)).toFloat() / 2f
(maxWidth * slot.x).coerceIn(swing, (maxWidth - h * 2f / 3f - swing).coerceAtLeast(swing))
} else maxWidth * slot.x
val v: State<Float> = floats[i]
val look = WallCapsule(artBrush(hueOf(games[i].name)), games[i].art)
val art = look.art?.let { rememberCapsuleArt(it, with(density) { Size((h * 2f / 3f).toPx(), h.toPx()) }, radius) }
Spacer(
Modifier
.offset(x = maxWidth * slot.x, y = maxHeight * slot.y)
.offset(x = x, y = maxHeight * slot.y)
.size(h * 2f / 3f, h)
.graphicsLayer {
val t = if (still) 0f else v.value
@@ -168,6 +168,20 @@ internal fun StoragePanel(s: FrontEndState, a: FrontEndActions) {
}
}
@Composable
private fun SharedStorageGroup() {
val ctx = LocalContext.current
var on by remember { mutableStateOf(SessionPrefs.mountSharedStorage(ctx)) }
SettingsGroup(stringResource(R.string.setup_runtime)) {
SettingsRow(stringResource(R.string.storage_shared_mount), stringResource(R.string.storage_shared_mount_hint)) {
ToggleSwitch(on, label = stringResource(R.string.storage_shared_mount), modifier = Modifier.testTag("setting-shared-storage")) {
SessionPrefs.setMountSharedStorage(ctx, it)
on = it
}
}
}
}
@Composable
private fun DefaultStorageGroup() {
val ctx = LocalContext.current
@@ -347,6 +361,7 @@ private fun OverviewContent(report: StorageSummary, sessionRunning: Boolean, wid
Note(stringResource(R.string.storage_session_running))
}
DefaultStorageGroup()
SharedStorageGroup()
SectionTitle(stringResource(R.string.storage_where), null)
val unused = report.unusedTools
val tiles = listOf<@Composable (Modifier) -> Unit>(
+4
View File
@@ -1492,6 +1492,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">استئناف %1$s</string>
<string name="roms_text">يظهر باسم /root/ROMs في كل جلسة. مساحة التخزين الداخلية متاحة في /root/Storage.</string>
<string name="roms_text_unmounted">يظهر باسم /root/ROMs في كل جلسة.</string>
<string name="roms_none">لم يتم اختيار مجلد</string>
<string name="roms_applies">يُطبَّق في الجلسة التالية. بطاقات SD مدعومة.</string>
<string name="roms_choose">اختيار مجلد</string>
@@ -3339,6 +3340,8 @@
<string name="storage_default_group">موقع التثبيت</string>
<string name="storage_default_title">التخزين الافتراضي</string>
<string name="storage_default_hint">تُثبَّت ألعاب المتاجر الجديدة في الموقع المحدد. تبقى الألعاب الحالية في مكانها. تحتفظ مكتبات Steam بإعدادها الخاص.</string>
<string name="storage_shared_mount">مساحة تخزين الهاتف في Linux</string>
<string name="storage_shared_mount_hint">يربط مساحة التخزين الداخلية لهاتفك في /root/Storage. عند إيقافه، تُربط فقط مجلدات الألعاب التي أضفتها منها. لا تتأثر بطاقات SD. يُطبَّق في الجلسة التالية.</string>
<string name="storage_default_ask">السؤال في كل مرة</string>
<string name="storage_default_ask_detail">اختر وجهة لكل تثبيت</string>
<string name="storage_default_internal">مساحة التخزين الداخلية</string>
@@ -4307,4 +4310,5 @@
<string name="steam_store_linux_build">تثبّت هذه اللعبة إصدار Linux الخاص بها. ثبّتها من Steam.</string>
<string name="game_zoom_title">تكبير اللعبة</string>
<string name="game_zoom_hint">اضبط تكبير اللعبة من 100% إلى 300%</string>
<string name="game_steam_offline_uncached">Steam في وضع عدم الاتصال ولم يحمّل %1$s بعد. اتصل بالإنترنت في Steam مرة واحدة لتشغيلها.</string>
</resources>
@@ -1538,6 +1538,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Reanudar %1$s</string>
<string name="roms_text">Aparece como /root/ROMs en cada sesión. El almacenamiento interno está en /root/Storage.</string>
<string name="roms_text_unmounted">Aparece como /root/ROMs en cada sesión.</string>
<string name="roms_none">Ninguna carpeta elegida</string>
<string name="roms_applies">Se aplica en la próxima sesión. Las tarjetas SD funcionan.</string>
<string name="roms_choose">Elegir carpeta</string>
@@ -3215,6 +3216,8 @@
<string name="storage_default_group">Ubicación de instalación</string>
<string name="storage_default_title">Almacenamiento predeterminado</string>
<string name="storage_default_hint">Las nuevas instalaciones de las tiendas van a la ubicación seleccionada. Los juegos existentes se quedan donde están. Las bibliotecas de Steam conservan su propio ajuste.</string>
<string name="storage_shared_mount">Almacenamiento del teléfono en Linux</string>
<string name="storage_shared_mount_hint">Monta el almacenamiento interno de tu teléfono en /root/Storage. Si está desactivado, solo se montan las carpetas de juegos que agregaste desde ahí. No afecta a las tarjetas SD. Se aplica en la próxima sesión.</string>
<string name="storage_default_ask">Preguntar siempre</string>
<string name="storage_default_ask_detail">Elige un destino para cada instalación</string>
<string name="storage_default_internal">Almacenamiento interno</string>
@@ -4185,4 +4188,5 @@
<string name="steam_store_close_steam">Cierra Steam primero</string>
<string name="steam_store_session_wait">Pausa primero la descarga de Steam</string>
<string name="steam_store_linux_build">Este juego instala su versión para Linux. Instálalo desde Steam.</string>
<string name="game_steam_offline_uncached">Steam está en modo sin conexión y todavía no cargó %1$s. Conéctate en Steam una vez para jugarlo.</string>
</resources>
+4
View File
@@ -1460,6 +1460,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Продължаване на %1$s</string>
<string name="roms_text">Показва се като /root/ROMs във всяка сесия. Вътрешната памет е на /root/Storage.</string>
<string name="roms_text_unmounted">Показва се като /root/ROMs във всяка сесия.</string>
<string name="roms_none">Няма избрана папка</string>
<string name="roms_applies">Прилага се от следващата сесия. SD картите работят.</string>
<string name="roms_choose">Избор на папка</string>
@@ -3219,6 +3220,8 @@
<string name="storage_default_group">Място за инсталиране</string>
<string name="storage_default_title">Хранилище по подразбиране</string>
<string name="storage_default_hint">Новите инсталации от магазини отиват в избраното място. Съществуващите игри остават, където са. Библиотеките на Steam запазват собствената си настройка.</string>
<string name="storage_shared_mount">Хранилище на телефона в Linux</string>
<string name="storage_shared_mount_hint">Монтира вътрешната памет на телефона ви в /root/Storage. Когато е изключено, се монтират само папките с игри, които сте добавили от нея. SD картите не се засягат. Прилага се от следващата сесия.</string>
<string name="storage_default_ask">Питане всеки път</string>
<string name="storage_default_ask_detail">Избор на място за всяка инсталация</string>
<string name="storage_default_internal">Вътрешна памет</string>
@@ -4147,4 +4150,5 @@
<string name="steam_store_linux_build">Тази игра инсталира версията си за Linux. Инсталирайте я от Steam.</string>
<string name="game_zoom_title">Мащабиране на играта</string>
<string name="game_zoom_hint">Регулирайте увеличението на играта от 100% до 300%</string>
<string name="game_steam_offline_uncached">Steam е в офлайн режим и още не е заредил %1$s. Свържете Steam онлайн веднъж, за да я играете.</string>
</resources>
+4
View File
@@ -1476,6 +1476,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Obnovit %1$s</string>
<string name="roms_text">V každé relaci se zobrazí jako /root/ROMs. Vnitřní úložiště je v /root/Storage.</string>
<string name="roms_text_unmounted">V každé relaci se zobrazí jako /root/ROMs.</string>
<string name="roms_none">Nevybrána žádná složka</string>
<string name="roms_applies">Použije se v další relaci. SD karty fungují.</string>
<string name="roms_choose">Vybrat složku</string>
@@ -3279,6 +3280,8 @@
<string name="storage_default_group">Umístění instalace</string>
<string name="storage_default_title">Výchozí úložiště</string>
<string name="storage_default_hint">Nové instalace z obchodů půjdou do vybraného umístění. Stávající hry zůstanou, kde jsou. Knihovny Steamu mají vlastní nastavení.</string>
<string name="storage_shared_mount">Úložiště telefonu v Linuxu</string>
<string name="storage_shared_mount_hint">Připojí vnitřní úložiště telefonu do /root/Storage. Když je vypnuto, připojí se jen složky her, které jste z něj přidali. Karet SD se to netýká. Projeví se v příští relaci.</string>
<string name="storage_default_ask">Vždy se zeptat</string>
<string name="storage_default_ask_detail">Vybrat cíl u každé instalace</string>
<string name="storage_default_internal">Interní úložiště</string>
@@ -4227,4 +4230,5 @@
<string name="steam_store_linux_build">Tato hra instaluje svou verzi pro Linux. Nainstalujte ji ze Steamu.</string>
<string name="game_zoom_title">Přiblížení hry</string>
<string name="game_zoom_hint">Nastavte zvětšení hry od 100 % do 300 %</string>
<string name="game_steam_offline_uncached">Steam je v režimu offline a %1$s ještě nenačetl. Jednou se ve Steamu připojte online, abyste ji mohli hrát.</string>
</resources>
+4
View File
@@ -1460,6 +1460,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Genoptag %1$s</string>
<string name="roms_text">Vises som /root/ROMs i hver session. Intern lagerplads er på /root/Storage.</string>
<string name="roms_text_unmounted">Vises som /root/ROMs i hver session.</string>
<string name="roms_none">Ingen mappe valgt</string>
<string name="roms_applies">Gælder fra næste session. SD-kort fungerer.</string>
<string name="roms_choose">Vælg mappe</string>
@@ -3219,6 +3220,8 @@
<string name="storage_default_group">Installationsplacering</string>
<string name="storage_default_title">Standardlager</string>
<string name="storage_default_hint">Nye butiksinstallationer går til den valgte placering. Eksisterende spil bliver, hvor de er. Steam-biblioteker har deres egen indstilling.</string>
<string name="storage_shared_mount">Telefonens lager i Linux</string>
<string name="storage_shared_mount_hint">Monterer telefonens interne lager på /root/Storage. Når det er slået fra, monteres kun de spilmapper, du har tilføjet derfra. SD-kort påvirkes ikke. Træder i kraft ved næste session.</string>
<string name="storage_default_ask">Spørg hver gang</string>
<string name="storage_default_ask_detail">Vælg en placering for hver installation</string>
<string name="storage_default_internal">Internt lager</string>
@@ -4147,4 +4150,5 @@
<string name="steam_store_linux_build">Dette spil installerer sin Linux-version. Installer det fra Steam.</string>
<string name="game_zoom_title">Spilzoom</string>
<string name="game_zoom_hint">Juster spillets forstørrelse fra 100 % til 300 %</string>
<string name="game_steam_offline_uncached">Steam er i offlinetilstand og har ikke indlæst %1$s endnu. Gå online i Steam én gang for at spille det.</string>
</resources>
+4
View File
@@ -1452,6 +1452,7 @@
<string name="rail_percent">%1$d %%</string>
<string name="rail_resume_named">%1$s fortsetzen</string>
<string name="roms_text">Erscheint in jeder Sitzung als /root/ROMs. Der interne Speicher liegt unter /root/Storage.</string>
<string name="roms_text_unmounted">Erscheint in jeder Sitzung als /root/ROMs.</string>
<string name="roms_none">Kein Ordner ausgewählt</string>
<string name="roms_applies">Gilt ab der nächsten Sitzung. SD-Karten funktionieren.</string>
<string name="roms_choose">Ordner auswählen</string>
@@ -3219,6 +3220,8 @@
<string name="storage_default_group">Installationsort</string>
<string name="storage_default_title">Standardspeicher</string>
<string name="storage_default_hint">Neue Store-Installationen landen am ausgewählten Ort. Vorhandene Spiele bleiben, wo sie sind. Steam-Bibliotheken behalten ihre eigene Einstellung.</string>
<string name="storage_shared_mount">Telefonspeicher in Linux</string>
<string name="storage_shared_mount_hint">Bindet den internen Speicher deines Telefons unter /root/Storage ein. Wenn aus, werden nur Spielordner eingebunden, die du daraus hinzugefügt hast. SD-Karten sind nicht betroffen. Gilt ab der nächsten Sitzung.</string>
<string name="storage_default_ask">Jedes Mal fragen</string>
<string name="storage_default_ask_detail">Für jede Installation ein Ziel wählen</string>
<string name="storage_default_internal">Interner Speicher</string>
@@ -4147,4 +4150,5 @@
<string name="steam_store_linux_build">Dieses Spiel installiert seine Linux-Version. Installiere es über Steam.</string>
<string name="game_zoom_title">Spielzoom</string>
<string name="game_zoom_hint">Spielvergrößerung von 100 % bis 300 % anpassen</string>
<string name="game_steam_offline_uncached">Steam ist im Offlinemodus und hat %1$s noch nicht geladen. Gehe einmal in Steam online, um es zu spielen.</string>
</resources>
+4
View File
@@ -1460,6 +1460,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Συνέχιση %1$s</string>
<string name="roms_text">Εμφανίζεται ως /root/ROMs σε κάθε συνεδρία. Ο εσωτερικός χώρος αποθήκευσης βρίσκεται στο /root/Storage.</string>
<string name="roms_text_unmounted">Εμφανίζεται ως /root/ROMs σε κάθε συνεδρία.</string>
<string name="roms_none">Δεν έχει επιλεγεί φάκελος</string>
<string name="roms_applies">Ισχύει από την επόμενη συνεδρία. Οι κάρτες SD λειτουργούν.</string>
<string name="roms_choose">Επιλογή φακέλου</string>
@@ -3219,6 +3220,8 @@
<string name="storage_default_group">Τοποθεσία εγκατάστασης</string>
<string name="storage_default_title">Προεπιλεγμένος αποθηκευτικός χώρος</string>
<string name="storage_default_hint">Οι νέες εγκαταστάσεις από καταστήματα πηγαίνουν στην επιλεγμένη τοποθεσία. Τα υπάρχοντα παιχνίδια μένουν όπου είναι. Οι βιβλιοθήκες Steam διατηρούν τη δική τους ρύθμιση.</string>
<string name="storage_shared_mount">Αποθηκευτικός χώρος τηλεφώνου στο Linux</string>
<string name="storage_shared_mount_hint">Προσαρτά τον εσωτερικό χώρο αποθήκευσης του τηλεφώνου σας στο /root/Storage. Όταν είναι απενεργοποιημένο, προσαρτώνται μόνο οι φάκελοι παιχνιδιών που προσθέσατε από αυτόν. Οι κάρτες SD δεν επηρεάζονται. Ισχύει από την επόμενη συνεδρία.</string>
<string name="storage_default_ask">Ερώτηση κάθε φορά</string>
<string name="storage_default_ask_detail">Επιλογή προορισμού για κάθε εγκατάσταση</string>
<string name="storage_default_internal">Εσωτερικός αποθηκευτικός χώρος</string>
@@ -4147,4 +4150,5 @@
<string name="steam_store_linux_build">Αυτό το παιχνίδι εγκαθιστά την έκδοσή του για Linux. Εγκαταστήστε το από το Steam.</string>
<string name="game_zoom_title">Ζουμ παιχνιδιού</string>
<string name="game_zoom_hint">Ρυθμίστε τη μεγέθυνση του παιχνιδιού από 100% έως 300%</string>
<string name="game_steam_offline_uncached">Το Steam είναι σε λειτουργία εκτός σύνδεσης και δεν έχει φορτώσει ακόμη το %1$s. Συνδεθείτε μία φορά στο Steam για να το παίξετε.</string>
</resources>
+4
View File
@@ -1468,6 +1468,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Reanudar %1$s</string>
<string name="roms_text">Aparece como /root/ROMs en cada sesión. El almacenamiento interno está en /root/Storage.</string>
<string name="roms_text_unmounted">Aparece como /root/ROMs en cada sesión.</string>
<string name="roms_none">Ninguna carpeta elegida</string>
<string name="roms_applies">Se aplica en la próxima sesión. Las tarjetas SD funcionan.</string>
<string name="roms_choose">Elegir carpeta</string>
@@ -3249,6 +3250,8 @@
<string name="storage_default_group">Ubicación de instalación</string>
<string name="storage_default_title">Almacenamiento predeterminado</string>
<string name="storage_default_hint">Las nuevas instalaciones de las tiendas van a la ubicación seleccionada. Los juegos existentes se quedan donde están. Las bibliotecas de Steam conservan su propio ajuste.</string>
<string name="storage_shared_mount">Almacenamiento del teléfono en Linux</string>
<string name="storage_shared_mount_hint">Monta el almacenamiento interno del teléfono en /root/Storage. Si está desactivado, solo se montan las carpetas de juegos que has añadido desde ahí. No afecta a las tarjetas SD. Se aplica en la próxima sesión.</string>
<string name="storage_default_ask">Preguntar siempre</string>
<string name="storage_default_ask_detail">Elige un destino para cada instalación</string>
<string name="storage_default_internal">Almacenamiento interno</string>
@@ -4187,4 +4190,5 @@
<string name="steam_store_linux_build">Este juego instala su versión para Linux. Instálalo desde Steam.</string>
<string name="game_zoom_title">Zoom del juego</string>
<string name="game_zoom_hint">Ajusta la ampliación del juego del 100 % al 300 %</string>
<string name="game_steam_offline_uncached">Steam está en modo sin conexión y aún no ha cargado %1$s. Conéctate en Steam una vez para jugarlo.</string>
</resources>
+4
View File
@@ -1460,6 +1460,7 @@
<string name="rail_percent">%1$d %%</string>
<string name="rail_resume_named">Jatka: %1$s</string>
<string name="roms_text">Näkyy sessiossa polussa /root/ROMs. Sisäinen tallennustila on /root/Storage.</string>
<string name="roms_text_unmounted">Näkyy sessiossa polussa /root/ROMs.</string>
<string name="roms_none">Kansiota ei valittu</string>
<string name="roms_applies">Vaikuttaa seuraavaan istuntoon. SD-kortit toimivat.</string>
<string name="roms_choose">Valitse kansio</string>
@@ -3219,6 +3220,8 @@
<string name="storage_default_group">Asennussijainti</string>
<string name="storage_default_title">Oletustallennustila</string>
<string name="storage_default_hint">Uudet kauppa-asennukset menevät valittuun sijaintiin. Nykyiset pelit pysyvät paikoillaan. Steam-kirjastoilla on oma asetuksensa.</string>
<string name="storage_shared_mount">Puhelimen tallennustila Linuxissa</string>
<string name="storage_shared_mount_hint">Liittää puhelimen sisäisen tallennustilan polkuun /root/Storage. Kun pois päältä, liitetään vain sieltä lisäämäsi pelikansiot. SD-kortit eivät muutu. Tulee voimaan seuraavassa istunnossa.</string>
<string name="storage_default_ask">Kysy aina</string>
<string name="storage_default_ask_detail">Valitse kohde jokaiselle asennukselle</string>
<string name="storage_default_internal">Sisäinen tallennustila</string>
@@ -4147,4 +4150,5 @@
<string name="steam_store_linux_build">Tämä peli asentaa Linux-versionsa. Asenna se Steamista.</string>
<string name="game_zoom_title">Pelin zoomaus</string>
<string name="game_zoom_hint">Säädä pelin suurennusta välillä 100–300 %</string>
<string name="game_steam_offline_uncached">Steam on offline-tilassa eikä ole vielä ladannut peliä %1$s. Siirry Steamissa kerran online-tilaan pelataksesi sitä.</string>
</resources>
+4
View File
@@ -1467,6 +1467,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Reprendre %1$s</string>
<string name="roms_text">Affiché comme /root/ROMs dans chaque session. Le stockage interne se trouve dans /root/Storage.</string>
<string name="roms_text_unmounted">Affiché comme /root/ROMs dans chaque session.</string>
<string name="roms_none">Aucun dossier sélectionné</string>
<string name="roms_applies">Prendra effet à la prochaine session. Prend en charge les cartes SD.</string>
<string name="roms_choose">Choisir un dossier</string>
@@ -3248,6 +3249,8 @@
<string name="storage_default_group">Emplacement d\'installation</string>
<string name="storage_default_title">Stockage par défaut</string>
<string name="storage_default_hint">Les nouvelles installations depuis les boutiques vont à l\'emplacement sélectionné. Les jeux existants restent où ils sont. Les bibliothèques Steam gardent leur propre réglage.</string>
<string name="storage_shared_mount">Stockage du téléphone dans Linux</string>
<string name="storage_shared_mount_hint">Monte le stockage interne de votre téléphone dans /root/Storage. Désactivé, seuls les dossiers de jeux que vous y avez ajoutés sont montés. Les cartes SD ne sont pas concernées. S\'applique à la prochaine session.</string>
<string name="storage_default_ask">Toujours demander</string>
<string name="storage_default_ask_detail">Choisir une destination pour chaque installation</string>
<string name="storage_default_internal">Stockage interne</string>
@@ -4186,4 +4189,5 @@
<string name="steam_store_linux_build">Ce jeu installe sa version Linux. Installez-le depuis Steam.</string>
<string name="game_zoom_title">Zoom du jeu</string>
<string name="game_zoom_hint">Réglez le grossissement du jeu de 100 % à 300 %</string>
<string name="game_steam_offline_uncached">Steam est en mode hors ligne et n\'a pas encore chargé %1$s. Passez en ligne une fois dans Steam pour y jouer.</string>
</resources>
+4
View File
@@ -1460,6 +1460,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">%1$s फिर से शुरू करें</string>
<string name="roms_text">हर सेशन में /root/ROMs के रूप में दिखता है। इंटरनल स्टोरेज /root/Storage पर है।</string>
<string name="roms_text_unmounted">हर सेशन में /root/ROMs के रूप में दिखता है।</string>
<string name="roms_none">कोई फ़ोल्डर नहीं चुना गया</string>
<string name="roms_applies">अगले सेशन से लागू होता है। SD कार्ड काम करते हैं।</string>
<string name="roms_choose">फ़ोल्डर चुनें</string>
@@ -3219,6 +3220,8 @@
<string name="storage_default_group">इंस्टॉल की जगह</string>
<string name="storage_default_title">डिफ़ॉल्ट स्टोरेज</string>
<string name="storage_default_hint">स्टोर से नए इंस्टॉल चुनी गई जगह पर जाते हैं। मौजूदा गेम जहां हैं वहीं रहते हैं। Steam लाइब्रेरी अपनी सेटिंग रखती हैं।</string>
<string name="storage_shared_mount">Linux में फ़ोन स्टोरेज</string>
<string name="storage_shared_mount_hint">आपके फ़ोन का इंटरनल स्टोरेज /root/Storage पर माउंट करता है। बंद होने पर केवल वही गेम फ़ोल्डर माउंट होते हैं जो आपने उसमें से जोड़े हैं। SD कार्ड पर असर नहीं पड़ता। अगले सत्र से लागू होता है।</string>
<string name="storage_default_ask">हर बार पूछें</string>
<string name="storage_default_ask_detail">हर इंस्टॉल के लिए जगह चुनें</string>
<string name="storage_default_internal">इंटरनल स्टोरेज</string>
@@ -4147,4 +4150,5 @@
<string name="steam_store_linux_build">यह गेम अपना Linux संस्करण इंस्टॉल करता है। इसे Steam से इंस्टॉल करें।</string>
<string name="game_zoom_title">गेम ज़ूम</string>
<string name="game_zoom_hint">गेम का ज़ूम 100% से 300% तक समायोजित करें</string>
<string name="game_steam_offline_uncached">Steam ऑफ़लाइन मोड में है और उसने अभी तक %1$s लोड नहीं किया है। इसे खेलने के लिए Steam में एक बार ऑनलाइन जाएँ।</string>
</resources>
+4
View File
@@ -1460,6 +1460,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">%1$s folytatása</string>
<string name="roms_text">Minden munkamenetben /root/ROMs néven jelenik meg. A belső tárhely itt található: /root/Storage.</string>
<string name="roms_text_unmounted">Minden munkamenetben /root/ROMs néven jelenik meg.</string>
<string name="roms_none">Nincs mappa kiválasztva</string>
<string name="roms_applies">A következő munkamenettől érvényes. SD-kártyák is működnek.</string>
<string name="roms_choose">Mappa kiválasztása</string>
@@ -3219,6 +3220,8 @@
<string name="storage_default_group">Telepítési hely</string>
<string name="storage_default_title">Alapértelmezett tárhely</string>
<string name="storage_default_hint">Az új áruházi telepítések a kiválasztott helyre kerülnek. A meglévő játékok a helyükön maradnak. A Steam-könyvtárak megtartják saját beállításukat.</string>
<string name="storage_shared_mount">Telefontárhely a Linuxban</string>
<string name="storage_shared_mount_hint">Csatolja a telefon belső tárhelyét a /root/Storage helyre. Kikapcsolva csak az onnan hozzáadott játékmappák lesznek csatolva. Az SD-kártyákat nem érinti. A következő munkamenettől érvényes.</string>
<string name="storage_default_ask">Kérdezzen rá minden alkalommal</string>
<string name="storage_default_ask_detail">Célhely választása minden telepítésnél</string>
<string name="storage_default_internal">Belső tárhely</string>
@@ -4147,4 +4150,5 @@
<string name="steam_store_linux_build">Ez a játék a Linux-verzióját telepíti. Telepítsd a Steamből.</string>
<string name="game_zoom_title">Játék nagyítása</string>
<string name="game_zoom_hint">A játék nagyításának beállítása 100% és 300% között</string>
<string name="game_steam_offline_uncached">A Steam offline módban van, és még nem töltötte be ezt: %1$s. A játékhoz egyszer lépj online módba a Steamben.</string>
</resources>
+4
View File
@@ -1453,6 +1453,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Lanjutkan %1$s</string>
<string name="roms_text">Muncul sebagai /root/ROMs di setiap sesi. Penyimpanan internal berada di /root/Storage.</string>
<string name="roms_text_unmounted">Muncul sebagai /root/ROMs di setiap sesi.</string>
<string name="roms_none">Belum ada folder yang dipilih</string>
<string name="roms_applies">Berlaku pada sesi berikutnya. Kartu SD juga bisa.</string>
<string name="roms_choose">Pilih folder</string>
@@ -3190,6 +3191,8 @@
<string name="storage_default_group">Lokasi instalasi</string>
<string name="storage_default_title">Penyimpanan default</string>
<string name="storage_default_hint">Instalasi toko baru akan disimpan di lokasi yang dipilih. Game yang sudah ada tetap di lokasinya. Library Steam memakai pengaturannya sendiri.</string>
<string name="storage_shared_mount">Penyimpanan ponsel di Linux</string>
<string name="storage_shared_mount_hint">Memasang penyimpanan internal ponsel Anda di /root/Storage. Jika nonaktif, hanya folder game yang Anda tambahkan dari sana yang dipasang. Kartu SD tidak terpengaruh. Berlaku pada sesi berikutnya.</string>
<string name="storage_default_ask">Tanyakan setiap kali</string>
<string name="storage_default_ask_detail">Pilih target untuk setiap instalasi</string>
<string name="storage_default_internal">Penyimpanan internal</string>
@@ -4117,4 +4120,5 @@
<string name="steam_store_linux_build">Game ini memasang versi Linux-nya. Pasang dari Steam.</string>
<string name="game_zoom_title">Zoom game</string>
<string name="game_zoom_hint">Sesuaikan pembesaran game dari 100% hingga 300%</string>
<string name="game_steam_offline_uncached">Steam dalam mode luring dan belum memuat %1$s. Hubungkan Steam secara daring sekali untuk memainkannya.</string>
</resources>
+4
View File
@@ -1459,6 +1459,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Riprendi %1$s</string>
<string name="roms_text">Appare come /root/ROMs in ogni sessione. La memoria interna si trova in /root/Storage.</string>
<string name="roms_text_unmounted">Appare come /root/ROMs in ogni sessione.</string>
<string name="roms_none">Nessuna cartella scelta</string>
<string name="roms_applies">Si applica dalla prossima sessione. Le schede SD funzionano.</string>
<string name="roms_choose">Scegli cartella</string>
@@ -3248,6 +3249,8 @@
<string name="storage_default_group">Posizione di installazione</string>
<string name="storage_default_title">Archiviazione predefinita</string>
<string name="storage_default_hint">Le nuove installazioni dai negozi vanno nella posizione selezionata. I giochi esistenti restano dove sono. Le librerie di Steam mantengono la propria impostazione.</string>
<string name="storage_shared_mount">Memoria del telefono in Linux</string>
<string name="storage_shared_mount_hint">Monta la memoria interna del telefono in /root/Storage. Se disattivato, vengono montate solo le cartelle dei giochi che hai aggiunto da lì. Le schede SD non sono interessate. Si applica dalla prossima sessione.</string>
<string name="storage_default_ask">Chiedi ogni volta</string>
<string name="storage_default_ask_detail">Scegli una destinazione per ogni installazione</string>
<string name="storage_default_internal">Memoria interna</string>
@@ -4186,4 +4189,5 @@
<string name="steam_store_linux_build">Questo gioco installa la sua versione Linux. Installalo da Steam.</string>
<string name="game_zoom_title">Zoom del gioco</string>
<string name="game_zoom_hint">Regola l\'ingrandimento del gioco dal 100% al 300%</string>
<string name="game_steam_offline_uncached">Steam è in modalità offline e non ha ancora caricato %1$s. Vai online in Steam una volta per giocarci.</string>
</resources>
+4
View File
@@ -1453,6 +1453,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">%1$sを再開</string>
<string name="roms_text">各セッションで /root/ROMs として表示されます。内部ストレージは /root/Storage にあります。</string>
<string name="roms_text_unmounted">各セッションで /root/ROMs として表示されます。</string>
<string name="roms_none">フォルダが選択されていません</string>
<string name="roms_applies">次回のセッションで有効になります。SDカードをサポートしています。</string>
<string name="roms_choose">フォルダを選択</string>
@@ -3190,6 +3191,8 @@
<string name="storage_default_group">インストール先</string>
<string name="storage_default_title">デフォルトのストレージ</string>
<string name="storage_default_hint">ストアからの新しいインストールは選択した場所に保存されます。既存のゲームはそのままです。Steamライブラリは独自の設定を使用します。</string>
<string name="storage_shared_mount">Linux でのスマホのストレージ</string>
<string name="storage_shared_mount_hint">スマホの内部ストレージを /root/Storage にマウントします。オフにすると、そこから追加したゲームフォルダーだけがマウントされます。SD カードには影響しません。次のセッションから適用されます。</string>
<string name="storage_default_ask">毎回確認する</string>
<string name="storage_default_ask_detail">インストールごとに保存先を選択します</string>
<string name="storage_default_internal">内部ストレージ</string>
@@ -4117,4 +4120,5 @@
<string name="steam_store_linux_build">このゲームは Linux 版をインストールします。Steam からインストールしてください。</string>
<string name="game_zoom_title">ゲームズーム</string>
<string name="game_zoom_hint">ゲームの拡大率を100%から300%の間で調整します</string>
<string name="game_steam_offline_uncached">Steam はオフラインモードのため、%1$s をまだ読み込んでいません。プレイするには Steam で一度オンラインにしてください。</string>
</resources>
+4
View File
@@ -1453,6 +1453,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">%1$s 재개</string>
<string name="roms_text">각 세션에서 /root/ROMs로 표시됩니다. 내부 저장 공간은 /root/Storage에 있습니다.</string>
<string name="roms_text_unmounted">각 세션에서 /root/ROMs로 표시됩니다.</string>
<string name="roms_none">선택된 폴더 없음</string>
<string name="roms_applies">다음 세션에 적용됩니다. SD 카드를 지원합니다.</string>
<string name="roms_choose">폴더 선택</string>
@@ -3190,6 +3191,8 @@
<string name="storage_default_group">설치 위치</string>
<string name="storage_default_title">기본 저장소</string>
<string name="storage_default_hint">새 스토어 설치는 선택한 위치에 저장됩니다. 기존 게임은 그대로 유지됩니다. Steam 라이브러리는 자체 설정을 따릅니다.</string>
<string name="storage_shared_mount">Linux에서 휴대폰 저장소</string>
<string name="storage_shared_mount_hint">휴대폰 내부 저장소를 /root/Storage에 마운트합니다. 끄면 그곳에서 추가한 게임 폴더만 마운트됩니다. SD 카드에는 영향이 없습니다. 다음 세션부터 적용됩니다.</string>
<string name="storage_default_ask">매번 묻기</string>
<string name="storage_default_ask_detail">설치할 때마다 위치 선택</string>
<string name="storage_default_internal">내부 저장소</string>
@@ -4117,4 +4120,5 @@
<string name="steam_store_linux_build">이 게임은 Linux 버전을 설치합니다. Steam에서 설치하세요.</string>
<string name="game_zoom_title">게임 확대</string>
<string name="game_zoom_hint">게임 확대율을 100%에서 300%까지 조정합니다</string>
<string name="game_steam_offline_uncached">Steam이 오프라인 모드이며 아직 %1$s을(를) 불러오지 않았습니다. 플레이하려면 Steam에서 한 번 온라인으로 전환하세요.</string>
</resources>
+4
View File
@@ -1453,6 +1453,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Sambung %1$s</string>
<string name="roms_text">Muncul sebagai /root/ROMs dalam setiap sesi. Storan dalaman berada di /root/Storage.</string>
<string name="roms_text_unmounted">Muncul sebagai /root/ROMs dalam setiap sesi.</string>
<string name="roms_none">Tiada folder dipilih</string>
<string name="roms_applies">Berkuat kuasa pada sesi seterusnya. Kad SD berfungsi.</string>
<string name="roms_choose">Pilih folder</string>
@@ -3190,6 +3191,8 @@
<string name="storage_default_group">Lokasi pemasangan</string>
<string name="storage_default_title">Storan lalai</string>
<string name="storage_default_hint">Pemasangan kedai baharu pergi ke lokasi yang dipilih. Permainan sedia ada kekal di tempatnya. Pustaka Steam mengekalkan tetapan sendiri.</string>
<string name="storage_shared_mount">Storan telefon dalam Linux</string>
<string name="storage_shared_mount_hint">Melekapkan storan dalaman telefon anda di /root/Storage. Apabila dimatikan, hanya folder permainan yang anda tambah dari situ dilekapkan. Kad SD tidak terjejas. Berkuat kuasa pada sesi seterusnya.</string>
<string name="storage_default_ask">Tanya setiap kali</string>
<string name="storage_default_ask_detail">Pilih destinasi bagi setiap pemasangan</string>
<string name="storage_default_internal">Storan dalaman</string>
@@ -4117,4 +4120,5 @@
<string name="steam_store_linux_build">Permainan ini memasang versi Linuxnya. Pasang daripada Steam.</string>
<string name="game_zoom_title">Zum permainan</string>
<string name="game_zoom_hint">Laraskan pembesaran permainan daripada 100% hingga 300%</string>
<string name="game_steam_offline_uncached">Steam dalam mod luar talian dan belum memuatkan %1$s. Pergi dalam talian dalam Steam sekali untuk memainkannya.</string>
</resources>
+4
View File
@@ -1460,6 +1460,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Gjenoppta %1$s</string>
<string name="roms_text">Vises som /root/ROMs i hver sesjon. Intern lagring er på /root/Storage.</string>
<string name="roms_text_unmounted">Vises som /root/ROMs i hver sesjon.</string>
<string name="roms_none">Ingen mappe valgt</string>
<string name="roms_applies">Gjelder fra neste sesjon. SD-kort fungerer.</string>
<string name="roms_choose">Velg mappe</string>
@@ -3219,6 +3220,8 @@
<string name="storage_default_group">Installasjonsplassering</string>
<string name="storage_default_title">Standard lagring</string>
<string name="storage_default_hint">Nye butikkinstallasjoner havner på valgt plassering. Eksisterende spill blir der de er. Steam-biblioteker beholder sin egen innstilling.</string>
<string name="storage_shared_mount">Telefonlagring i Linux</string>
<string name="storage_shared_mount_hint">Monterer telefonens interne lagring på /root/Storage. Når det er av, monteres bare spillmapper du har lagt til derfra. SD-kort påvirkes ikke. Gjelder fra neste økt.</string>
<string name="storage_default_ask">Spør hver gang</string>
<string name="storage_default_ask_detail">Velg et mål for hver installasjon</string>
<string name="storage_default_internal">Intern lagring</string>
@@ -4147,4 +4150,5 @@
<string name="steam_store_linux_build">Dette spillet installerer Linux-versjonen sin. Installer det fra Steam.</string>
<string name="game_zoom_title">Spillzoom</string>
<string name="game_zoom_hint">Juster spillforstørrelsen fra 100 % til 300 %</string>
<string name="game_steam_offline_uncached">Steam er i frakoblet modus og har ikke lastet inn %1$s ennå. Gå tilkoblet i Steam én gang for å spille det.</string>
</resources>
+4
View File
@@ -1460,6 +1460,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">%1$s hervatten</string>
<string name="roms_text">Verschijnt in elke sessie als /root/ROMs. Interne opslag staat op /root/Storage.</string>
<string name="roms_text_unmounted">Verschijnt in elke sessie als /root/ROMs.</string>
<string name="roms_none">Geen map gekozen</string>
<string name="roms_applies">Geldt vanaf de volgende sessie. SD-kaarten werken ook.</string>
<string name="roms_choose">Map kiezen</string>
@@ -3219,6 +3220,8 @@
<string name="storage_default_group">Installatielocatie</string>
<string name="storage_default_title">Standaardopslag</string>
<string name="storage_default_hint">Nieuwe winkelinstallaties gaan naar de gekozen locatie. Bestaande games blijven waar ze zijn. Steam-bibliotheken houden hun eigen instelling.</string>
<string name="storage_shared_mount">Telefoonopslag in Linux</string>
<string name="storage_shared_mount_hint">Koppelt de interne opslag van je telefoon aan /root/Storage. Als dit uit staat, worden alleen gamemappen gekoppeld die je daaruit hebt toegevoegd. SD-kaarten veranderen niet. Geldt vanaf de volgende sessie.</string>
<string name="storage_default_ask">Elke keer vragen</string>
<string name="storage_default_ask_detail">Kies voor elke installatie een doel</string>
<string name="storage_default_internal">Interne opslag</string>
@@ -4147,4 +4150,5 @@
<string name="steam_store_linux_build">Deze game installeert zijn Linux-versie. Installeer hem via Steam.</string>
<string name="game_zoom_title">Gamezoom</string>
<string name="game_zoom_hint">Pas de spelvergroting aan van 100% tot 300%</string>
<string name="game_steam_offline_uncached">Steam staat in offlinemodus en heeft %1$s nog niet geladen. Ga één keer online in Steam om het te spelen.</string>
</resources>
+4
View File
@@ -1476,6 +1476,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Wznów %1$s</string>
<string name="roms_text">W każdej sesji widoczny jako /root/ROMs. Pamięć wewnętrzna jest w /root/Storage.</string>
<string name="roms_text_unmounted">W każdej sesji widoczny jako /root/ROMs.</string>
<string name="roms_none">Nie wybrano folderu</string>
<string name="roms_applies">Zadziała od następnej sesji. Karty SD są obsługiwane.</string>
<string name="roms_choose">Wybierz folder</string>
@@ -3279,6 +3280,8 @@
<string name="storage_default_group">Miejsce instalacji</string>
<string name="storage_default_title">Domyślna pamięć</string>
<string name="storage_default_hint">Nowe instalacje ze sklepów trafiają do wybranego miejsca. Istniejące gry zostają, gdzie są. Biblioteki Steam mają własne ustawienie.</string>
<string name="storage_shared_mount">Pamięć telefonu w Linuksie</string>
<string name="storage_shared_mount_hint">Montuje pamięć wewnętrzną telefonu w /root/Storage. Po wyłączeniu montowane są tylko dodane z niej foldery gier. Nie dotyczy kart SD. Działa od następnej sesji.</string>
<string name="storage_default_ask">Pytaj za każdym razem</string>
<string name="storage_default_ask_detail">Wybieraj miejsce przy każdej instalacji</string>
<string name="storage_default_internal">Pamięć wewnętrzna</string>
@@ -4227,4 +4230,5 @@
<string name="steam_store_linux_build">Ta gra instaluje swoją wersję dla Linuksa. Zainstaluj ją ze Steama.</string>
<string name="game_zoom_title">Powiększenie gry</string>
<string name="game_zoom_hint">Dostosuj powiększenie gry w zakresie od 100% do 300%</string>
<string name="game_steam_offline_uncached">Steam jest w trybie offline i nie wczytał jeszcze %1$s. Przejdź raz do trybu online w Steamie, aby w to zagrać.</string>
</resources>
@@ -1459,6 +1459,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Retomar %1$s</string>
<string name="roms_text">Aparece como /root/ROMs em cada sessão. O armazenamento interno está em /root/Storage.</string>
<string name="roms_text_unmounted">Aparece como /root/ROMs em cada sessão.</string>
<string name="roms_none">Nenhuma pasta escolhida</string>
<string name="roms_applies">Aplica-se na próxima sessão. Funciona com cartões SD.</string>
<string name="roms_choose">Escolher pasta</string>
@@ -3263,6 +3264,8 @@
<string name="storage_default_group">Local de instalação</string>
<string name="storage_default_title">Armazenamento predefinido</string>
<string name="storage_default_hint">As novas instalações das lojas vão para o local selecionado. Os jogos existentes ficam onde estão. As bibliotecas do Steam mantêm a sua própria definição.</string>
<string name="storage_shared_mount">Armazenamento do telemóvel no Linux</string>
<string name="storage_shared_mount_hint">Monta o armazenamento interno do telemóvel em /root/Storage. Desativado, só são montadas as pastas de jogos que adicionou a partir dele. Os cartões SD não são afetados. Aplica-se na próxima sessão.</string>
<string name="storage_default_ask">Perguntar sempre</string>
<string name="storage_default_ask_detail">Escolha um destino para cada instalação</string>
<string name="storage_default_internal">Armazenamento interno</string>
@@ -4186,4 +4189,5 @@
<string name="steam_store_linux_build">Este jogo instala a sua versão para Linux. Instale-o a partir do Steam.</string>
<string name="game_zoom_title">Zoom do jogo</string>
<string name="game_zoom_hint">Ajuste a ampliação do jogo de 100% a 300%</string>
<string name="game_steam_offline_uncached">O Steam está no modo offline e ainda não carregou %1$s. Fique online no Steam uma vez para jogar.</string>
</resources>
+4
View File
@@ -1467,6 +1467,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Retomar %1$s</string>
<string name="roms_text">Aparece como /root/ROMs em cada sessão. O armazenamento interno fica em /root/Storage.</string>
<string name="roms_text_unmounted">Aparece como /root/ROMs em cada sessão.</string>
<string name="roms_none">Nenhuma pasta escolhida</string>
<string name="roms_applies">Vale a partir da próxima sessão. Cartões SD funcionam.</string>
<string name="roms_choose">Escolher pasta</string>
@@ -3273,6 +3274,8 @@
<string name="storage_default_group">Local de instalação</string>
<string name="storage_default_title">Armazenamento padrão</string>
<string name="storage_default_hint">Novas instalações das lojas vão para o local selecionado. Jogos existentes ficam onde estão. As bibliotecas da Steam mantêm a própria configuração.</string>
<string name="storage_shared_mount">Armazenamento do celular no Linux</string>
<string name="storage_shared_mount_hint">Monta o armazenamento interno do celular em /root/Storage. Desativado, só as pastas de jogos que você adicionou dele são montadas. Cartões SD não são afetados. Vale a partir da próxima sessão.</string>
<string name="storage_default_ask">Perguntar sempre</string>
<string name="storage_default_ask_detail">Escolha um destino para cada instalação</string>
<string name="storage_default_internal">Armazenamento interno</string>
@@ -4194,4 +4197,5 @@
<string name="steam_store_close_steam">Feche o Steam primeiro</string>
<string name="steam_store_session_wait">Pause o download do Steam primeiro</string>
<string name="steam_store_linux_build">Este jogo instala sua versão para Linux. Instale-o pelo Steam.</string>
<string name="game_steam_offline_uncached">O Steam está no modo offline e ainda não carregou %1$s. Fique online no Steam uma vez para jogar.</string>
</resources>
+4
View File
@@ -1468,6 +1468,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Reluare %1$s</string>
<string name="roms_text">Apare ca /root/ROMs în fiecare sesiune. Stocarea internă este la /root/Storage.</string>
<string name="roms_text_unmounted">Apare ca /root/ROMs în fiecare sesiune.</string>
<string name="roms_none">Niciun folder ales</string>
<string name="roms_applies">Se aplică la sesiunea următoare. Cardurile SD funcționează.</string>
<string name="roms_choose">Alege folderul</string>
@@ -3249,6 +3250,8 @@
<string name="storage_default_group">Locație de instalare</string>
<string name="storage_default_title">Stocare implicită</string>
<string name="storage_default_hint">Instalările noi din magazine merg în locația selectată. Jocurile existente rămân unde sunt. Bibliotecile Steam își păstrează propria setare.</string>
<string name="storage_shared_mount">Stocarea telefonului în Linux</string>
<string name="storage_shared_mount_hint">Montează stocarea internă a telefonului în /root/Storage. Când este dezactivat, se montează doar folderele de jocuri pe care le-ați adăugat de acolo. Cardurile SD nu sunt afectate. Se aplică din următoarea sesiune.</string>
<string name="storage_default_ask">Întreabă de fiecare dată</string>
<string name="storage_default_ask_detail">Alege o destinație pentru fiecare instalare</string>
<string name="storage_default_internal">Stocare internă</string>
@@ -4187,4 +4190,5 @@
<string name="steam_store_linux_build">Acest joc își instalează versiunea pentru Linux. Instalează-l din Steam.</string>
<string name="game_zoom_title">Zoom joc</string>
<string name="game_zoom_hint">Reglați mărirea jocului între 100% și 300%</string>
<string name="game_steam_offline_uncached">Steam este în modul offline și nu a încărcat încă %1$s. Treci o dată online în Steam ca să îl joci.</string>
</resources>
+4
View File
@@ -1476,6 +1476,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Продолжить %1$s</string>
<string name="roms_text">Отображается как /root/ROMs в каждой сессии. Внутреннее хранилище находится в /root/Storage.</string>
<string name="roms_text_unmounted">Отображается как /root/ROMs в каждой сессии.</string>
<string name="roms_none">Папка не выбрана</string>
<string name="roms_applies">Вступит в силу в следующей сессии. Поддерживаются SD-карты.</string>
<string name="roms_choose">Выбрать папку</string>
@@ -3280,6 +3281,8 @@
<string name="storage_default_group">Место установки</string>
<string name="storage_default_title">Хранилище по умолчанию</string>
<string name="storage_default_hint">Новые установки из магазинов попадают в выбранное место. Установленные игры остаются на месте. У библиотек Steam своя настройка.</string>
<string name="storage_shared_mount">Память телефона в Linux</string>
<string name="storage_shared_mount_hint">Подключает внутреннюю память телефона в /root/Storage. Если выключено, подключаются только добавленные из неё папки с играми. На SD-карты не влияет. Применяется со следующего сеанса.</string>
<string name="storage_default_ask">Спрашивать каждый раз</string>
<string name="storage_default_ask_detail">Выбирать место для каждой установки</string>
<string name="storage_default_internal">Внутреннее хранилище</string>
@@ -4228,4 +4231,5 @@
<string name="steam_store_linux_build">Эта игра устанавливает свою версию для Linux. Установите её из Steam.</string>
<string name="game_zoom_title">Масштаб игры</string>
<string name="game_zoom_hint">Настройте увеличение игры от 100% до 300%</string>
<string name="game_steam_offline_uncached">Steam в автономном режиме и ещё не загрузил %1$s. Чтобы играть, один раз переведите Steam в сеть.</string>
</resources>
+4
View File
@@ -1460,6 +1460,7 @@
<string name="rail_percent">%1$d %%</string>
<string name="rail_resume_named">Återuppta %1$s</string>
<string name="roms_text">Visas som /root/ROMs i varje session. Det interna lagringsutrymmet finns på /root/Storage.</string>
<string name="roms_text_unmounted">Visas som /root/ROMs i varje session.</string>
<string name="roms_none">Ingen mapp vald</string>
<string name="roms_applies">Gäller från nästa session. SD-kort fungerar.</string>
<string name="roms_choose">Välj mapp</string>
@@ -3219,6 +3220,8 @@
<string name="storage_default_group">Installationsplats</string>
<string name="storage_default_title">Standardlagring</string>
<string name="storage_default_hint">Nya butiksinstallationer hamnar på den valda platsen. Befintliga spel stannar där de är. Steam-bibliotek har sin egen inställning.</string>
<string name="storage_shared_mount">Telefonens lagring i Linux</string>
<string name="storage_shared_mount_hint">Monterar telefonens interna lagring på /root/Storage. När det är av monteras bara spelmappar du har lagt till därifrån. SD-kort påverkas inte. Gäller från nästa session.</string>
<string name="storage_default_ask">Fråga varje gång</string>
<string name="storage_default_ask_detail">Välj mål för varje installation</string>
<string name="storage_default_internal">Intern lagring</string>
@@ -4147,4 +4150,5 @@
<string name="steam_store_linux_build">Det här spelet installerar sin Linux-version. Installera det från Steam.</string>
<string name="game_zoom_title">Spelzoom</string>
<string name="game_zoom_hint">Justera spelförstoringen från 100 % till 300 %</string>
<string name="game_steam_offline_uncached">Steam är i offlineläge och har inte läst in %1$s än. Gå online i Steam en gång för att spela det.</string>
</resources>
+4
View File
@@ -1453,6 +1453,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">ดำเนินการต่อ %1$s</string>
<string name="roms_text">แสดงเป็น /root/ROMs ในแต่ละเซสชัน พื้นที่จัดเก็บภายในอยู่ที่ /root/Storage</string>
<string name="roms_text_unmounted">แสดงเป็น /root/ROMs ในแต่ละเซสชัน</string>
<string name="roms_none">ยังไม่เลือกโฟลเดอร์</string>
<string name="roms_applies">มีผลในเซสชันถัดไป ใช้การ์ด SD ได้</string>
<string name="roms_choose">เลือกโฟลเดอร์</string>
@@ -3190,6 +3191,8 @@
<string name="storage_default_group">ตำแหน่งติดตั้ง</string>
<string name="storage_default_title">พื้นที่จัดเก็บเริ่มต้น</string>
<string name="storage_default_hint">การติดตั้งใหม่จากสโตร์จะไปยังตำแหน่งที่เลือก เกมที่มีอยู่จะอยู่ที่เดิม ไลบรารี Steam ใช้การตั้งค่าของตัวเอง</string>
<string name="storage_shared_mount">ที่เก็บข้อมูลโทรศัพท์ใน Linux</string>
<string name="storage_shared_mount_hint">เมานต์ที่เก็บข้อมูลภายในของโทรศัพท์ไว้ที่ /root/Storage เมื่อปิด จะเมานต์เฉพาะโฟลเดอร์เกมที่คุณเพิ่มจากที่นั่น ไม่มีผลกับการ์ด SD มีผลในเซสชันถัดไป</string>
<string name="storage_default_ask">ถามทุกครั้ง</string>
<string name="storage_default_ask_detail">เลือกปลายทางสำหรับการติดตั้งแต่ละครั้ง</string>
<string name="storage_default_internal">พื้นที่จัดเก็บภายใน</string>
@@ -4117,4 +4120,5 @@
<string name="steam_store_linux_build">เกมนี้ติดตั้งเวอร์ชัน Linux ของตัวเอง ให้ติดตั้งจาก Steam</string>
<string name="game_zoom_title">ซูมเกม</string>
<string name="game_zoom_hint">ปรับการขยายเกมตั้งแต่ 100% ถึง 300%</string>
<string name="game_steam_offline_uncached">Steam อยู่ในโหมดออฟไลน์และยังไม่ได้โหลด %1$s ออนไลน์ใน Steam หนึ่งครั้งเพื่อเล่นเกมนี้</string>
</resources>
+4
View File
@@ -1452,6 +1452,7 @@
<string name="rail_percent">%%%1$d</string>
<string name="rail_resume_named">Devam et: %1$s</string>
<string name="roms_text">Her oturumda /root/ROMs olarak görünür. Dahili depolama /root/Storage konumundadır.</string>
<string name="roms_text_unmounted">Her oturumda /root/ROMs olarak görünür.</string>
<string name="roms_none">Klasör seçilmedi</string>
<string name="roms_applies">Sonraki oturumda uygulanır. SD kartlar da çalışır.</string>
<string name="roms_choose">Klasör seç</string>
@@ -3219,6 +3220,8 @@
<string name="storage_default_group">Yükleme konumu</string>
<string name="storage_default_title">Varsayılan depolama</string>
<string name="storage_default_hint">Yeni mağaza yüklemeleri seçilen konuma gider. Mevcut oyunlar yerinde kalır. Steam kütüphaneleri kendi ayarlarını korur.</string>
<string name="storage_shared_mount">Linux\'ta telefon depolaması</string>
<string name="storage_shared_mount_hint">Telefonunuzun dahili depolamasını /root/Storage konumuna bağlar. Kapalıyken yalnızca oradan eklediğiniz oyun klasörleri bağlanır. SD kartlar etkilenmez. Sonraki oturumda uygulanır.</string>
<string name="storage_default_ask">Her seferinde sor</string>
<string name="storage_default_ask_detail">Her yükleme için bir hedef seçin</string>
<string name="storage_default_internal">Dahili depolama</string>
@@ -4147,4 +4150,5 @@
<string name="steam_store_linux_build">Bu oyun Linux sürümünü yükler. Steam\'den yükleyin.</string>
<string name="game_zoom_title">Oyun yakınlaştırma</string>
<string name="game_zoom_hint">Oyun yakınlaştırmasını %100 ile %300 arasında ayarlayın</string>
<string name="game_steam_offline_uncached">Steam çevrimdışı modda ve %1$s henüz yüklenmedi. Oynamak için Steam\'de bir kez çevrimiçi olun.</string>
</resources>
+4
View File
@@ -1476,6 +1476,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Продовжити %1$s</string>
<string name="roms_text">У кожному сеансі з’являється як /root/ROMs. Внутрішня пам’ять доступна в /root/Storage.</string>
<string name="roms_text_unmounted">У кожному сеансі з’являється як /root/ROMs.</string>
<string name="roms_none">Папку не вибрано</string>
<string name="roms_applies">Діє з наступного сеансу. SD-карти підтримуються.</string>
<string name="roms_choose">Вибрати папку</string>
@@ -3279,6 +3280,8 @@
<string name="storage_default_group">Місце встановлення</string>
<string name="storage_default_title">Сховище за замовчуванням</string>
<string name="storage_default_hint">Нові встановлення з магазинів потрапляють у вибране місце. Наявні ігри залишаються на місці. Бібліотеки Steam мають власне налаштування.</string>
<string name="storage_shared_mount">Пам\'ять телефона в Linux</string>
<string name="storage_shared_mount_hint">Підключає внутрішню пам\'ять телефона в /root/Storage. Якщо вимкнено, підключаються лише додані з неї папки з іграми. На SD-картки не впливає. Застосовується з наступного сеансу.</string>
<string name="storage_default_ask">Питати щоразу</string>
<string name="storage_default_ask_detail">Вибирати місце для кожного встановлення</string>
<string name="storage_default_internal">Внутрішнє сховище</string>
@@ -4227,4 +4230,5 @@
<string name="steam_store_linux_build">Ця гра встановлює свою версію для Linux. Установіть її зі Steam.</string>
<string name="game_zoom_title">Масштаб гри</string>
<string name="game_zoom_hint">Налаштуйте збільшення гри від 100% до 300%</string>
<string name="game_steam_offline_uncached">Steam в офлайн-режимі й ще не завантажив %1$s. Щоб грати, один раз перейдіть у Steam онлайн.</string>
</resources>
+4
View File
@@ -1453,6 +1453,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Tiếp tục %1$s</string>
<string name="roms_text">Hiển thị như /root/ROMs trong mỗi phiên. Bộ nhớ trong ở /root/Storage.</string>
<string name="roms_text_unmounted">Hiển thị như /root/ROMs trong mỗi phiên.</string>
<string name="roms_none">Chưa chọn thư mục</string>
<string name="roms_applies">Áp dụng từ phiên sau. Thẻ SD hoạt động được.</string>
<string name="roms_choose">Chọn thư mục</string>
@@ -3190,6 +3191,8 @@
<string name="storage_default_group">Vị trí cài đặt</string>
<string name="storage_default_title">Bộ nhớ mặc định</string>
<string name="storage_default_hint">Các bản cài mới từ cửa hàng sẽ vào vị trí đã chọn. Game hiện có vẫn ở nguyên chỗ. Thư viện Steam giữ thiết lập riêng.</string>
<string name="storage_shared_mount">Bộ nhớ điện thoại trong Linux</string>
<string name="storage_shared_mount_hint">Gắn bộ nhớ trong của điện thoại tại /root/Storage. Khi tắt, chỉ các thư mục trò chơi bạn đã thêm từ đó được gắn. Thẻ SD không bị ảnh hưởng. Áp dụng từ phiên tiếp theo.</string>
<string name="storage_default_ask">Luôn hỏi</string>
<string name="storage_default_ask_detail">Chọn nơi lưu cho mỗi lần cài</string>
<string name="storage_default_internal">Bộ nhớ trong</string>
@@ -4117,4 +4120,5 @@
<string name="steam_store_linux_build">Trò chơi này cài bản dành cho Linux. Hãy cài từ Steam.</string>
<string name="game_zoom_title">Thu phóng trò chơi</string>
<string name="game_zoom_hint">Điều chỉnh độ phóng đại trò chơi từ 100% đến 300%</string>
<string name="game_steam_offline_uncached">Steam đang ở chế độ ngoại tuyến và chưa tải %1$s. Hãy trực tuyến trong Steam một lần để chơi.</string>
</resources>
@@ -1536,6 +1536,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">恢复 %1$s</string>
<string name="roms_text">在每个会话中显示为 /root/ROMs。内部存储位于 /root/Storage。</string>
<string name="roms_text_unmounted">在每个会话中显示为 /root/ROMs。</string>
<string name="roms_none">未选择文件夹</string>
<string name="roms_applies">将在下次会话生效。支持 SD 卡。</string>
<string name="roms_choose">选择文件夹</string>
@@ -3190,6 +3191,8 @@
<string name="storage_default_group">安装位置</string>
<string name="storage_default_title">默认存储</string>
<string name="storage_default_hint">新的商店安装将保存到所选位置。现有游戏保持原位。Steam 库使用各自的设置。</string>
<string name="storage_shared_mount">在 Linux 中使用手机存储</string>
<string name="storage_shared_mount_hint">将手机内部存储挂载到 /root/Storage。关闭后,只会挂载你从中添加的游戏文件夹。不影响 SD 卡。下次会话生效。</string>
<string name="storage_default_ask">每次询问</string>
<string name="storage_default_ask_detail">每次安装时选择目标位置</string>
<string name="storage_default_internal">内部存储</string>
@@ -4115,4 +4118,5 @@
<string name="steam_store_close_steam">请先关闭 Steam</string>
<string name="steam_store_session_wait">请先暂停 Steam 下载</string>
<string name="steam_store_linux_build">此游戏会安装其 Linux 版本。请通过 Steam 安装。</string>
<string name="game_steam_offline_uncached">Steam 处于离线模式,尚未加载 %1$s。请在 Steam 中联网一次后再玩。</string>
</resources>
@@ -1452,6 +1452,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">繼續 %1$s</string>
<string name="roms_text">在每個會話中顯示為 /root/ROMs。內部儲存空間位於 /root/Storage。</string>
<string name="roms_text_unmounted">在每個會話中顯示為 /root/ROMs。</string>
<string name="roms_none">未選擇資料夾</string>
<string name="roms_applies">下次會話生效。支援 SD 卡。</string>
<string name="roms_choose">選擇資料夾</string>
@@ -3187,6 +3188,8 @@
<string name="storage_default_group">安裝位置</string>
<string name="storage_default_title">預設儲存空間</string>
<string name="storage_default_hint">從商店新安裝的遊戲會安裝到所選位置。現有遊戲維持原位。Steam 收藏庫保有自己的設定。</string>
<string name="storage_shared_mount">在 Linux 中使用手機儲存空間</string>
<string name="storage_shared_mount_hint">將手機內部儲存空間掛載到 /root/Storage。關閉後,只會掛載你從中加入的遊戲資料夾。不影響 SD 卡。下次工作階段生效。</string>
<string name="storage_default_ask">每次都詢問</string>
<string name="storage_default_ask_detail">每次安裝時選擇目標位置</string>
<string name="storage_default_internal">內部儲存空間</string>
@@ -4115,4 +4118,5 @@
<string name="steam_store_close_steam">請先關閉 Steam</string>
<string name="steam_store_session_wait">請先暫停 Steam 下載</string>
<string name="steam_store_linux_build">此遊戲會安裝其 Linux 版本。請透過 Steam 安裝。</string>
<string name="game_steam_offline_uncached">Steam 處於離線模式,尚未載入 %1$s。請在 Steam 中連線一次後再玩。</string>
</resources>
@@ -1452,6 +1452,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">繼續 %1$s</string>
<string name="roms_text">每個工作階段中顯示為 /root/ROMs。內部儲存空間位於 /root/Storage。</string>
<string name="roms_text_unmounted">每個工作階段中顯示為 /root/ROMs。</string>
<string name="roms_none">未選擇資料夾</string>
<string name="roms_applies">下次工作階段生效。支援 SD 卡。</string>
<string name="roms_choose">選擇資料夾</string>
@@ -3187,6 +3188,8 @@
<string name="storage_default_group">安裝位置</string>
<string name="storage_default_title">預設儲存空間</string>
<string name="storage_default_hint">從商店新安裝的遊戲會安裝到所選位置。現有遊戲維持原位。Steam 收藏庫保有自己的設定。</string>
<string name="storage_shared_mount">在 Linux 中使用手機儲存空間</string>
<string name="storage_shared_mount_hint">將手機內部儲存空間掛載到 /root/Storage。關閉後,只會掛載你從中加入的遊戲資料夾。不影響 SD 卡。下次工作階段生效。</string>
<string name="storage_default_ask">每次都詢問</string>
<string name="storage_default_ask_detail">每次安裝時選擇目標位置</string>
<string name="storage_default_internal">內部儲存空間</string>
@@ -4115,4 +4118,5 @@
<string name="steam_store_close_steam">請先關閉 Steam</string>
<string name="steam_store_session_wait">請先暫停 Steam 下載</string>
<string name="steam_store_linux_build">此遊戲會安裝其 Linux 版本。請透過 Steam 安裝。</string>
<string name="game_steam_offline_uncached">Steam 處於離線模式,尚未載入 %1$s。請在 Steam 中連線一次後再玩。</string>
</resources>
+8
View File
@@ -1677,6 +1677,7 @@
<string name="rail_percent">%1$d%%</string>
<string name="rail_resume_named">Resume %1$s</string>
<string name="roms_text">Shows up as /root/ROMs in each session. Internal storage is at /root/Storage.</string>
<string name="roms_text_unmounted">Shows up as /root/ROMs in each session.</string>
<string name="roms_none">No folder chosen</string>
<string name="roms_applies">Applies next session. SD cards work.</string>
<string name="roms_choose">Choose folder</string>
@@ -1754,6 +1755,7 @@
<string name="game_link_session_busy">Stop the current session before launching a Steam game.</string>
<string name="game_link_failed">Could not send the game to Steam. Try launching it again.</string>
<string name="game_needs_app_model">%1$s is a UWP app. This runtime has no Windows app-model host to start it.</string>
<string name="game_steam_offline_uncached">Steam is in offline mode and has not loaded %1$s yet. Go online in Steam once to play it.</string>
<string name="setup_retry_removal">Retry removal</string>
<string name="runtime_removing">Removing</string>
<string name="runtime_removal_incomplete">Removal incomplete</string>
@@ -3563,6 +3565,8 @@
<string name="storage_default_group">Install location</string>
<string name="storage_default_title">Default storage</string>
<string name="storage_default_hint">New store installs go to the selected location. Existing games stay where they are. Steam libraries keep their own setting.</string>
<string name="storage_shared_mount">Phone storage in Linux</string>
<string name="storage_shared_mount_hint">Mounts your phone\'s internal storage at /root/Storage. When off, only game folders you\'ve added from it are mounted. SD cards are not affected. Applies to the next session.</string>
<string name="storage_default_ask">Ask every time</string>
<string name="storage_default_ask_detail">Choose a target for each install</string>
<string name="storage_default_internal">Internal storage</string>
@@ -4373,6 +4377,10 @@
<string name="dev_ui_zoo_open">Open</string>
<string name="dev_ui_zoo_show">Show</string>
<string name="dev_ui_zoo_note">Previews change nothing real: nothing is installed, removed or signed out, and the menu\'s switches save nothing. A Library preview stays until you end it from its pill or restart.</string>
<string name="dev_preview_steam_home">Steam home</string>
<string name="dev_preview_steam_none">No games installed</string>
<string name="dev_preview_steam_few">3 games installed</string>
<string name="dev_preview_steam_many">12 games installed</string>
<string name="dev_preview_library">Library</string>
<string name="dev_preview_library_nothing_installed">Nothing installed</string>
<string name="dev_preview_library_signed_out">Signed out of every store</string>
@@ -50,4 +50,28 @@ class MaliAutoRouteTest {
assertTrue(MaliAutoRoute.userChoice(true, MaliAutoRoute.VENUS, MaliAutoRoute.BRIDGE))
assertFalse(MaliAutoRoute.userChoice(false, MaliAutoRoute.NONE, MaliAutoRoute.BRIDGE))
}
@Test
fun venusTheUserSwitchedOffIsNotSwitchedBackOn() {
assertFalse(MaliAutoRoute.venusStandsIn(true, true, false, true, "Mali-G715"))
assertTrue(MaliAutoRoute.venusStandsIn(true, true, true, true, "Mali-G2-Ultra-NX MC12"))
}
@Test
fun venusIsAutosStandInOnlyWhereSteamStartsThroughIt() {
assertTrue(MaliAutoRoute.venusStandsIn(true, true, false, false, "Mali-G715"))
assertFalse(MaliAutoRoute.venusStandsIn(true, true, false, false, "Mali-G2-Ultra-NX MC12"))
assertFalse(MaliAutoRoute.venusStandsIn(true, true, true, false, "Mali-G2-Ultra-NX MC16"))
assertFalse(MaliAutoRoute.venusStandsIn(false, true, true, true, "Mali-G715"))
assertFalse(MaliAutoRoute.venusStandsIn(true, false, true, true, "Mali-G715"))
}
@Test
fun venusThatAutoTurnedOffIsStillAutosToTurnOn() {
// Auto clears the stored key when it moves to the bridge: a stored "off" would read as the user's own choice.
val cleared = MaliAutoRoute.userChoice(keyStored = false, owner = MaliAutoRoute.BRIDGE, route = MaliAutoRoute.VENUS)
val writtenOff = MaliAutoRoute.userChoice(keyStored = true, owner = MaliAutoRoute.BRIDGE, route = MaliAutoRoute.VENUS)
assertTrue(MaliAutoRoute.venusStandsIn(true, true, false, cleared, "Mali-G715"))
assertFalse(MaliAutoRoute.venusStandsIn(true, true, false, writtenOff, "Mali-G715"))
}
}
@@ -0,0 +1,50 @@
package com.droiddeck.launcher
import com.droiddeck.launcher.gpu.SteamVr.Status
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
class QuestSteamVrWatchTest {
@Test
fun steamVrThatNeverStartsFailsAfterTheStartupWindow() {
val watch = QuestSteamVrWatch(0)
assertFalse(watch.stopped(29_999, Status.READY, paused = false))
assertTrue(watch.stopped(30_000, Status.READY, paused = false))
}
@Test
fun steamVrThatStopsFailsAfterTheRunningGrace() {
val watch = QuestSteamVrWatch(0)
assertFalse(watch.stopped(10_000, Status.RUNNING, paused = false))
assertFalse(watch.stopped(14_999, Status.UNAVAILABLE, paused = false))
assertTrue(watch.stopped(15_000, Status.UNAVAILABLE, paused = false))
}
@Test
fun aFrozenGuestNeverCountsAsStopped() {
val watch = QuestSteamVrWatch(0)
assertFalse(watch.stopped(10_000, Status.RUNNING, paused = false))
for (now in 11_000L..600_000L step 10_000) assertFalse(watch.stopped(now, Status.UNAVAILABLE, paused = true))
}
@Test
fun aResumedGuestGetsTheFullGraceFromItsFirstAnswerAfterTheFreeze() {
val watch = QuestSteamVrWatch(0)
watch.stopped(10_000, Status.RUNNING, paused = false)
watch.stopped(300_000, Status.UNAVAILABLE, paused = true)
assertFalse(watch.stopped(310_000, Status.UNAVAILABLE, paused = false))
assertFalse(watch.stopped(324_999, Status.UNAVAILABLE, paused = false))
assertTrue(watch.stopped(325_000, Status.UNAVAILABLE, paused = false))
}
@Test
fun steamVrAnsweringAfterAResumeKeepsTheSessionOpen() {
val watch = QuestSteamVrWatch(0)
watch.stopped(10_000, Status.RUNNING, paused = false)
watch.stopped(300_000, Status.UNAVAILABLE, paused = true)
assertFalse(watch.stopped(312_000, Status.RUNNING, paused = false))
assertFalse(watch.stopped(316_999, Status.UNAVAILABLE, paused = false))
assertTrue(watch.stopped(317_000, Status.UNAVAILABLE, paused = false))
}
}
@@ -21,4 +21,20 @@ class AllFilesAccessTest {
assertTrue(AllFilesAccess.missing(sdk = 35) { false })
assertFalse(AllFilesAccess.missing(sdk = 35) { true })
}
@Test
fun onlySharedStorageNeedsIt() {
assertTrue(AllFilesAccess.covers("/storage/emulated/0"))
assertTrue(AllFilesAccess.covers("/storage/1A2B-3C4D/Games"))
assertTrue(AllFilesAccess.covers("/sdcard/Download"))
assertFalse(AllFilesAccess.covers("/storage/emulated/0/Android/data"))
assertFalse(AllFilesAccess.covers("/storage/1A2B-3C4D/Android/obb"))
assertTrue(AllFilesAccess.covers("/storage/emulated/0/Android"))
assertTrue(AllFilesAccess.covers("/storage/emulated/0/Android/database"))
assertTrue(AllFilesAccess.covers("/storage/emulated/0/Download/Android/data"))
assertTrue(AllFilesAccess.covers("/storage/1A2B-3C4D/Games/Android/obb/x"))
assertFalse(AllFilesAccess.covers("/storage/emulated/0/Android/data/com.droiddeck.launcher/files"))
assertFalse(AllFilesAccess.covers("/storage/1A2B-3C4D/Android/obb/com.droiddeck.launcher"))
assertFalse(AllFilesAccess.covers("/data/user/0/com.droiddeck.launcher/files"))
}
}
@@ -103,6 +103,23 @@ class AddedGamesStoreScanTest {
assertTrue(listing.contains("\"store\":\"${Store.EPIC.id}\""))
}
@Test fun anEaGamesSavedLaunchOptionsReachTheListingAndOtherStoresIgnoreThem() {
val ea = install(Store.EA, "Origin.OFR.1", "Burnout Paradise", "bin/Game.exe", launcher = true)
val gog = install(Store.GOG, "42", "Plain Gog", "Game.exe")
AddedGames.scan(app)
AddedGameEdits.setLaunchOptions(app, ea.path, "-dx11")
AddedGameEdits.setLaunchOptions(app, gog.path, "-ignored")
val games = AddedGames.scan(app)
assertEquals("-dx11", games.single { it.folder.absolutePath == ea.absolutePath }.launchOptions)
assertEquals("", games.single { it.folder.absolutePath == gog.absolutePath }.launchOptions)
assertTrue(AddedGames.writeListing(app, games).readText().contains("\"launch\":\"-dx11\""))
}
@Test fun anEaGameWithoutSavedLaunchOptionsHasNone() {
val ea = install(Store.EA, "Origin.OFR.2", "Other EA", "bin/Game.exe", launcher = true)
assertEquals("", AddedGames.scan(app).single { it.folder.absolutePath == ea.absolutePath }.launchOptions)
}
// GOG runs a task from its declared working directory; the install root when it declares none.
@Test fun aTaskWorkingDirectoryBecomesTheShortcutsStartIn() {
val folder = install(Store.GOG, "1207658924", "Witcher Game", "System/witcher.exe", workdir = "System")
@@ -0,0 +1,64 @@
package com.droiddeck.launcher.frontend
import java.io.ByteArrayOutputStream
import java.io.File
import java.nio.ByteBuffer
import java.nio.ByteOrder
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [33])
class SteamAppInfoTest {
@get:Rule val tmp = TemporaryFolder()
private fun file() = File(tmp.newFolder(), "appinfo.vdf")
private fun le(size: Int) = ByteBuffer.allocate(size).order(ByteOrder.LITTLE_ENDIAN)
private fun writeV28(file: File, appId: Int, name: String) {
val kv = ByteArrayOutputStream().apply {
fun cstring(s: String) { write(s.toByteArray()); write(0) }
write(0x00); cstring("appinfo")
write(0x00); cstring("common")
write(0x01); cstring("name"); cstring(name)
write(0x08); write(0x08); write(0x08)
}.toByteArray()
val body = ByteArray(60) + kv
val out = le(8 + 8 + body.size + 4).putInt(0x07564428).putInt(1).putInt(appId).putInt(body.size).put(body).putInt(0)
file.writeBytes(out.array())
}
@Test fun anAppInTheClientsCacheIsToldApartFromOneMissingFromIt() {
val file = file()
WinCompSourcesTest.writeAppinfo(file, 17470)
assertEquals(true, SteamAppInfo.cached(file, 17470))
assertEquals(false, SteamAppInfo.cached(file, 1145360))
}
@Test fun theOlderFormatWithoutAStringTableIsReadToo() {
val file = file()
writeV28(file, 17470, "Some Game")
assertTrue(SteamAppInfo.cached(file, 17470)!!)
assertFalse(SteamAppInfo.cached(file, 22330)!!)
assertEquals("Some Game", SteamAppInfo.read(file, 17470)!!.name)
assertNull(SteamAppInfo.read(file, 22330))
}
@Test fun aMissingOrUnknownCacheIsNotTakenAsMissingTheApp() {
val missing = file()
assertNull(SteamAppInfo.cached(missing, 17470))
val newer = file().apply { writeBytes(le(16).putInt(0x0756442A).putInt(1).array()) }
assertNull(SteamAppInfo.cached(newer, 17470))
val garbage = file().apply { writeBytes(byteArrayOf(1, 2, 3)) }
assertNull(SteamAppInfo.cached(garbage, 17470))
}
}
@@ -259,7 +259,7 @@ class PadPartialAxesTest {
}
@Test fun keyTriggerDecision() {
val held = BooleanArray(2)
val held = PadBridge.TriggerKey.slots(1)[0]
assertEquals(1f, PadBridge.keyTrigger(0f, true, 0, false, held, 0))
assertEquals(0f, PadBridge.keyTrigger(1f, false, 0, false, held, 0))
assertEquals(0.25f, PadBridge.keyTrigger(0.25f, true, 1, false, held, 0))
@@ -271,6 +271,64 @@ class PadPartialAxesTest {
assertEquals(0f, PadBridge.axisTrigger(0f, held, 1))
}
@Test fun keyBeforeAxisOnAFullPullIsOnePress() {
val device = device(MotionEvent.AXIS_GAS)
motion(device)
key(device, KeyEvent.KEYCODE_BUTTON_R2)
assertEquals(1f, pad().rightTrigger)
for (value in listOf(0.1f, 0.3f, 0.6f, 1f, 0.98f)) {
motion(device, MotionEvent.AXIS_GAS to value)
assertEquals(1f, pad().rightTrigger)
}
motion(device, MotionEvent.AXIS_GAS to 0.7f)
assertEquals(0.7f, pad().rightTrigger)
key(device, KeyEvent.KEYCODE_BUTTON_R2, KeyEvent.ACTION_UP)
assertEquals(0.7f, pad().rightTrigger)
motion(device, MotionEvent.AXIS_GAS to 0f)
assertEquals(0f, pad().rightTrigger)
}
@Test fun releasingDuringTheHandoffFollowsTheAxis() {
val device = device(MotionEvent.AXIS_GAS)
motion(device)
key(device, KeyEvent.KEYCODE_BUTTON_R2)
motion(device, MotionEvent.AXIS_GAS to 0.4f)
assertEquals(1f, pad().rightTrigger)
key(device, KeyEvent.KEYCODE_BUTTON_R2, KeyEvent.ACTION_UP)
assertEquals(0.4f, pad().rightTrigger)
}
@Test fun movingTriggerAxisStaysAnalogWhenItsKeyFiresFirst() {
val device = device(MotionEvent.AXIS_GAS)
motion(device, MotionEvent.AXIS_GAS to 0.5f)
motion(device, MotionEvent.AXIS_GAS to 0f)
key(device, KeyEvent.KEYCODE_BUTTON_R2)
assertEquals(0f, pad().rightTrigger)
motion(device, MotionEvent.AXIS_GAS to 0.1f)
assertEquals(0.1f, pad().rightTrigger)
motion(device, MotionEvent.AXIS_GAS to 0.35f)
assertEquals(0.35f, pad().rightTrigger)
key(device, KeyEvent.KEYCODE_BUTTON_R2, KeyEvent.ACTION_UP)
motion(device, MotionEvent.AXIS_GAS to 0f)
assertEquals(0f, pad().rightTrigger)
}
@Test fun triggerSwitchedToDigitalPressesAgainAfterOneSilentPress() {
val device = device(MotionEvent.AXIS_GAS)
motion(device, MotionEvent.AXIS_GAS to 0.5f)
motion(device, MotionEvent.AXIS_GAS to 0f)
key(device, KeyEvent.KEYCODE_BUTTON_R2)
motion(device)
key(device, KeyEvent.KEYCODE_BUTTON_R2, KeyEvent.ACTION_UP)
assertEquals(0f, pad().rightTrigger)
key(device, KeyEvent.KEYCODE_BUTTON_R2)
assertEquals(1f, pad().rightTrigger)
motion(device)
assertEquals(1f, pad().rightTrigger)
key(device, KeyEvent.KEYCODE_BUTTON_R2, KeyEvent.ACTION_UP)
assertEquals(0f, pad().rightTrigger)
}
@Test fun silentTriggerAxesLetTheirKeysPress() {
val device = device(MotionEvent.AXIS_LTRIGGER, MotionEvent.AXIS_RTRIGGER)
motion(device)
@@ -294,11 +352,15 @@ class PadPartialAxesTest {
key(device, KeyEvent.KEYCODE_BUTTON_L2)
assertEquals(1f, pad().leftTrigger)
motion(device, MotionEvent.AXIS_LTRIGGER to 0.4f)
assertEquals(0.4f, pad().leftTrigger)
assertEquals(1f, pad().leftTrigger)
motion(device, MotionEvent.AXIS_LTRIGGER to 0f)
assertEquals(0f, pad().leftTrigger)
key(device, KeyEvent.KEYCODE_BUTTON_L2, KeyEvent.ACTION_UP)
assertEquals(0f, pad().leftTrigger)
key(device, KeyEvent.KEYCODE_BUTTON_L2)
assertEquals(0f, pad().leftTrigger)
motion(device, MotionEvent.AXIS_LTRIGGER to 0.4f)
assertEquals(0.4f, pad().leftTrigger)
}
private fun pad(): PadState = requireNotNull(JoyConPadTest.RecordingWriter.pads[0])
@@ -188,4 +188,57 @@ class LinuxNetworkLinkComponentTest {
ReflectionHelpers.callInstanceMethod<Unit>(component, "replace", from(java.io.File::class.java, file), from(String::class.java, "nameserver 8.8.8.8\n"))
assertEquals("nameserver 8.8.8.8\n", file.readText())
}
private val telemetryLine = "0.0.0.0 " + LinuxNetworkLinkComponent.UNITY_TELEMETRY_HOSTS.joinToString(" ")
@Test
fun newHostsFileHasLocalhostAndRefusesUnityTelemetry() {
val text = LinuxNetworkLinkComponent.hostsText(null)
assertTrue(text.startsWith("127.0.0.1 localhost\n::1 localhost\n"))
assertTrue(text.contains("$telemetryLine\n"))
assertTrue("stats.unity3d.com" in LinuxNetworkLinkComponent.UNITY_TELEMETRY_HOSTS)
}
@Test
fun hostsKeepsTheUsersLinesAndWritesTheBlockOnce() {
val user = "127.0.0.1 localhost\n::1 localhost\n10.0.0.5 nas.lan\n"
val once = LinuxNetworkLinkComponent.hostsText(user)
assertTrue(once.startsWith(user))
assertEquals(once, LinuxNetworkLinkComponent.hostsText(once))
assertEquals(1, once.lines().count { it == telemetryLine })
}
@Test
fun hostsReplacesAnOlderBlockWithTheCurrentList() {
val old = "127.0.0.1 localhost\n# DroidDeck: Unity telemetry is refused (start)\n0.0.0.0 old.example\n" +
"# DroidDeck: Unity telemetry is refused (end)\n10.0.0.5 nas.lan\n"
val text = LinuxNetworkLinkComponent.hostsText(old)
assertFalse(text.contains("old.example"))
assertTrue(text.contains("10.0.0.5 nas.lan\n"))
assertTrue(text.contains("$telemetryLine\n"))
}
@Test
fun hostsKeepsTheUsersLinesAfterAStartMarkerWithoutAnEnd() {
val broken = "127.0.0.1 localhost\n# DroidDeck: Unity telemetry is refused (start)\n10.0.0.5 nas.lan\n"
val once = LinuxNetworkLinkComponent.hostsText(broken)
assertTrue(once.contains("10.0.0.5 nas.lan\n"))
assertEquals(1, once.lines().count { it == "# DroidDeck: Unity telemetry is refused (start)" })
val twice = LinuxNetworkLinkComponent.hostsText(once)
assertTrue(twice.contains("10.0.0.5 nas.lan\n"))
assertEquals(once, twice)
}
@Test
fun hostsDropsAStrayEndMarker() {
val text = LinuxNetworkLinkComponent.hostsText("127.0.0.1 localhost\n# DroidDeck: Unity telemetry is refused (end)\n10.0.0.5 nas.lan\n")
assertTrue(text.startsWith("127.0.0.1 localhost\n10.0.0.5 nas.lan\n"))
assertEquals(1, text.lines().count { it == "# DroidDeck: Unity telemetry is refused (end)" })
}
@Test
fun hostsAddsLocalhostOnlyWhenItIsMissing() {
assertTrue(LinuxNetworkLinkComponent.hostsText("10.0.0.5 nas.lan\n").startsWith("127.0.0.1 localhost\n::1 localhost\n10.0.0.5 nas.lan\n"))
assertEquals(1, LinuxNetworkLinkComponent.hostsText("127.0.0.1 localhost\n").lines().count { "localhost" in it })
}
}
@@ -0,0 +1,79 @@
package com.droiddeck.launcher.runtime
import androidx.test.core.app.ApplicationProvider
import java.io.File
import java.nio.ByteBuffer
import java.nio.ByteOrder
import java.nio.file.Files
import org.junit.After
import org.junit.Assert.assertArrayEquals
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
class NativeGuestPrepareTest {
private val svc = 0xd4000001.toInt()
private val rseq = 0xd28024a8.toInt()
private val enosys = 0x928004a0.toInt()
private fun unpatchedLoader(): ByteArray {
val data = ByteArray(0x200)
val b = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN)
b.put(0, 0x7f); b.put(1, 'E'.code.toByte()); b.put(2, 'L'.code.toByte()); b.put(3, 'F'.code.toByte())
b.put(4, 2); b.put(5, 1)
b.putShort(18, 183)
b.putLong(32, 64)
b.putShort(54, 56); b.putShort(56, 1)
b.putInt(64, 1); b.putInt(68, 5)
b.putLong(72, 0x100); b.putLong(96, 0x100)
b.putInt(0x100, rseq); b.putInt(0x104, svc)
return data
}
private fun rootWithUnpatchedLoader(): Pair<File, File> {
val root = Files.createTempDirectory("native-prepare").toFile()
val loader = File(root, "usr/lib/ld-linux-aarch64.so.1")
loader.parentFile!!.mkdirs()
loader.writeBytes(unpatchedLoader())
return root to loader
}
private fun instructionAfterRseq(loader: File): Int =
ByteBuffer.wrap(loader.readBytes()).order(ByteOrder.LITTLE_ENDIAN).getInt(0x104)
@After
fun endSession() {
NativeGuest.sessionMode = null
}
@Test
fun aProgramStartedOutsideASessionGetsALoaderThatSurvivesSeccomp() {
val (root, loader) = rootWithUnpatchedLoader()
NativeGuest.sessionMode = null
NativeGuest.processBuilder(ApplicationProvider.getApplicationContext(), root, emptyList(), listOf("/usr/bin/true"))
assertEquals(enosys, instructionAfterRseq(loader))
}
@Test
fun aProgramStartedInARunningSessionLeavesTheRootfsAsTheSessionPreparedIt() {
val (root, loader) = rootWithUnpatchedLoader()
val before = loader.readBytes()
NativeGuest.sessionMode = true
NativeGuest.processBuilder(ApplicationProvider.getApplicationContext(), root, emptyList(), listOf("/usr/bin/true"))
assertArrayEquals(before, loader.readBytes())
}
@Test
fun anAlreadyPreparedLoaderIsNotRewritten() {
val (root, loader) = rootWithUnpatchedLoader()
NativeGuest.processBuilder(ApplicationProvider.getApplicationContext(), root, emptyList(), listOf("/usr/bin/true"))
val modified = loader.lastModified()
val bytes = loader.readBytes()
loader.setLastModified(modified - 10_000)
NativeGuest.processBuilder(ApplicationProvider.getApplicationContext(), root, emptyList(), listOf("/usr/bin/true"))
assertArrayEquals(bytes, loader.readBytes())
assertEquals(modified - 10_000, loader.lastModified())
}
}
@@ -54,6 +54,32 @@ class OfflineModeTest {
shadowOf(cm).setNetworkCapabilities(cm.activeNetwork, caps)
}
private fun clientCache(appId: Int) =
com.droiddeck.launcher.frontend.WinCompSourcesTest.writeAppinfo(com.droiddeck.launcher.frontend.SteamAppInfo.appinfoFile(context), appId)
@Test
fun offlineSteamReportsAGameMissingFromItsCache() {
writeSteam("1")
clientCache(220)
assertTrue(OfflineMode.active(context))
assertTrue(OfflineMode.lacksAppInfo(context, 17470))
assertFalse(OfflineMode.lacksAppInfo(context, 220))
}
@Test
fun onlineSteamNeverReportsAMissingGame() {
clientCache(220)
assertFalse(OfflineMode.active(context))
assertFalse(OfflineMode.lacksAppInfo(context, 17470))
}
@Test
fun offlineSteamWithoutAReadableCacheReportsNothing() {
writeSteam("1")
com.droiddeck.launcher.frontend.SteamAppInfo.appinfoFile(context).delete()
assertFalse(OfflineMode.lacksAppInfo(context, 17470))
}
@Test
fun offlineWhenChosenOrWithoutInternet() {
assertFalse(OfflineMode.offline(manual = false, online = true))
@@ -3,6 +3,7 @@ package com.droiddeck.launcher.session
import com.droiddeck.launcher.session.WinComponents.Support
import org.json.JSONObject
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@@ -31,12 +32,13 @@ class WinComponentsSupportTest {
step("install_msi", "url" to "$base/ps-x86.msi"), step("install_msi", "url" to "$base/ps-x64.msi"))))
}
@Test fun builtInArm64RuntimeIsRegistryOnlyInBothViews() {
@Test fun builtInArm64RuntimeInstallsTheRedistributable() {
val c = WinComponents.builtInArm64Runtime()
assertEquals(Support.READY, support(c))
assertEquals(12, c.steps.count { it.action == "set_register_key" })
assertEquals(setOf("HKLM\\Software\\Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\arm64",
"HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\arm64"), c.steps.map { it.str("key") }.toSet())
assertEquals(listOf("install_exe"), c.steps.map { it.action })
assertEquals("VC_redist.arm64.exe", c.steps.single().str("file_name"))
assertEquals(0, c.steps.count { it.action == "set_register_key" })
assertTrue(c.revision > 0)
}
@Test fun installerWrappersInstallHere() {
@@ -302,7 +302,7 @@ class EaTest {
val text = StoreLaunch.launcherText(StoreGameSidecar(Store.EA, "Origin.OFR.1", "Game", exe = "bin/Game.exe", args = listOf("-dx12")))
assertTrue(text.contains("for /f \"usebackq tokens=1,* delims==\" %%a in (\"%~dp0.droiddeck-ea-env\") do set \"%%a=%%b\""))
assertTrue(text.contains("del \"%~dp0.droiddeck-ea-env\""))
assertTrue(text.contains("start \"\" \"${StoreLaunch.EA_ORIGIN}\"\r\n\"%~dp0bin\\Game.exe\" -dx12\r\n"))
assertTrue(text.contains("start \"\" \"${StoreLaunch.EA_ORIGIN}\"\r\n\"%~dp0bin\\Game.exe\" -dx12 %*\r\n"))
assertTrue(text.trimEnd().endsWith("taskkill /f /im Origin.exe >nul 2>&1"))
}
@@ -16,6 +16,34 @@ class XboxManifestTest {
java.io.File(root, "MicrosoftGame.Config").writeText("<Game><ExecutableList><Executable Name=\"bin\\GAME.EXE\" TargetDeviceFamily=\"PC\"/></ExecutableList></Game>")
assertEquals("Bin/Game.exe", XboxInstaller.executable(root))
}
@Test fun aListedExecutableThePackageDoesNotShipFallsThroughToTheNextOne() {
val root = temporary.newFolder()
java.io.File(root, "bin/x64_dx12").mkdirs()
java.io.File(root, "bin/x64_dx12/game.exe").writeText("encrypted")
java.io.File(root, "MicrosoftGame.config").writeText("<Game><ExecutableList>" +
"<Executable Name=\"bin\\x64\\game.exe\" TargetDeviceFamily=\"PC\"/>" +
"<Executable Name=\"Launcher\\start.exe\" TargetDeviceFamily=\"PC\"/>" +
"<Executable Name=\"bin\\x64_dx12\\game.exe\" TargetDeviceFamily=\"PC\"/></ExecutableList></Game>")
assertEquals("bin/x64_dx12/game.exe", XboxInstaller.executable(root))
}
@Test fun anAmbiguouslyCasedExecutableFallsThroughToTheNextOne() {
val root = temporary.newFolder()
java.io.File(root, "Game.exe").writeText("one")
java.io.File(root, "GAME.exe").writeText("two")
java.io.File(root, "Other.exe").writeText("three")
org.junit.Assume.assumeTrue(root.listFiles().orEmpty().count { it.name.equals("game.exe", true) } == 2)
java.io.File(root, "MicrosoftGame.config").writeText("<Game><ExecutableList>" +
"<Executable Name=\"game.exe\"/><Executable Name=\"Other.exe\"/></ExecutableList></Game>")
assertEquals("Other.exe", XboxInstaller.executable(root))
}
@Test fun aPackageWithNoneOfItsListedExecutablesStillFails() {
val root = temporary.newFolder()
java.io.File(root, "Unlisted.exe").writeText("encrypted")
java.io.File(root, "MicrosoftGame.config").writeText("<Game><ExecutableList>" +
"<Executable Name=\"bin\\Game.exe\"/><Executable Name=\"Game.exe\"/></ExecutableList></Game>")
val failure = assertThrows(IllegalArgumentException::class.java) { XboxInstaller.executable(root) }
assertEquals("Missing or ambiguous Xbox launch path.", failure.message)
}
@Test fun aLauncherMenuIsSkippedForTheProgramItNames() {
val root = temporary.newFolder()
java.io.File(root, "EmuMenu").mkdir()
@@ -122,6 +122,19 @@ class LibraryEntriesTest {
assertEquals(listOf("steam", "xbox", "itch", "gamejolt"), librarySources(entries, listOf("xbox", "itch", "gamejolt"), setOf("itch", "gamejolt")))
}
@Test fun everySignedInStoreKeepsItsTabWhenItsLibraryIsEmptyOrFailedToLoad() {
val entries = listOf(LibraryEntry("epic:1", "epic", "Game", null, null, true))
val order = listOf("epic", Store.ROCKSTAR.id, "gog")
val always = alwaysLibraryTabs(listOf(Store.STEAM, Store.ROCKSTAR), stores = true, soundMode = false)
assertEquals(listOf("steam", "epic", "rockstar", "battlenet", "added"), librarySources(entries, order, always))
}
@Test fun signedOutStoresAndSoundtrackModeDoNotGainEmptyTabs() {
assertEquals(setOf("added", "battlenet"), alwaysLibraryTabs(emptyList(), stores = true, soundMode = false))
assertEquals(setOf("added", "battlenet"), alwaysLibraryTabs(listOf(Store.STEAM, Store.ROCKSTAR), stores = true, soundMode = true))
assertEquals(emptySet<String>(), alwaysLibraryTabs(emptyList(), stores = false, soundMode = false))
}
@Test fun gameKeysNameEitherAnAppOrAStoreProduct() {
GameRef.parse("app:440").let { assertEquals(440, it.appId); assertNull(it.store) }
GameRef.parse("app:-12").let { assertEquals(-12, it.appId) }
+9
View File
@@ -193,6 +193,15 @@ A Unity game under FEX (`UnityPlayer.dll` for Windows builds under Proton,
turns it off: without TSO such games can deadlock or crash (seen with Megabonk
and Crab Game). A FEX preset chosen for the game itself still applies.
An Inno Setup installer added as a game runs with the Stability preset's FEX
settings (full TSO, full x87 precision, no multiblock). Under the default
Performance + TSO preset the 32-bit setup stub corrupts its own paths and stops
with Wine's "Path not fpund." dialog (#1277, #3067). The stub is found by the
setup loader's offset-table ID in its resources, or by the `Inno` marker that
loaders older than 5.1.5 keep at offset 0x30. GOG installs avoid the stub by
extracting natively. A FEX preset chosen for the installer's own entry still
applies.
Games launched through Proton get `vblank_mode=0`, so OpenGL does not wait for
each screen refresh. Wine asks for a swap interval of 1 on every OpenGL window, and WineD3D's front-buffer
drawing (DirectDraw, Direct3D 1–7) never lowers it, so those games ran at the
+13
View File
@@ -150,6 +150,19 @@ The SPIR-V version the driver gets:
- This is what Dawn ("Disable SPIR-V 1.4 on Android ARM"), ANGLE (`supportsSPIRV14`) and naga
(`AVOID_SPIRV_COPY_LOGICAL`) do for a proprietary compiler they cannot trust.
Geometry shaders:
- The Mali-G610's driver (r38p1) crashes compiling Zink's geometry shaders, always at the same
place (SIGSEGV at 0x40 in `cmpbe_v2_compile_multiple_shaders`): its shader for `GL_QUADS`, and
a GLSL geometry shader that only passes triangles on.
- A geometry shader that only passes triangles on, from a plain Vulkan program, does not crash it
but draws nothing, in SPIR-V 1.0, 1.3 and 1.6, with and without the layer.
- Zink writes them in SPIR-V 1.6 with the Vulkan memory model, which the version cap leaves alone.
Lowering them would not help, since the plain shader draws nothing at 1.0 and 1.3 either.
- On ARM GPUs the layer reports no `geometryShader` to Zink (engine name `mesa zink`). Mesa then
splits quads into triangles itself, and Zink still offers OpenGL 3.2. DXVK keeps the feature: it
needs it for D3D10 and 11.
- `DROIDDECK_MALI_COMPAT_NO_GS=0` keeps the feature for Zink, `=1` hides it from every application.
Files:
- `layer.c`: loader plumbing, feature and limit reporting, device creation, the hook table.
- `pipeline.c`: pipelines, shader modules, viewports.
+1
View File
@@ -64,6 +64,7 @@ Links of the form `droiddeck://settings/<section>` open a Settings section direc
| Setting | Where | Also matches |
| --- | --- | --- |
| Storage | Tabs › Storage | sd card, space, uninstall, disk |
| Phone storage in Linux | Tabs › Storage | sdcard, mount, privacy, files |
| Syncthing | Tabs › Syncthing | syncthing, saves |
| Decky | Tabs › Decky | plugins, plugin store, homebrew, loader |
| Boot movies | Tabs › Boot movies | startup movie, boot video, animation, steamdeckrepo |
+17 -8
View File
@@ -10,13 +10,13 @@ if [ "${#missing[@]}" = 0 ]; then
echo "Ubuntu build dependencies are already installed."
exit 0
fi
options=()
source_options=()
# Runners without the deb822 Ubuntu sources file keep their own apt configuration.
ubuntu_sources=${UBUNTU_SOURCES_FILE:-/etc/apt/sources.list.d/ubuntu.sources}
if [ -f "$ubuntu_sources" ]; then
options+=(-o "Dir::Etc::sourcelist=$ubuntu_sources" -o Dir::Etc::sourceparts=-)
source_options=(-o "Dir::Etc::sourcelist=$ubuntu_sources" -o Dir::Etc::sourceparts=-)
fi
options+=(
apt_options=(
-o Acquire::Retries=1
-o Acquire::http::Timeout=15
-o Acquire::https::Timeout=15
@@ -24,14 +24,23 @@ options+=(
)
install_packages() {
echo "Updating Ubuntu package indexes."
sudo timeout --kill-after=10s 60s apt-get "${options[@]}" -o APT::Update::Error-Mode=any update -q || return $?
sudo timeout --kill-after=10s 60s apt-get "${source_options[@]}" "${apt_options[@]}" -o APT::Update::Error-Mode=any update -q || return $?
echo "Installing: ${missing[*]}"
sudo timeout --kill-after=10s 120s env DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get "${options[@]}" install -y -q --no-install-recommends "${missing[@]}"
sudo timeout --kill-after=10s 120s env DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get "${source_options[@]}" "${apt_options[@]}" install -y -q --no-install-recommends "${missing[@]}"
}
if install_packages; then
exit 0
fi
[ -f "$ubuntu_sources" ] || exit 1
if [ -f "$ubuntu_sources" ]; then
template=$(cat "$ubuntu_sources")
else
codename=$(. "${OS_RELEASE_FILE:-/etc/os-release}" && echo "${UBUNTU_CODENAME:-${VERSION_CODENAME:-}}")
[ -n "$codename" ] || exit 1
template="Types: deb
URIs: -
Suites: $codename $codename-updates $codename-security
Components: main restricted universe multiverse"
fi
sources=$(mktemp --suffix=.sources)
trap 'rm -f "$sources"' EXIT
# The last mirror of each list is outside Canonical's network, so it still answers when runners cannot reach Canonical.
@@ -39,12 +48,12 @@ mirrors=(https://archive.ubuntu.com/ubuntu https://mirrors.edge.kernel.org/ubunt
case "$(dpkg --print-architecture)" in
arm64) mirrors=(https://ports.ubuntu.com/ubuntu-ports https://mirrors.ocf.berkeley.edu/ubuntu-ports) ;;
esac
source_options=(-o "Dir::Etc::sourcelist=$sources" -o Dir::Etc::sourceparts=-)
status=1
for mirror in "${mirrors[@]}"; do
echo "::warning::Ubuntu mirror failed or timed out; retrying with $mirror."
sed -E "s@^URIs:.*@URIs: $mirror@" "$ubuntu_sources" > "$sources"
printf '%s\n' "$template" | sed -E "s@^URIs:.*@URIs: $mirror@" > "$sources"
chmod 644 "$sources"
options[1]="Dir::Etc::sourcelist=$sources"
status=0
install_packages || status=$?
[ "$status" = 0 ] && exit 0
+138
View File
@@ -0,0 +1,138 @@
#version 450
// ─────────────────────────────────────────────────────────────────────────────
// win-fg C2 — FLOW REGULARIZATION (TV-L1 smoothness prior), one iteration.
//
// CLEAN-ROOM STATEMENT
// Written from first principles for win-fg. NO code from LSFG, Max's wnfg_XX
// blobs, GameScope, or any NC-licensed source — equations only, from published
// papers. win-fg is MIT.
//
// WHAT THIS DOES
// C1 (of3_gm_prewarp) removes the CAMERA motion before the dense SAD search, so
// the flow field this shader receives (flowLvl_[kFlowFinest], 1/4-res) is the
// OBJECT-only residual. That residual still carries incoherent / spurious
// per-block vectors on low-texture or ambiguous blocks. C2 applies a variational
// smoothness prior that suppresses those spurious vectors while PRESERVING true
// motion discontinuities at object edges (that is the whole point of using an L1
// / Total-Variation prior instead of an L2 / Horn-Schunck one — L2 rounds the
// silhouettes off, which is exactly the smear we are trying to remove).
//
// ENERGY (TV-L1 optical-flow denoising of a fixed observation f0):
// min_u Σ g(x)·|∇u(x)| + λ·|u(x) − f0(x)|
// where u is the regularized flow, f0 is the raw SAD flow (the fixed data term),
// |∇u| is the Total-Variation (L1-of-gradient) regularizer, and g(x)∈(0,1] is an
// edge-aware weight from the luma gradient (small across an object silhouette so
// the prior does NOT smooth flow across it). References:
// * Zach, Pock & Bischof 2007, "A Duality Based Approach for Realtime TV-L1
// Optical Flow" (DAGM) — the TV-L1 energy + the L1 data soft-threshold step.
// * Chambolle & Pock 2011, "A First-Order Primal-Dual Algorithm ..." (JMIV) —
// primal-dual TV framework.
// * Rudin, Osher & Fatemi 1992 — Total Variation regularization (ROF).
// * Vogel & Oman 1996; Chan, Golub & Mulet 1999 — the lagged-diffusivity /
// semi-implicit solver actually used here (see SCHEME note).
// * Perona & Malik 1990; Weickert 1998; Nagel & Enkelmann 1986 — the
// edge-aware (image-gradient) weighting of the smoothness term.
// * Horn & Schunck 1981 — the L2 baseline this L1 variant deliberately replaces.
//
// SCHEME (why not textbook Chambolle-Pock primal-dual):
// The canonical TV-L1 solver keeps a persistent dual field p (2 components per
// flow channel = 8 floats/px) and alternates a dual-ascent + primal-descent with
// step sizes (σ,τ) that must satisfy στL²≤1 or it DIVERGES. That is exactly the
// kind of tuning-sensitive instability we do not want on Turnip, and it breaks
// the one-shader / ping-pong-two-flow-images contract (it needs extra dual
// images). Instead we solve the SAME energy with a lagged-diffusivity
// semi-implicit (Jacobi) step: the TV term is linearized as a divergence of the
// edge-weighted, TV-normalized gradient (dual re-derived in closed form each
// iteration as p = g·∇u/|∇u|_ε, which is exactly the optimal TV dual and has
// |p|≤1 by construction), then a Jacobi update that is UNCONDITIONALLY STABLE for
// any dt>0 (the primal is a convex combination of the centre and its neighbours,
// so it can never blow up or NaN), followed by the exact L1 data-term
// soft-threshold. State carried between iterations is only u itself → ping-pong
// two rgba16f flow images, N iterations. Identity behaviour: with 0 iterations
// the field is untouched (byte-identical to pre-C2).
//
// COMPOSES WITH:
// * quality-tier2's 5-tap median: that median stays in of3_expand(_m4) and runs
// AFTER C2, as a final speckle scrub on the already-coherent field (harmless —
// L1 is already outlier-robust). C2 does not touch expand.
// * C1 global-motion add-back: C2 cleans the residual IN PLACE at
// flowLvl_[kFlowFinest]; of3_expand then medians + confidence-gates + adds the
// global affine back exactly as before, now on the cleaned residual. The
// end-to-end composed flow stays correct; identity affine ⇒ pre-C1 path.
// ─────────────────────────────────────────────────────────────────────────────
layout(local_size_x = 16, local_size_y = 16) in;
layout(binding = 0) uniform U {
// x = dt : semi-implicit smoothing step (larger ⇒ more smoothing)
// y = lambda : L1 data-fidelity weight (larger ⇒ trust the SAD flow more)
// z = edgeAlpha : luma-gradient edge sensitivity for g (larger ⇒ sharper stop)
// w = epsTV : Charbonnier epsilon for the TV diffusivity (px; larger ⇒ softer)
vec4 params;
};
layout(binding = 32) uniform sampler2D uFlowIn; // current iterate u (.xy fwd, .zw bwd), full-res px
layout(binding = 33) uniform sampler2D uFlowObs; // fixed observation f0 (the raw SAD flow)
layout(binding = 34) uniform sampler2D uLuma; // prev luma at this flow level (R32F, Rec.709 [0,1])
layout(binding = 48, rgba16f) uniform writeonly image2D uFlowOut;
vec4 fetchU(ivec2 p, ivec2 dim) {
return texelFetch(uFlowIn, clamp(p, ivec2(0), dim - 1), 0);
}
float fetchL(ivec2 p, ivec2 dim) {
return texelFetch(uLuma, clamp(p, ivec2(0), dim - 1), 0).r;
}
void main() {
ivec2 gid = ivec2(gl_GlobalInvocationID.xy);
ivec2 dim = textureSize(uFlowIn, 0);
if (gid.x >= dim.x || gid.y >= dim.y) return;
float dt = params.x;
float lambda = params.y;
float edgeAlpha = params.z;
float epsTV = params.w;
// 4-connected neighbourhood of the current iterate (all 4 flow channels).
vec4 uC = texelFetch(uFlowIn, gid, 0);
vec4 uL = fetchU(gid + ivec2(-1, 0), dim);
vec4 uR = fetchU(gid + ivec2( 1, 0), dim);
vec4 uU = fetchU(gid + ivec2( 0, -1), dim);
vec4 uD = fetchU(gid + ivec2( 0, 1), dim);
// ── Edge-aware weight g from the luma gradient (Perona-Malik / Weickert) ────
// Luma level res == flow level res (both at kFlowFinest), so index 1:1.
float lL = fetchL(gid + ivec2(-1, 0), dim);
float lR = fetchL(gid + ivec2( 1, 0), dim);
float lU = fetchL(gid + ivec2( 0,-1), dim);
float lD = fetchL(gid + ivec2( 0, 1), dim);
float gmag = 0.5 * length(vec2(lR - lL, lD - lU)); // |∇I|, central diff
float g = clamp(exp(-edgeAlpha * gmag), 0.05, 1.0); // small across silhouettes
// ── TV diffusivity per face: w = g / sqrt(|Δu|² + ε²) ───────────────────────
// |Δu| is the full 4-vector flow difference (vectorial-TV coupling: fwd & bwd
// share the same motion discontinuities). Large across a flow edge ⇒ small w ⇒
// the edge is preserved; ~0 in flat regions ⇒ large w ⇒ strong smoothing.
vec4 dL = uL - uC, dR = uR - uC, dU = uU - uC, dD = uD - uC;
float e2 = epsTV * epsTV;
float qL = inversesqrt(dot(dL, dL) + e2);
float qR = inversesqrt(dot(dR, dR) + e2);
float qU = inversesqrt(dot(dU, dU) + e2);
float qD = inversesqrt(dot(dD, dD) + e2);
float sumW = g * (qL + qR + qU + qD);
vec4 sumWU = g * (qL * uL + qR * uR + qU * uU + qD * uD);
// Semi-implicit (Jacobi) TV step: a convex combination of uC and the
// edge/TV-weighted neighbour mean ⇒ unconditionally stable, always finite.
vec4 uDiff = (uC + dt * sumWU) / (1.0 + dt * sumW);
// ── L1 data term (exact TV-L1 soft-threshold toward the fixed observation) ──
// r>θ ⇒ u=uDiff−θ , r<−θ ⇒ u=uDiff+θ , |r|≤θ ⇒ u=f0 , with θ = dt·λ.
// The branchless form u = uDiff − clamp(r,−θ,θ) is identical per component.
vec4 f0 = texelFetch(uFlowObs, gid, 0);
float theta = dt * lambda;
vec4 r = uDiff - f0;
vec4 uNew = uDiff - clamp(r, vec4(-theta), vec4(theta));
imageStore(uFlowOut, gid, uNew);
}
+10
View File
@@ -474,3 +474,13 @@ Short strokes never released it, and taps kept landing at the relative pointer i
counts its touch-down warps, and a frame that contains one is left out of the hold decision. Touch drags, mouse motion
and mouse warps still count, so a drag on a game that follows the pointer releases the hold and a recentring game is
still held. `tools/tests/test_gamescope_pointer_hold_touch_down.py` compiles the rule with the 0133 rule.
## 0146 rendervulkan: composite only into output images the display has finished scanning out
The host compositor now releases a zero-copy display buffer as soon as the display latches the next one, and attaches
the display's release fence to the buffer's dma-buf instead of waiting for it on the CPU. That wait had held every
release back by about one refresh, so a chain of three buffers ran at two thirds of the refresh rate. KGSL Turnip does
not wait on fences attached to a dma-buf, so the composite now checks each output image's dma-buf with `poll(POLLOUT)`.
It picks the next image that is neither held by the host nor still being scanned out. Only when every free image is
still on the display does it wait for one, up to 100 ms. On kernels that cannot attach the fence, the host keeps
waiting itself and nothing changes. `tools/gamescope/tests/nested-swapchain.cpp` covers the choice and the busy check.
@@ -0,0 +1,106 @@
diff --git a/src/output_image_pick.hpp b/src/output_image_pick.hpp
new file mode 100644
index 0000000..193d9de
--- /dev/null
+++ b/src/output_image_pick.hpp
@@ -0,0 +1,50 @@
+#pragma once
+#include <cstdint>
+#include <poll.h>
+
+namespace gamescope
+{
+struct OutputImagePick
+{
+ uint32_t image;
+ bool scanoutPending;
+};
+
+template <typename Held, typename Busy>
+inline OutputImagePick PickOutputImage( uint32_t count, uint32_t first, uint32_t last, uint32_t deferred,
+ Held &&held, Busy &&busy )
+{
+ for ( int pass = 0; pass < 2; pass++ )
+ {
+ for ( uint32_t i = 0; i < count; i++ )
+ {
+ const uint32_t image = ( first + i ) % count;
+ if ( count > 3 && ( image == last || image == deferred ) )
+ continue;
+ if ( held( image ) )
+ continue;
+ const bool pending = busy( image );
+ if ( pass == 0 && pending )
+ continue;
+ return { image, pending };
+ }
+ }
+ return { first, busy( first ) };
+}
+
+inline bool DmabufScanoutPending( int fd )
+{
+ if ( fd < 0 )
+ return false;
+ pollfd p = { .fd = fd, .events = POLLOUT, .revents = 0 };
+ return poll( &p, 1, 0 ) == 0;
+}
+
+inline void WaitDmabufScanout( int fd, int timeoutMs )
+{
+ if ( fd < 0 )
+ return;
+ pollfd p = { .fd = fd, .events = POLLOUT, .revents = 0 };
+ poll( &p, 1, timeoutMs );
+}
+}
diff --git a/src/rendervulkan.cpp b/src/rendervulkan.cpp
index 1d3a80c..3668a10 100644
--- a/src/rendervulkan.cpp
+++ b/src/rendervulkan.cpp
@@ -37,6 +37,7 @@
#include "steamcompmgr.hpp"
#include "log.hpp"
#include "Utils/Process.h"
+#include "output_image_pick.hpp"
#include "cs_composite_blit.h"
#include "cs_composite_blur.h"
@@ -4297,18 +4298,29 @@ static bool vulkan_output_image_held( uint32_t nImage )
return false;
}
+static bool vulkan_output_image_scanout_pending( uint32_t nImage )
+{
+ for ( const auto &pImage : { g_output.outputImages[ nImage ], g_output.outputImagesPartialOverlay[ nImage ] } )
+ {
+ if ( pImage != nullptr && pImage->GetBackendFb() != nullptr && gamescope::DmabufScanoutPending( pImage->dmabuf().fd[0] ) )
+ return true;
+ }
+ return false;
+}
+
static uint32_t vulkan_free_output_image( uint32_t nFirst )
{
- const uint32_t uCount = g_output.outputImages.size();
- for ( uint32_t i = 0; i < uCount; i++ )
+ const gamescope::OutputImagePick pick = gamescope::PickOutputImage( g_output.outputImages.size(), nFirst,
+ g_output.nLastOutImage, g_output.nDeferredOutImage, vulkan_output_image_held, vulkan_output_image_scanout_pending );
+ if ( pick.scanoutPending )
{
- const uint32_t nImage = ( nFirst + i ) % uCount;
- if ( uCount > 3 && ( nImage == g_output.nLastOutImage || nImage == g_output.nDeferredOutImage ) )
- continue;
- if ( !vulkan_output_image_held( nImage ) )
- return nImage;
+ for ( const auto &pImage : { g_output.outputImages[ pick.image ], g_output.outputImagesPartialOverlay[ pick.image ] } )
+ {
+ if ( pImage != nullptr && pImage->GetBackendFb() != nullptr )
+ gamescope::WaitDmabufScanout( pImage->dmabuf().fd[0], 100 );
+ }
}
- return nFirst;
+ return pick.image;
}
std::optional<uint64_t> vulkan_composite( struct FrameInfo_t *frameInfo, gamescope::Rc<CVulkanTexture> pPipewireTexture, bool partial, gamescope::Rc<CVulkanTexture> pOutputOverride, bool increment, std::unique_ptr<CVulkanCmdBuffer> pInCommandBuffer )
Loaded 100 of 131 files, more files were not shown because too many files have changed in this diff. Show more