HeroicGamesLauncher
HeroicGamesLauncher copied to clipboard
[UX] Filter settings that don't apply to current platform and game
This PR changes the behavior of the Game logger to remove settings from the output when the settings don't make sense for a given game and platform.
For example: it will filter out all the wine-related settings for native games, or hide the gamescope settings when the parent gamescope setting is disabled.
The idea behind this is that these settings that don't make any sense for a given situation are still displayed in the logs, adding noise and confusing the users and during support.
I think this is a good enough first iteration, I think there are probably more settings that can be removed specially on windows, but I don't have a machine with windows to verify (I was looking at the code of the different settings only).
Note: I know the code is kinda verbose, but it was intentional to make it super clear which elements are being removed an in which conditions. I could refactor this to set settings in an array and looping but I kinda felt this was better. I can change this if we don't agree.
Use the following Checklist if you have changed something on the Backend or Frontend:
- [ ] Tested the feature and it's working on a current and clean install.
- [ ] Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
- [ ] Created / Updated Tests (If necessary)
- [ ] Created / Updated documentation (If necessary)
looks good, but you should reduce the amount of repeated code in the filtering function
looks good, but you should reduce the amount of repeated code in the filtering function
I made a comment about the repetition of the code in the PR description, I intentionally left it repeated (and I can reduce this if we agree it's not good, but I feel it's more clear this way)
looks good, but you should reduce the amount of repeated code in the filtering function
I made a comment about the repetition of the code in the PR description, I intentionally left it repeated (and I can reduce this if we agree it's not good, but I feel it's more clear this way)
oh whoops I missed that