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

Revert "Remove SDL build dependency." #16

Merged
merged 1 commit into from
Jan 14, 2015
Merged

Revert "Remove SDL build dependency." #16

merged 1 commit into from
Jan 14, 2015

Conversation

Narann
Copy link
Member

@Narann Narann commented Jan 14, 2015

Reverts #14

SDL1.2 internal state is not initialized before calling SDL_ functions #15

It seems 87ef789 from pull request #14 broke the SDL1.2 initialization. On parts of the platforms the main function must be replaced and instead the private SDL-main (parachute) function has to be called first. This is the only use of this SDL_main.h include. The programs main function is redefined as SDL_main and the main function is included using a special static library. The normal startup will therefore be main(SDLmain.a) -> SDL_main(previously known called main in the actual program source code). Of course, main() is not always called main() but I just use it here as placeholder for the real name.

This special indirection is required to initialize the internal state of SDL before the actual program calls any SDL function.

A similar problem already caused the windows builds to break (in a very hard to debug way) in the past.

@littleguy77
Copy link
Member

@Narann I don't think the formality of a PR is needed here. I meant to suggest that you revert the master branch directly since you have write privileges.

Narann added a commit that referenced this pull request Jan 14, 2015
Revert "Remove SDL build dependency."
@Narann Narann merged commit 8c56a77 into master Jan 14, 2015
@Narann
Copy link
Member Author

Narann commented Jan 14, 2015

The github "Revert this PR" feature imply a PR actually. :)

@Narann Narann deleted the revert-14-master branch January 14, 2015 16:28
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

2 participants