mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-02 07:58:30 +00:00
Fixed bug 2812 - Make libSDL2main.a usable on Android via a dummy symbol
Jonas Kulla This eliminates the need to manually compile in SDL_main_android.c. Instead, add "-lSDL2main -Wl,-u,SDL_main_dummy" when linking. I don't know how the nkd-build process works, but unless it was for some reason linking libSDL2main.a it should be unaffected.
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
*******************************************************************************/
|
||||
#include <jni.h>
|
||||
|
||||
/* Dummy symbol so '-u SDL_main_dummy' forces ld to link in libSDL2main.a */
|
||||
JNIEXPORT int SDL_main_dummy;
|
||||
|
||||
/* Called before SDL_main() to initialize JNI bindings in SDL library */
|
||||
extern void SDL_Android_Init(JNIEnv* env, jclass cls);
|
||||
|
||||
|
Reference in New Issue
Block a user