Fix fakesdl headers when SDL directory included#26279
Open
sbc100 wants to merge 1 commit intoemscripten-core:mainfrom
Open
Fix fakesdl headers when SDL directory included#26279sbc100 wants to merge 1 commit intoemscripten-core:mainfrom
sbc100 wants to merge 1 commit intoemscripten-core:mainfrom
Conversation
571a646 to
68118fa
Compare
We introduced the `fakesdl` headers back in emscripten-core#18443 so that anyone trying to use SDL without using `-sUSE_SDL` (or similar) would see an error. However we only covered the `SDL_xx.h` include case not the `SDL/SDL_xx.h` use case. This means that some users were not seeing the errors they should, including a few of our test cases. Split out from emscripten-core#26275
kripken
reviewed
Feb 17, 2026
| // Specify the SDL version that is being linked against: | ||
| // | ||
| // - 0, the default, means no SDL headers or libraries will be used. | ||
| // - 1 is port of SDL 1.3 which is implemented in JS. |
Member
There was a problem hiding this comment.
Suggested change
| // - 1 is port of SDL 1.3 which is implemented in JS. | |
| // - 1 is a port of SDL 1.3 which is implemented in JS. |
| } | ||
| ''') | ||
| self.do_runf('main.c', '1234, 1234, 4321\n') | ||
| self.do_runf('main.c', '1234, 1234, 4321\n', cflags=['-sUSE_SDL']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We introduced the
fakesdlheaders back in #18443 so that anyone trying to use SDL without using-sUSE_SDL(or similar) would see an error.However we only covered the
SDL_xx.hinclude case not theSDL/SDL_xx.huse case.This means that some users were not seeing the errors they should, including a few of our test cases.
Split out from #26275