Updated VCMI, added readme

This commit is contained in:
pelya
2011-06-10 13:27:16 +03:00
parent 22a4b5ac03
commit 538a0d0b3f
11 changed files with 100 additions and 27 deletions

View File

@@ -264,6 +264,18 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
// Thread.currentThread().setPriority((Thread.currentThread().getPriority() + Thread.MIN_PRIORITY)/2);
mGlContextLost = false;
// ----- VCMI hack -----
try
{
File libpath = new File(context.getFilesDir(), "libvcmi.so");
System.load(libpath.getPath());
}
catch ( UnsatisfiedLinkError eee )
{
System.out.println("libSDL: error loading lib: " + eee.toString());
}
// ----- VCMI hack -----
String libs[] = { "application", "sdl_main" };
try
@@ -275,13 +287,21 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
}
catch ( UnsatisfiedLinkError e )
{
for(String l : libs)
System.out.println("libSDL: error loading lib: " + e.toString());
try
{
String libname = System.mapLibraryName(l);
File libpath = new File(context.getCacheDir(), libname);
System.out.println("libSDL: loading lib " + libpath.getPath());
System.load(libpath.getPath());
libpath.delete();
for(String l : libs)
{
String libname = System.mapLibraryName(l);
File libpath = new File(context.getCacheDir(), libname);
System.out.println("libSDL: loading lib " + libpath.getPath());
System.load(libpath.getPath());
libpath.delete();
}
}
catch ( UnsatisfiedLinkError ee )
{
System.out.println("libSDL: error loading lib: " + ee.toString());
}
}