UnleashedRecomp icon indicating copy to clipboard operation
UnleashedRecomp copied to clipboard

Added Flatpak runtime detection

Open Jujstme opened this issue 9 months ago • 8 comments

This PR removes flatpak-specific preprocessor macros, leaving the game to figure out at runtime whether it's running under a flatpak environment or not.

To be more specific, this relies on checking the FLATPAK_ID environment variable, which is always set for sandboxed environments as described in the official documentation

For Unleashed Recompiled, FLATPAK_ID is set to io.github.hedge_dev.unleashedrecomp. This can be checked by entering the sandboxed environment and checking directly:

$ flatpak run --command=bash io.github.hedge_dev.unleashedrecomp
$ env | grep FLATPAK_ID

For Windows builds, the present PR bears no effect.

Jujstme avatar Mar 10 '25 18:03 Jujstme