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

[rcore] Manage access to CORE.Window through a macro to make multi-window branch easier to update #3976

Closed
wants to merge 11 commits into from

Conversation

JeffM2501
Copy link
Sponsor Contributor

This PR makes a subtle but pervasive change to the platform system. It routes access to the Core.Window structure through a new macro named CORE_WINDOW.
The reason for this is to help out the multi-window branch in raylib-extras.
To make this branch work, it needs a window structure per window. Right now I have to manually replace all calls to CORE.Window with CORE.Window[GetActiveWindow()], and everytime raylib updates things break. With this change, the branch can simply replace the CORE_WINDOW macro in one place and not have to hit all the places in the code and all platforms.

This change has ZERO benefit to regular raylib, and thus I understand if it's too pervasive, It would just make multi-window easier to keep in sync with main raylib.

src/platforms/rcore_android.c Outdated Show resolved Hide resolved
src/platforms/rcore_desktop.c Outdated Show resolved Hide resolved
src/platforms/rcore_desktop_rgfw.c Outdated Show resolved Hide resolved
src/platforms/rcore_drm.c Outdated Show resolved Hide resolved
src/platforms/rcore_desktop_sdl.c Outdated Show resolved Hide resolved
src/platforms/rcore_template.c Outdated Show resolved Hide resolved
src/platforms/rcore_web.c Outdated Show resolved Hide resolved
@raysan5 raysan5 changed the title [CORE] Manage access to CORE.Window through a macro to make multi-window branch easier to update [rcore] Manage access to CORE.Window through a macro to make multi-window branch easier to update May 12, 2024
projects/VS2022/raylib/raylib.vcxproj Outdated Show resolved Hide resolved
projects/VS2022/raylib/raylib.vcxproj.filters Outdated Show resolved Hide resolved
@raysan5 raysan5 self-assigned this May 29, 2024
@JeffM2501
Copy link
Sponsor Contributor Author

I'm closing this PR. I have a different ID that may be able to be implemented entirely in the windowing branch.

@JeffM2501 JeffM2501 closed this Jun 10, 2024
@JeffM2501 JeffM2501 deleted the CORE_WINDOW branch June 10, 2024 03:31
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.

None yet

3 participants