Commit 73c235d
committed
feat: SDK cloud save bridge with Ludusavi + launch-time prompt
Adds per-container support for "Pattern B" SDK-cloud games (Dead
Cells-style) that read saves from a subdirectory of their install
directory rather than from <userdata>/<appid>/remote/. Replaces the
hardcoded one-entry registry with the Ludusavi save-path manifest
(~1944 Steam games matching Pattern B).
Container setting:
- New sdkCloudSaveSubdir field on Container/ContainerData, persisted
through JSON and Compose Saver. Empty = bridge disabled.
- "Cloud Save Bridge" section in GeneralTab (visible when Launch
Steam Client is on) with text field + Use Recommended / Detect /
Clear buttons, confirmation dialog on first activation, and
validation rejecting path separators, .., and drive letters.
Ludusavi integration (utils/LudusaviRegistry.kt):
- Fetches manifest.yaml from mtkennerly/ludusavi-manifest via the
existing OkHttp client. Streaming line-parser avoids the OOM that
SnakeYAML's eager map load caused on the 5 MB file.
- Filters to Steam-IDed entries with <base>/<subdir> save paths
tagged "save" and applicable to Windows (or no OS filter).
- Writes ~190 KB filtered JSON to filesDir/ludusavi_pattern_b.json,
7-day TTL, falls back to stale disk cache on fetch failure.
- Primed in background at PluviaApp.onCreate so Use Recommended and
the launch-time prompt are instant after the first session.
Launch-time prompt:
- preLaunchApp runs a Pattern B check (Ludusavi match AND no
saveFilePatterns in PICS UFS) before cloud sync. Match fires an
SDK_CLOUD_BRIDGE_SUGGESTION dialog with Enable / Skip / Don't ask
again. Catches users who install with real-Steam default and never
touch settings.
- Don't-ask-again persists per-container as
extraData.sdkCloudBridgePromptDismissed.
Runtime mirror (utils/SteamUtils.kt):
- sdkCloudGameSaveDir now reads the user-configured subdir only; no
implicit fallback, to avoid REPLACE_EXISTING copies into a guessed
dir that might be wrong.
- detectSdkCloudSaveSubdir resolves paths via the container's own
rootDir rather than the global xuser symlink so it works even when
a different container is activated.
Removed:
- Bundled assets/sdk_cloud_save_bridge.json (single hardcoded entry);
Ludusavi covers it plus ~1943 others.
Cosmetic: replaced "Pluvia" with "GameNative" in comments/strings
written on this branch. PluviaApp/PluviaTheme/PluviaPreferences class
names and storage keys left alone.1 parent cc29e52 commit 73c235d
15 files changed
Lines changed: 738 additions & 15 deletions
File tree
- app/src/main
- java
- app/gamenative
- service
- ui
- component/dialog
- enums
- screen/library/appscreen
- utils
- com/winlator/container
- res/values
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
90 | 100 | | |
91 | 101 | | |
92 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2217 | 2217 | | |
2218 | 2218 | | |
2219 | 2219 | | |
2220 | | - | |
| 2220 | + | |
2221 | 2221 | | |
2222 | 2222 | | |
2223 | | - | |
| 2223 | + | |
2224 | 2224 | | |
2225 | 2225 | | |
2226 | 2226 | | |
2227 | | - | |
| 2227 | + | |
2228 | 2228 | | |
2229 | 2229 | | |
2230 | 2230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
789 | 790 | | |
790 | 791 | | |
791 | 792 | | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
792 | 848 | | |
793 | 849 | | |
794 | 850 | | |
| |||
1519 | 1575 | | |
1520 | 1576 | | |
1521 | 1577 | | |
| 1578 | + | |
1522 | 1579 | | |
1523 | 1580 | | |
1524 | 1581 | | |
| |||
1550 | 1607 | | |
1551 | 1608 | | |
1552 | 1609 | | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
1553 | 1645 | | |
1554 | 1646 | | |
1555 | 1647 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
1037 | 1038 | | |
1038 | 1039 | | |
1039 | 1040 | | |
| 1041 | + | |
1040 | 1042 | | |
1041 | 1043 | | |
1042 | 1044 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
138 | 141 | | |
0 commit comments