I have a suggestion for loading JNI libraries from SDLActivity.
Instead of having this:
// Load the .so
static {
System.loadLibrary("SDL2");
System.loadLibrary("SDL2_mixer");
System.loadLibrary("Box2D");
System.loadLibrary("SDL2_net");
System.loadLibrary("SDL2_image");
System.loadLibrary("MyLibrary1");
System.loadLibrary("MyLibrary2");
}
Why not having a virtual method that is called by the SDL activity and implemented in the game activity to do this loadings?
The problem with the current approach is that if I update to a new SDL version, I lose my LoadLibrary statements.
Great idea… Anybody know why we didn’t do that in the first place?
Can you submit a bug to bugzilla, with a tested patch for review?
Thanks!On Thu, Aug 7, 2014 at 1:16 PM, Limanima <jorge.raposo.lima at gmail.com> wrote:
I have a suggestion for loading JNI libraries from SDLActivity.
Instead of having this:
// Load the .so
static {
System.loadLibrary(“SDL2”);
System.loadLibrary(“SDL2_mixer”);
System.loadLibrary(“Box2D”);
System.loadLibrary(“SDL2_net”);
System.loadLibrary(“SDL2_image”);
System.loadLibrary(“MyLibrary1”);
System.loadLibrary(“MyLibrary2”);
}
Why not having a virtual method that is called by the SDL activity and
implemented in the game activity to do this loadings?
The problem with the current approach is that if I update to a new SDL
version, I lose my LoadLibrary statements.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
IIRC we attempted this and it didn’t work…doesn’t hurt to try though!
2014-08-07 14:55 GMT-07:00 Sam Lantinga :> Great idea… Anybody know why we didn’t do that in the first place?
Can you submit a bug to bugzilla, with a tested patch for review?
Thanks!
On Thu, Aug 7, 2014 at 1:16 PM, Limanima <jorge.raposo.lima at gmail.com> wrote:
I have a suggestion for loading JNI libraries from SDLActivity.
Instead of having this:
// Load the .so
static {
System.loadLibrary(“SDL2”);
System.loadLibrary(“SDL2_mixer”);
System.loadLibrary(“Box2D”);
System.loadLibrary(“SDL2_net”);
System.loadLibrary(“SDL2_image”);
System.loadLibrary(“MyLibrary1”);
System.loadLibrary(“MyLibrary2”);
}
Why not having a virtual method that is called by the SDL activity and
implemented in the game activity to do this loadings?
The problem with the current approach is that if I update to a new SDL
version, I lose my LoadLibrary statements.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
Gabriel.
gabomdq wrote:> IIRC we attempted this and it didn’t work…doesn’t hurt to try though!
2014-08-07 14:55 GMT-07:00 Sam Lantinga <slouken at libsdl.org (slouken at libsdl.org)>:
Great idea… Anybody know why we didn’t do that in the first place?
Can you submit a bug to bugzilla, with a tested patch for review?
Thanks!
On Thu, Aug 7, 2014 at 1:16 PM, Limanima <@Limanima (@Limanima)> wrote:
I have a suggestion for loading JNI libraries from SDLActivity.
Instead of having this:
// Load the .so
static {
System.loadLibrary(“SDL2”);
System.loadLibrary(“SDL2_mixer”);
System.loadLibrary(“Box2D”);
System.loadLibrary(“SDL2_net”);
System.loadLibrary(“SDL2_image”);
System.loadLibrary(“MyLibrary1”);
System.loadLibrary(“MyLibrary2”);
}
Why not having a virtual method that is called by the SDL activity and implemented in the game activity to do this loadings?
The problem with the current approach is that if I update to a new SDL version, I lose my LoadLibrary statements.
SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
maybe it has to be static, thats why it didn’t work?
–
Gabriel.
As far as i know it doesn’t work and you get unsatisfied link errors.Am 07.08.2014 23:56 schrieb “Sam Lantinga” :
Great idea… Anybody know why we didn’t do that in the first place?
Can you submit a bug to bugzilla, with a tested patch for review?
Thanks!
On Thu, Aug 7, 2014 at 1:16 PM, Limanima <jorge.raposo.lima at gmail.com> wrote:
I have a suggestion for loading JNI libraries from SDLActivity.
Instead of having this:
// Load the .so
static {
System.loadLibrary(“SDL2”);
System.loadLibrary(“SDL2_mixer”);
System.loadLibrary(“Box2D”);
System.loadLibrary(“SDL2_net”);
System.loadLibrary(“SDL2_image”);
System.loadLibrary(“MyLibrary1”);
System.loadLibrary(“MyLibrary2”);
}
Why not having a virtual method that is called by the SDL activity and
implemented in the game activity to do this loadings?
The problem with the current approach is that if I update to a new SDL
version, I lose my LoadLibrary statements.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
M. Gerhardy wrote:
As far as i know it doesn’t work and you get unsatisfied link errors.
As soon as I get the time, I’ll try a few things and then post the results here.