Problem
We're using GAMELORD_HW_SAVE_STATES=1 as an env var to toggle experimental features, which is clunky:
- Utility processes don't inherit shell env vars (had to plumb it through init commands)
- No UI for toggling — requires restarting the app
- No persistence — have to set it every time
- Doesn't scale as we add more experimental features
Proposal
Add a proper feature flag system. Options to evaluate:
- Vercel Flags SDK — designed for this, integrates with the Vercel ecosystem
- Simple local flags — JSON file in userData with a Settings > Experimental panel to toggle flags
- LaunchDarkly / Statsig — overkill for a desktop app but worth noting
Current flags that would benefit
Requirements
- Flags accessible from main process, worker processes, and renderer
- Persistent across sessions
- Toggleable from the UI (Settings > Experimental or similar)
- No restart required (ideally)
Problem
We're using
GAMELORD_HW_SAVE_STATES=1as an env var to toggle experimental features, which is clunky:Proposal
Add a proper feature flag system. Options to evaluate:
Current flags that would benefit
hwSaveStates— Enable save states for HW-render cores (Dolphin). Currently crashes due to upstream bug, being fixed in parallel (fix: Dolphin save states crash the emulation worker (segfault in retro_serialize) #342)Requirements