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

[macOS] Fix running with DisplayServerHeadless. #104660

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Mar 26, 2025

Fixes regression from #104397

Since macOS now using native run loop, this code can be executed even if DisplayServerHeadless is used and static_cast won't work.

@bruvzg bruvzg added this to the 4.5 milestone Mar 26, 2025
@bruvzg bruvzg requested a review from a team as a code owner March 26, 2025 18:32
Copy link
Contributor

@Bromeon Bromeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the quick fix!

I can confirm this solves the macOS CI issue on my side 👍

@bruvzg
Copy link
Member Author

bruvzg commented Mar 27, 2025

Replaced raw dynamic_cast with Object::cast_to, should work the same.

@@ -64,7 +64,7 @@
#undef CursorShape

class DisplayServerMacOS : public DisplayServer {
// No need to register with GDCLASS, it's platform-specific and nothing is added.
GDCLASS(DisplayServerMacOS, DisplayServer); // Note: required for Object::cast_to.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: required for Object::cast_to.

This is currently false, but will be required after #103708

@akien-mga akien-mga merged commit af2fe97 into godotengine:master Mar 28, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

3 participants