diff options
author | Angus Lees | 2010-06-08 13:25:00 +0000 |
---|---|---|
committer | Angus Lees | 2010-06-08 13:25:00 +0000 |
commit | d72ae64e3447ca01e308e61c320692463596fb0b (patch) | |
tree | a395129b5289d4a0df5ee0909e4648d89a7e4813 /backends/platform | |
parent | ec524e3705970a725c9dd1008fff97ccd7f1d250 (diff) | |
download | scummvm-rg350-d72ae64e3447ca01e308e61c320692463596fb0b.tar.gz scummvm-rg350-d72ae64e3447ca01e308e61c320692463596fb0b.tar.bz2 scummvm-rg350-d72ae64e3447ca01e308e61c320692463596fb0b.zip |
Provide a replacement for bionic's __assert().
The usual Android version doesn't actually print the assert message
before aborting.
svn-id: r49506
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/android/android.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index f319e220cc..5d78ead6be 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -74,6 +74,14 @@ #undef JNIEXPORT #define JNIEXPORT __attribute__ ((visibility("default"))) +// This replaces the bionic libc assert message with something that +// actually prints the assertion failure before aborting. +extern "C" +void __assert(const char *file, int line, const char *expr) { + __android_log_assert(expr, LOG_TAG, "%s:%d: Assertion failure: %s", + file, line, expr); +} + static JavaVM *cached_jvm; static jfieldID FID_Event_type; static jfieldID FID_Event_synthetic; |