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] Make some config defines settable by build systems #4548

Closed
wants to merge 1 commit into from

Conversation

JeffM2501
Copy link
Contributor

The way config.h and it's 'SUPPORT_FEATURE' flags are setup right now makes it impossible for build systems to change these flags without fully redefining every feature in config.h. This is not easy for people to do, and is counter to raylib's simple design.

This PR takes 3 of those flags and reverses the sense of them, turning them from SUPPORT_ flags to DISABLE_ flags.

  • Screen Capture
  • GIF recording
  • High Resolution Timer

This means that by default raylib will enable the code that implements these features, unless the build system defines the specific DISABLE_ feature flag.

By reversing these defines, it makes it very easy for people to simply add the things they want to turn off to a makefile or project. Raylib has gone from 'add stuff to it' to 'remove stuff you don't need from it'.

I simply picked 3 flags that made the most sense to disable, if this concept is accepted we can apply it additional features.
The big ones here are screen capture and gif recording since they use a specific key that people may want to use for other features (this is my use case)

…o allow build systems to disable them without redefining all of config.h
@raysan5
Copy link
Owner

raysan5 commented Nov 28, 2024

@JeffM2501 I'm afraid this change breaks consistency. I prefer to look for a more consistent solution to this issue, probably following discussion here #4411

@raysan5 raysan5 closed this Nov 28, 2024
@JeffM2501
Copy link
Contributor Author

I was unaware of that issue, I will make a PR that does that. I have a need to be able to disable features.
The solution in that PR works for me, we just need to do something.

@JeffM2501 JeffM2501 deleted the config_disables branch November 29, 2024 03:40
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.

2 participants