-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix fakesdl headers when SDL directory included #26279
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -322,13 +322,6 @@ def reftest(self, filename, reference, reference_slack=0, *args, **kwargs): | |
| print(f'overwriting expected image: {reference}') | ||
| self.run_process('pngcrush -rem gAMA -rem cHRM -rem iCCP -rem sRGB actual.png'.split() + [reference]) | ||
|
|
||
| def test_sdl1_in_emscripten_nonstrict_mode(self): | ||
| if 'EMCC_STRICT' in os.environ and int(os.environ['EMCC_STRICT']): | ||
| self.skipTest('This test requires being run in non-strict mode (EMCC_STRICT env. variable unset)') | ||
| # TODO: This test is verifying behavior that will be deprecated at some point in the future, remove this test once | ||
| # system JS libraries are no longer automatically linked to anymore. | ||
| self.reftest('hello_world_sdl.c', 'htmltest.png') | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this test removed?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the exact behavior that I'm removing. i.e. that ability to use SDL headers without I'm fixing the TODO here really, and this test should really have been removed in #18443.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm.. now that I go back and read #18443 it seems like it was deliberately only targeting the unversioned includes.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either way, this lgtm. To use SDL, the flag should be needed, like all other ports. |
||
|
|
||
| def test_sdl1(self): | ||
| self.reftest('hello_world_sdl.c', 'htmltest.png', cflags=['-lSDL', '-lGL']) | ||
| self.reftest('hello_world_sdl.c', 'htmltest.png', cflags=['-sUSE_SDL', '-lGL']) # is the default anyhow | ||
|
|
@@ -2218,7 +2211,7 @@ def test_perspective(self): | |
|
|
||
| @requires_graphics_hardware | ||
| def test_glerror(self): | ||
| self.btest('gl_error.c', expected='1', cflags=['-sLEGACY_GL_EMULATION', '-lGL']) | ||
| self.btest('gl_error.c', expected='1', cflags=['-sLEGACY_GL_EMULATION', '-lGL', '-sUSE_SDL']) | ||
|
|
||
| @parameterized({ | ||
| '': ([],), | ||
|
|
||
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.