Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GameScope: Add default button #844

Merged
merged 2 commits into from
Jun 25, 2023
Merged

GameScope: Add default button #844

merged 2 commits into from
Jun 25, 2023

Conversation

sonic2kk
Copy link
Owner

A somewhat prerequisite for #838, because it will make the transition easier for users.

Adds a Default button to the GameScope button bar, so users can reset all options. This will be useful for #838 because it will introduce a breaking change for all GameScope GUI elements, since the order of elements will change entirely with several being merged into one.

This also fixes a bug that should never occur but that may occur in certain circumstances. When a dropdown value is blank, that option would be written out to the options because we only check if the value is not the default and not if it is not defined at all. So if GSFOOR was "", that is != to the default, so we wrote out --force-orentation with an empty value. This should never really occur but it happened during testing, so I fixed it when a -n check for GameScope dropdown variables.

@sonic2kk
Copy link
Owner Author

Shellcheck is good on this, this is probably good to merge.

@sonic2kk
Copy link
Owner Author

This option does not impact the gamescope checkbox itself, as this is stored in a different variable. Imo it makes more sense to keep this as whatever it was before the defaulting.

@sonic2kk sonic2kk merged commit 2d5ed12 into master Jun 25, 2023
@sonic2kk sonic2kk deleted the gamescope-default-button branch July 1, 2023 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant