Support for initializing video/audio in static constructors before main()
This commit is contained in:
@@ -21,14 +21,12 @@ class Globals {
|
||||
}
|
||||
|
||||
class LoadLibrary {
|
||||
public LoadLibrary() {}
|
||||
static {
|
||||
public LoadLibrary()
|
||||
{
|
||||
System.loadLibrary("tremor");
|
||||
System.loadLibrary("sdl");
|
||||
System.loadLibrary("sdl_mixer");
|
||||
System.loadLibrary("sdl_image");
|
||||
System.loadLibrary("sdl_ttf");
|
||||
System.loadLibrary("application");
|
||||
System.loadLibrary("sdl_main");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,9 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer {
|
||||
public void onDrawFrame(GL10 gl) {
|
||||
|
||||
nativeInitJavaCallbacks();
|
||||
|
||||
System.loadLibrary("application");
|
||||
System.loadLibrary("sdl_main");
|
||||
|
||||
nativeInit(); // Calls main() and never returns, hehe - we'll call eglSwapBuffers() from native code
|
||||
|
||||
|
||||
Reference in New Issue
Block a user