mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-12 17:19:28 +01:00
An app can hold 512 persisted URI grants (128 before Android 11). Over that, the system drops the oldest, and ours is usually the memory stick folder. We take a grant for every file picked one at a time - games loaded through the file picker, shortcut targets, sound effects - and never released any. At startup, log what we hold, and past half the limit release the oldest single-file grants that neither the recent list nor a setting points at. Folder grants are always kept. Home screen shortcuts need their file's grant and can't be enumerated, which is why this only acts when it has to and goes oldest first: the files it takes are ones the system would have taken too, after the folder. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>