Implement a storage location picker for Android that allows users to
choose where Citron stores game data, saves, and other files instead
of being locked to the default app-specific directory.
Features:
- Storage location selection during first-time setup
- Settings option to change storage location after initial setup
- Support for internal storage, external SD card, and custom locations
- Automatic data migration when changing storage locations
- Progress dialog with cancellation support during migration
- Proper app restart handling to apply new storage path
- Detailed logging for debugging storage initialization
The picker offers three main options:
1. Internal Storage (Default) - App-specific directory, removed on uninstall
2. External SD Card - Persistent storage with more space (if available)
3. Custom Location - User-selected folder via Storage Access Framework
When switching locations, all existing data (saves, keys, config, shaders)
is automatically copied to the new location, ensuring a seamless transition.
This addresses user requests to store data in more accessible locations
like SD cards or Downloads folders, especially useful for devices with
limited internal storage or for easier data backup.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Fixed NullPointerException caused by missing EXTENDED_DYNAMIC_STATE and
USE_CONDITIONAL_RENDERING entries in SettingsItem.settingsItems HashMap.
These settings were referenced in the Zep Zone menu but not registered,
causing the app to crash when trying to display them.
Signed-off-by: Zephyron <zephyron@citron-emu.org>
Changes:
- Add missing encryption type cases to all switch statements
- Only call CreatePatchMetaStorage() when both tables are present
- Update assertions to allow partial table combinations
Fixes loading for Hades II, Pokémon Legends: Z-A, and other games
with newer NCA structures.
Reported-by: Dr.Stug@citron-emu.org
Signed-off-by: Zephyron <zephyron@citron-emu.org>