-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Don't default to SDLv1 for un-versioned SDL includes #18443
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
Merged
Merged
Conversation
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
831ba12 to
219b097
Compare
kripken
approved these changes
Jan 3, 2023
Member
kripken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % typo
With SDL you can choose to either include the header files via the explictly version prefix (e.g. `<SDL/SDL_audio.h>` or `<SDL2/SDL_audio.h>`. Or some folks configure the include path such that the unversioned includes can be used (`#include <SDL_audio.h>`). Emscripten allows the unversioned form by putting the `SDL` or `SDL2` directory on the include path based on the USE_SDL settings, but the fact that were defaulting to enabling version 1 was causing some issues (See #18072 and #184402 for more details). After this change we default to not adding either of these include paths. This means that folks who want to use un-versioned includes will now need to opt into one version of the other via `-sUSE_SDL`. Note that folks using the explict `<SDL/SDL_audio.h>` includes are not effected by this (that will always result in an SDL v1 header being included). In order to make it more obvious that use of `<SDL_audio.h>` now requires an opt in, I created dummy headers that should give effected users and clear error message. We've already been doing this in STRICT module for a while now. Fixes: #18072, #18440
sbc100
added a commit
that referenced
this pull request
Jul 31, 2023
This changes the default behaviour to match that of STRICT mode and MINIMAL_RUNTIME node. We made a similar change for USE_SDL back in #18443. As part of this change I also updated the code that maps `-l` flags to JS libraries. In some cases we also want these to set the corresponding `-sUSE_XXX` setting.
sbc100
added a commit
that referenced
this pull request
Aug 1, 2023
This changes the default behaviour to match that of STRICT mode and MINIMAL_RUNTIME node. We made a similar change for USE_SDL back in #18443. As part of this change I also updated the code that maps `-l` flags to JS libraries. In some cases we also want these to set the corresponding `-sUSE_XXX` setting.
sbc100
added a commit
that referenced
this pull request
Aug 25, 2023
This changes the default behaviour to match that of STRICT mode and MINIMAL_RUNTIME node. We made a similar change for USE_SDL back in #18443. As part of this change I also updated the code that maps `-l` flags to JS libraries. In some cases we also want these to set the corresponding `-sUSE_XXX` setting.
sbc100
added a commit
that referenced
this pull request
Aug 25, 2023
This changes the default behaviour to match that of STRICT mode and MINIMAL_RUNTIME node. We made a similar change for USE_SDL back in #18443. As part of this change I also updated the code that maps `-l` flags to JS libraries. In some cases we also want these to set the corresponding `-sUSE_XXX` setting.
sbc100
added a commit
that referenced
this pull request
Aug 25, 2023
This changes the default behaviour to match that of STRICT mode and MINIMAL_RUNTIME node. We made a similar change for USE_SDL back in #18443. As part of this change I also updated the code that maps `-l` flags to JS libraries. In some cases we also want these to set the corresponding `-sUSE_XXX` setting.
sbc100
added a commit
that referenced
this pull request
Aug 25, 2023
This changes the default behaviour to match that of STRICT mode and MINIMAL_RUNTIME node. We made a similar change for USE_SDL back in #18443. As part of this change I also updated the code that maps `-l` flags to JS libraries. In some cases we also want these to set the corresponding `-sUSE_XXX` setting.
sbc100
added a commit
that referenced
this pull request
Aug 29, 2023
This changes the default behaviour to match that of STRICT mode and MINIMAL_RUNTIME node. We made a similar change for USE_SDL back in #18443. As part of this change I also updated the code that maps `-l` flags to JS libraries. In some cases we also want these to set the corresponding `-sUSE_XXX` setting.
sbc100
added a commit
that referenced
this pull request
Aug 29, 2023
This changes the default behaviour to match that of STRICT mode and MINIMAL_RUNTIME node. We made a similar change for USE_SDL back in #18443. As part of this change I also updated the code that maps `-l` flags to JS libraries. In some cases we also want these to set the corresponding `-sUSE_XXX` setting.
sbc100
added a commit
that referenced
this pull request
Aug 29, 2023
This changes the default behaviour to match that of STRICT mode and MINIMAL_RUNTIME node. We made a similar change for USE_SDL back in #18443. As part of this change I also updated the code that maps `-l` flags to JS libraries. In some cases we also want these to set the corresponding `-sUSE_XXX` setting.
sbc100
added a commit
that referenced
this pull request
Aug 29, 2023
This changes the default behaviour to match that of STRICT mode and MINIMAL_RUNTIME node. We made a similar change for USE_SDL back in #18443. As part of this change I also updated the code that maps `-l` flags to JS libraries. In some cases we also want these to set the corresponding `-sUSE_XXX` setting.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Aug 11, 2025
This removes the python dependency and the need to .bat and shell launchers. These script have always be shell scripts upstream and there should be no expectation that they can be run on windows. See libsdl-org/SDL#3516 In addition fix `sdl-config.py` so that it explicitly includes `-sUSE_SDL`. This has been required since emscripten-core#18443.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Aug 11, 2025
This removes the python dependency and the need to .bat and shell launchers. These script have always be shell scripts upstream and there should be no expectation that they can be run on windows. See libsdl-org/SDL#3516 In addition fix `sdl-config.py` so that it explicitly includes `-sUSE_SDL`. This has been required since emscripten-core#18443.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Aug 11, 2025
This removes the python dependency and the need to .bat and shell launchers. These script have always be shell scripts upstream and there should be no expectation that they can be run on windows. See libsdl-org/SDL#3516 In addition fix `sdl-config.py` so that it explicitly includes `-sUSE_SDL`. This has been required since emscripten-core#18443.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Aug 11, 2025
This removes the python dependency and the need to .bat and shell launchers. These script have always be shell scripts upstream and there should be no expectation that they can be run on windows. See libsdl-org/SDL#3516 In addition fix `sdl-config.py` so that it explicitly includes `-sUSE_SDL`. This has been required since emscripten-core#18443.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Aug 11, 2025
This removes the python dependency and the need to .bat and shell launchers. These script have always be shell scripts upstream and there should be no expectation that they can be run on windows. See libsdl-org/SDL#3516 In addition fix `sdl-config.py` so that it explicitly includes `-sUSE_SDL`. This has been required since emscripten-core#18443.
sbc100
added a commit
that referenced
this pull request
Aug 11, 2025
This removes the python dependency and the need to .bat and shell launchers. These script have always be shell scripts upstream and there should be no expectation that they can be run on windows. See libsdl-org/SDL#3516 In addition fix `sdl-config.py` so that it explicitly includes `-sUSE_SDL`. This has been required since #18443.
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.
With SDL you can choose to either include the header files via the
explictly version prefix (e.g.
<SDL/SDL_audio.h>or<SDL2/SDL_audio.h>. Or some folks configure the include path suchthat the unversioned includes can be used (
#include <SDL_audio.h>).Emscripten allows the unversioned form by putting the
SDLorSDL2directory on the include path based on the USE_SDL settings, but the
fact that were defaulting to enabling version 1 was causing some issues
(See #18072 and #184402 for more details).
After this change we default to not adding either of these include
paths. This means that folks who want to use un-versioned includes will
now need to opt into one version of the other via
-sUSE_SDL.Note that folks using the explict
<SDL/SDL_audio.h>includes are noteffected by this (that will always result in an SDL v1 header being
included).
In order to make it more obvious that use of
<SDL_audio.h>nowrequires an opt in, I created dummy headers that should give effected
users and clear error message.
We've already been doing this in STRICT module for a while now.
Fixes: #18072, #18440