-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Change SCREEN_REFRESH_RATE_FALLBACK to -1.0 #57938
Change SCREEN_REFRESH_RATE_FALLBACK to -1.0 #57938
Conversation
48925e5
to
84a18b4
Compare
doc/classes/DisplayServer.xml
Outdated
To fallback to a default refresh rate if the method fails, try: | ||
[codeblock] | ||
var refresh_rate = DisplayServer.screen_get_refresh_rate() | ||
if refresh_rate < 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The XML parser chokes on this, should be <
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, thanks
84a18b4
to
3a371da
Compare
doc/classes/DisplayServer.xml
Outdated
[codeblock] | ||
var refresh_rate = DisplayServer.screen_get_refresh_rate() | ||
if refresh_rate < 0: | ||
refresh_rate = 60.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use 4 spaces for indentation in the codeblock (while keeping the tab based indentation of the <description>
block).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
3a371da
to
7a9972a
Compare
Thanks! |
If DisplayServer.screen_get_refresh_rate fails, return -1.0 instead of 60.0 to allow for better error handling.
Relates to godotengine/godot-proposals#1284 (comment)