[UX] Show Flatpak's runtime version when missing mangohud/gamescope #4588
+33
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using Heroic as a Flatpak and mangohud or gamescope are not found, the message only told the user to install them and add them to the PATH, when the solution is to actually install the flatpak packages of those tools (because users might see they actually have the tools installed and in the PATH, but they might not know they need the flatpak version)
Since they also have to install the correct version matching the Flatpak runtime, I included that in the message to make it more obvious.
This should solve many issues of users not knowing how to solve the missing mangohud/gamescope problems.
Also, since
isFlatpakis a static value that can never change, we don't need an api endpoint, we can just inject the value into the window object at boot using the preload script (we are already sending some static data there), this removes a little bit of complexity in a few places, which I included in this PR.Use the following Checklist if you have changed something on the Backend or Frontend: