Repository navigation
feat: add FeatureFlags class to enable/disable features at start and runtime - #563
Open
ShadowApex wants to merge 1 commit into
Open
ShadowApex wants to merge 1 commit into
ShadowApex wants to merge 1 commit into
Conversation
ShadowApex
force-pushed
the
shadowapex/feature-flags
branch
from
October 6, 2026 02:18
a963ab0 to
e3e2c39
Compare
pastaq
reviewed
Oct 7, 2026
pastaq
left a comment
Collaborator
There was a problem hiding this comment.
There are quite e few new fields in https://github.com/ShadowBlip/OpenGamepadUI/blob/e3e2c3931898ef68dd6670df193fb362e96fd592/docs/class-reference/FeatureFlags.md with the note: !!! note There is currently no description for this property. Please help us by contributing one!
| ## Command-line argument prefix for a single feature, e.g. --feature-no-updater. | ||
| const ARG_PREFIX := "--feature-" | ||
|
|
||
| const TRUTHY := ["1", "true", "yes", "on"] |
Collaborator
There was a problem hiding this comment.
enable/enabled|disable/disabled?
| if not feature or feature.id == "": | ||
| logger.warn("Cannot register a feature without an id") | ||
| return Error.ERR_INVALID_PARAMETER | ||
| feature.id = Feature.normalize(feature.id) |
Collaborator
There was a problem hiding this comment.
Should we check if the feature is valid somehow? If I send a non existent feature like -reboot-with-a-cupcake-in-your-pocket shouldn't that return Error.ERR_INVALID_PARAMETER? It seems it will pass and just return false with a soft ignore?
|
|
||
|
|
||
| # Shows or hides the update section for the updater feature | ||
| func _update_update_section(enabled: bool) -> void: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change adds the new
FeatureFlagsclass andFeatureclass to allow feature gating different behavior in OpenGamepadUI. Features can be turned on or off either through a command line argument, environment variable, or programmatically at runtime in a plugin or platform provider.This change can also be used in #531 to more gracefully handle toggling features off when running things like SteamOS Manager with the OGUI overlay over Steam.