I’ve been working with the SDL ‘andriod-project.zip’ demo which Sam created.
I downloaded and installed it and it ran ok. It’s a good example. It hangs on the Back button in the emulator though (2.3.1).
So I built a second package with my own files and installed it just like the ‘aliens’ example and it works as well. Ok good.
But I noticed that my ‘aliens’ pkg disappeared when I installed my own package and that my own package disappeared when I installed the aliens package.
So then I noticed that both projects were building the exact same package. So I tried changing the package name and then started getting a bunch of errors and eventually just gave up on this.
So then I tried putting all the SDL stuff into an Andiod Libary package. And that went fairly well.
So then I redid the aliens package but removed all the internal SDL stuff and just created references to the andriod SDL library. Again this went fairly well. It all compiles and installs.
Now the only issue is that for whatever reason this new version based on using the SDL lib fails to init OpenGL.
Here’s a bit of the log using the andriod sdl lib:
Code:
D/dalvikvm( 525): Shared lib ‘/data/data/com.mydomain.test/lib/libSDL_mixer.so’ already loaded in same CL 0x40513218
D/dalvikvm( 525): Trying to load lib /data/data/com.mydomain.test/lib/libSDL_ttf.so 0x40513218
D/dalvikvm( 525): Shared lib ‘/data/data/com.mydomain.test/lib/libSDL_ttf.so’ already loaded in same CL 0x40513218
D/dalvikvm( 525): Trying to load lib /data/data/com.mydomain.test/lib/libmain.so 0x40513218
D/dalvikvm( 525): Shared lib ‘/data/data/com.mydomain.test/lib/libmain.so’ already loaded in same CL 0x40513218
I/SDL ( 525): SDL_Android_Init()
V/SDL ( 525): SDL audio: opening device
V/SDL ( 525): SDL audio: wanted mono 8-bit 11.025kHz, 512 frames buffer
V/SDL ( 525): SDL audio: got mono 8-bit 11.025kHz, 512 frames buffer
I/SDL ( 525): [STUB] GL_LoadLibrary
I/SDL ( 525): [STUB] GL_SetSwapInterval
I/SDL ( 525): [STUB] GL_GetSwapInterval
I/ActivityManager( 66): Displayed com.mydomain.test/.MySDLActivity: +3s90ms
W/AudioTrack( 525): obtainBuffer timed out (is the CPU pegged?) 0x2939c0 user=00000600, server=00000400
D/Zygote ( 33): Process 525 terminated by signal (11)
I/ActivityManager( 66): Process com.mydomain.test (pid 525) has died.
It’s getting a SEGV somewhere.
So maybe someone can help me figure out what is happening here so I can get it fully working.
Here is are the links to the lib and the app:
http://code.google.com/p/greno-misc/downloads/detail?name=lib-SDL-1.tgz&can=2&q=
http://code.google.com/p/greno-misc/downloads/detail?name=myproject-1.tgz&can=2&q=
I understand andriod pretty well but I’m fairly new to SDL so go easy if you will.
Thanks a lot,
Gerry