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

Allow multiple platform API files #98700

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

mhilbrunner
Copy link
Member

@mhilbrunner mhilbrunner commented Oct 31, 2024

Currently, platforms can implement a public API. This is hardcoded to be built from {platform}/api.h and {platform}/api.cpp.

While this works and is useful, some platforms provide a fairly large API. Trying to keep all that in those two files becomes painful quickly.

This simple change allows one to split up the API implementation into multiple files. It changes nothing for existing implementations, but optionally allows one to have e.g. api/achievements.cpp, api/networking.cpp and api/specialplatformstorage.cpp be also included in the build, without having to modify the Godot source or build system when adding a custom platform implementation.

@mhilbrunner mhilbrunner requested a review from a team as a code owner October 31, 2024 15:12
@AThousandShips AThousandShips added this to the 4.4 milestone Nov 1, 2024
@Repiteo Repiteo merged commit 5bc5f06 into godotengine:master Nov 10, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 10, 2024

Thanks!

@mhilbrunner mhilbrunner deleted the glob-platform-api branch November 11, 2024 09:53
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.

5 participants