Commit Graph

2 Commits

Author SHA1 Message Date
Sam Lantinga
5f2e83a955 Fixed bug 3429 - Update AM_PATH_SDL2() to also check for SDL2.framework
neoaggelos

It is common for Mac OS X to use the SDL2.framework instead of the classic UNIX dynamic lib.

Therefore, it makes sense for AM_PATH_SDL2() to be able to locate it. Attached is a patched sdl2.m4 (updated for that purpose).

Changes:
* look for SDL2.framework ONLY if pkg-config and sdl2-config tests failed (this is to ensure compatibility with the old behaviour)

* adds option ('--disable-sdlframework') to retreat to the old behaviour

* adds variable 'SDL2_FRAMEWORK' for the user to specify the exact path to SDL2.framework (e.g. if it is installed in a non-standard location)

Open to suggestions for further improvements
2016-09-29 16:37:08 -07:00
Philipp Wiesemann
0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00