Game Menu: Replace vkBasalt checkbox with generic Vulkan Post Processing dropdown #910
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.
Replaces the "Use vkBasalt" checkbox on the Game Menu with a dropdown which can contain various Vulkan post-processing options. The primarily motivation for this is have a nicer UI for future Vulkan post-processing tools in future (namely vkShade, without having to extend the game menu with a bunch of checkboxes.
As a cool trick, we use
eval
to export the variable, since right now we only use vkBasalt, and in future we may use vkShade. The export names are justENABLE_<toolname>
, and since<toolname>
is what we store in the game config, we can just eval an export string likeeval "export ENABLE_VKBASALT=1"
.In future, if there are other Vulkan post-processors that require more, we can do some conditional checks to see which post processor is selected, and leave this as our fallback.
There is intentionally no
migrateCfg
option, as the checkbox for toggling vkBasalt directly controlledENABLE_VKBASALT
. It wasn't stored in the game config, and I didn't want to run the risk of modifying users' custom environment variables. Therefore, users will have to re-enable vkBasalt using this dropdown, which isnone
by default.vkShade is not included in the dropdown yet because it is not available without building from source yet. Once a package is at least available on the AUR or Chaotic-AUR, I will include it. The refactor that this PR introduces will make it trivial to introduce though; just add
vkShade
to the Vulkan Post Processor dropdown.TODO: