diff options
author | est31 <MTest31@outlook.com> | 2015-10-24 20:44:07 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-10-24 20:47:02 +0200 |
commit | 49bda7f98d2ca1d3553460d27c7308856969fb44 (patch) | |
tree | cc648b86a1eb145e803fe9ea46a79f1ebc39b137 /build/android/src/net | |
parent | e46fa2200359854969d42cb3a313c3f2381f9ce0 (diff) | |
download | minetest-49bda7f98d2ca1d3553460d27c7308856969fb44.tar.gz minetest-49bda7f98d2ca1d3553460d27c7308856969fb44.tar.bz2 minetest-49bda7f98d2ca1d3553460d27c7308856969fb44.zip |
Android: statically load iconv library
Fixes #3291
Thanks to @arpruss for reporting the bug, and suggesting the fix.
Also, remove trailing whitespaces.
Diffstat (limited to 'build/android/src/net')
-rw-r--r-- | build/android/src/net/minetest/minetest/MtNativeActivity.java | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/build/android/src/net/minetest/minetest/MtNativeActivity.java b/build/android/src/net/minetest/minetest/MtNativeActivity.java index 5c1f44d17..fc95a8379 100644 --- a/build/android/src/net/minetest/minetest/MtNativeActivity.java +++ b/build/android/src/net/minetest/minetest/MtNativeActivity.java @@ -12,23 +12,23 @@ public class MtNativeActivity extends NativeActivity { super.onCreate(savedInstanceState); m_MessagReturnCode = -1; m_MessageReturnValue = ""; - + } @Override public void onDestroy() { super.onDestroy(); } - - + + public void copyAssets() { Intent intent = new Intent(this, MinetestAssetCopy.class); startActivity(intent); } - + public void showDialog(String acceptButton, String hint, String current, int editType) { - + Intent intent = new Intent(this, MinetestTextEntry.class); Bundle params = new Bundle(); params.putString("acceptButton", acceptButton); @@ -40,37 +40,37 @@ public class MtNativeActivity extends NativeActivity { m_MessageReturnValue = ""; m_MessagReturnCode = -1; } - + public static native void putMessageBoxResult(String text); - + /* ugly code to workaround putMessageBoxResult not beeing found */ public int getDialogState() { return m_MessagReturnCode; } - + public String getDialogValue() { m_MessagReturnCode = -1; return m_MessageReturnValue; } - + public float getDensity() { return getResources().getDisplayMetrics().density; } - + public int getDisplayWidth() { return getResources().getDisplayMetrics().widthPixels; } - + public int getDisplayHeight() { return getResources().getDisplayMetrics().heightPixels; } - + @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == 101) { if (resultCode == RESULT_OK) { - String text = data.getStringExtra("text"); + String text = data.getStringExtra("text"); m_MessagReturnCode = 0; m_MessageReturnValue = text; } @@ -79,7 +79,7 @@ public class MtNativeActivity extends NativeActivity { } } } - + static { System.loadLibrary("openal"); System.loadLibrary("ogg"); @@ -87,13 +87,14 @@ public class MtNativeActivity extends NativeActivity { System.loadLibrary("ssl"); System.loadLibrary("crypto"); System.loadLibrary("gmp"); + System.loadLibrary("iconv"); // We don't have to load libminetest.so ourselves, // but if we do, we get nicer logcat errors when // loading fails. System.loadLibrary("minetest"); } - + private int m_MessagReturnCode; private String m_MessageReturnValue; } |