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

Do not override window setting defaults #12022

Closed

Conversation

endragor
Copy link
Contributor

When exporting project settings, Godot only export values not equal to
their defaults. Before this fix exporting project from command line
omitted display/window/size settings, because their default values
were set from existing values in project settings, so Godot considered
them unchanged.

This commit adds GLOBAL_DEF_MISSING macro which only overrides the
setting's default value if the setting did not already exist.

When exporting project settings, Godot only export values not equal to
their defaults. Before this fix exporting project from command line
omitted display/window/size settings, because their default values
were set from existing values in project settings, so Godot considered
them unchanged.

This commit adds GLOBAL_DEF_MISSING macro which only overrides the
setting's default value if the setting did not already exist.
@reduz
Copy link
Member

reduz commented Oct 11, 2017 via email

@endragor
Copy link
Contributor Author

endragor commented Oct 11, 2017 via email

@reduz
Copy link
Member

reduz commented Oct 11, 2017 via email

@27thLiz 27thLiz added this to the 3.0 milestone Oct 11, 2017
@endragor
Copy link
Contributor Author

Sorry, but I didn't get what the proper fix for this would be. Could you elaborate? Instead of adding a version of GLOBAL_DEF that does NOT override the default value if it exists, we could simply add has checks before invoking GLOBAL_DEF in Main::setup.

@reduz
Copy link
Member

reduz commented Nov 9, 2017

I changed the code to be more intuitive. It should now respect the resolution in the project settings no matter what. Please let me know if this works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants