Fixed clashing lib names with system libraries

This commit is contained in:
pelya
2011-04-22 16:12:36 -04:00
parent 2bb4e56768
commit 0742977a5e
3 changed files with 16 additions and 3 deletions

View File

@@ -45,6 +45,9 @@ import java.io.File;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import android.text.SpannedString;
import java.io.BufferedReader;
import java.io.BufferedInputStream;
import java.io.InputStreamReader;
public class MainActivity extends Activity {
@@ -409,7 +412,17 @@ public class MainActivity extends Activity {
{
for(String l : Globals.AppLibraries)
{
System.loadLibrary(l);
try
{
String libname = System.mapLibraryName(l);
File libpath = new File(getFilesDir().getAbsolutePath() + "/../lib/" + libname);
System.out.println("libSDL: loading lib " + libpath.getAbsolutePath());
System.load(libpath.getPath());
}
catch( UnsatisfiedLinkError e )
{
System.loadLibrary(l);
}
}
}
catch ( UnsatisfiedLinkError e )

View File

@@ -22,7 +22,7 @@ RedefinedKeys="SPACE"
AppTouchscreenKeyboardKeysAmount=0
AppTouchscreenKeyboardKeysAmountAutoFire=0
RedefinedKeysScreenKb="1 2 3 4 5 6 1 2 3 4"
MultiABI=n
MultiABI=y
AppVersionCode=101
AppVersionName="1.01"
CompiledLibraries="sdl_mixer sdl_image"

View File

@@ -1 +1 @@
openttd
ballfield