From 301de0f6f77cce6c6a89cde48ed98afbf0d78566 Mon Sep 17 00:00:00 2001 From: valfieri Date: Sun, 18 Aug 2019 17:33:00 +0200 Subject: [PATCH] Android Fix --- Boost/boost/smart_ptr/shared_ptr.hpp | 4 ++- Boost/boost/thread/xtime.hpp | 2 +- Boost/lib/pthread/timeconv.inl | 16 ++++----- projects/mtg/Android/AndroidManifest.xml | 44 +++++++++++++++--------- projects/mtg/Android/jni/Application.mk | 4 +-- projects/mtg/Android/project.properties | 2 +- 6 files changed, 43 insertions(+), 29 deletions(-) diff --git a/Boost/boost/smart_ptr/shared_ptr.hpp b/Boost/boost/smart_ptr/shared_ptr.hpp index 78d367a69..aca83c72f 100644 --- a/Boost/boost/smart_ptr/shared_ptr.hpp +++ b/Boost/boost/smart_ptr/shared_ptr.hpp @@ -182,7 +182,9 @@ public: shared_ptr(): px(0), pn() // never throws in 1.30+ { } - + + shared_ptr(const shared_ptr&) = default; + template explicit shared_ptr( Y * p ): px( p ), pn( p ) // Y must be complete { diff --git a/Boost/boost/thread/xtime.hpp b/Boost/boost/thread/xtime.hpp index d1439e0da..c05f1c76e 100644 --- a/Boost/boost/thread/xtime.hpp +++ b/Boost/boost/thread/xtime.hpp @@ -20,7 +20,7 @@ namespace boost { enum xtime_clock_types { - TIME_UTC=1 + TIME_UTC_=1 // TIME_TAI, // TIME_MONOTONIC, // TIME_PROCESS, diff --git a/Boost/lib/pthread/timeconv.inl b/Boost/lib/pthread/timeconv.inl index b75a1353b..7c07802cc 100644 --- a/Boost/lib/pthread/timeconv.inl +++ b/Boost/lib/pthread/timeconv.inl @@ -20,8 +20,8 @@ const int NANOSECONDS_PER_MICROSECOND = 1000; inline void to_time(int milliseconds, boost::xtime& xt) { int res = 0; - res = boost::xtime_get(&xt, boost::TIME_UTC); - BOOST_ASSERT(res == boost::TIME_UTC); + res = boost::xtime_get(&xt, boost::TIME_UTC_); + BOOST_ASSERT(res == boost::TIME_UTC_); xt.sec += (milliseconds / MILLISECONDS_PER_SECOND); xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) * @@ -57,8 +57,8 @@ inline void to_timespec_duration(const boost::xtime& xt, timespec& ts) { boost::xtime cur; int res = 0; - res = boost::xtime_get(&cur, boost::TIME_UTC); - BOOST_ASSERT(res == boost::TIME_UTC); + res = boost::xtime_get(&cur, boost::TIME_UTC_); + BOOST_ASSERT(res == boost::TIME_UTC_); if (boost::xtime_cmp(xt, cur) <= 0) { @@ -88,8 +88,8 @@ inline void to_duration(boost::xtime xt, int& milliseconds) { boost::xtime cur; int res = 0; - res = boost::xtime_get(&cur, boost::TIME_UTC); - BOOST_ASSERT(res == boost::TIME_UTC); + res = boost::xtime_get(&cur, boost::TIME_UTC_); + BOOST_ASSERT(res == boost::TIME_UTC_); if (boost::xtime_cmp(xt, cur) <= 0) milliseconds = 0; @@ -110,8 +110,8 @@ inline void to_microduration(boost::xtime xt, int& microseconds) { boost::xtime cur; int res = 0; - res = boost::xtime_get(&cur, boost::TIME_UTC); - BOOST_ASSERT(res == boost::TIME_UTC); + res = boost::xtime_get(&cur, boost::TIME_UTC_); + BOOST_ASSERT(res == boost::TIME_UTC_); if (boost::xtime_cmp(xt, cur) <= 0) microseconds = 0; diff --git a/projects/mtg/Android/AndroidManifest.xml b/projects/mtg/Android/AndroidManifest.xml index 543d9f775..6d95ff918 100644 --- a/projects/mtg/Android/AndroidManifest.xml +++ b/projects/mtg/Android/AndroidManifest.xml @@ -1,16 +1,28 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/projects/mtg/Android/jni/Application.mk b/projects/mtg/Android/jni/Application.mk index 53a2e0f9d..3aebe4ea6 100644 --- a/projects/mtg/Android/jni/Application.mk +++ b/projects/mtg/Android/jni/Application.mk @@ -1,8 +1,8 @@ APP_PROJECT_PATH := $(call my-dir)/.. APP_CPPFLAGS += -frtti -fexceptions -APP_ABI := armeabi armeabi-v7a +APP_ABI := armeabi-v7a #APP_ABI := x86 # mainly for emulators -APP_STL := gnustl_static +APP_STL := c++_static APP_MODULES := libpng libjpeg main SDL #APP_OPTIM is 'release' by default diff --git a/projects/mtg/Android/project.properties b/projects/mtg/Android/project.properties index b7c2081d5..82181932d 100644 --- a/projects/mtg/Android/project.properties +++ b/projects/mtg/Android/project.properties @@ -11,4 +11,4 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-10 +target=android-29