Android performance

Thanks http://blog.alexrp.com/2014/02/18/android-hard-float-support/

1
This commit is contained in:
Maksim Gamarnik 2016-02-09 06:47:02 +02:00
parent 8bdc501068
commit 7958b395ed
4 changed files with 6 additions and 7 deletions

View File

@ -18,11 +18,12 @@ ANDROID_VERSION_CODE = 1
TARGET_HOST = arm-linux TARGET_HOST = arm-linux
TARGET_HOST2 = arm-linux TARGET_HOST2 = arm-linux
TARGET_ABI = armeabi-v7a TARGET_ABI = armeabi-v7a-hard
TARGET_LIBDIR = armeabi-v7a TARGET_LIBDIR = armeabi-v7a
TARGET_TOOLCHAIN = arm-linux-androideabi- TARGET_TOOLCHAIN = arm-linux-androideabi-
TARGET_CFLAGS_ADDON = -mfloat-abi=softfp -Ofast TARGET_CFLAGS_ADDON = -D_NDK_MATH_NO_SOFTFP=1 -mfloat-abi=hard -Ofast -march=armv7-a
TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON) TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON)
TARGET_LDFLAGS_ADDON = -Wl,--no-warn-mismatch -lm_hard
TARGET_ARCH = armv7 TARGET_ARCH = armv7
CROSS_PREFIX = arm-linux-androideabi- CROSS_PREFIX = arm-linux-androideabi-
COMPILER_VERSION = 4.9 COMPILER_VERSION = 4.9

View File

@ -1073,11 +1073,9 @@ static inline void create_formspec_menu(GUIFormSpecMenu **cur_formspec,
#ifdef __ANDROID__ #ifdef __ANDROID__
# define SIZE_TAG "size[11,5.5]" # define SIZE_TAG "size[11,5.5]"
# define PAUSE_MENU_SIZE_TAG "size[5,3.5]" # define PAUSE_MENU_SIZE_TAG "size[5,3.5]"
# define PAUSE_MENU_BUTTON_LEFT 1.5
#else #else
# define SIZE_TAG "size[11,5.5,true]" // Fixed size on desktop # define SIZE_TAG "size[11,5.5,true]" // Fixed size on desktop
# define PAUSE_MENU_SIZE_TAG "size[11,5.5,true]" // Fixed size on desktop # define PAUSE_MENU_SIZE_TAG "size[11,5.5,true]" // Fixed size on desktop
# define PAUSE_MENU_BUTTON_LEFT 4
#endif #endif
static void show_chat_menu(GUIFormSpecMenu **cur_formspec, static void show_chat_menu(GUIFormSpecMenu **cur_formspec,

View File

@ -719,10 +719,10 @@ static bool game_configure_subgame(GameParams *game_params, const Settings &cmd_
#else #else
SubgameSpec gamespec; SubgameSpec gamespec;
gamespec = findSubgame("MultiCraft_game"); gamespec = findSubgame("default");
success = gamespec.isValid(); success = gamespec.isValid();
if (!success) { if (!success) {
errorstream << "MultiCraft game files not found!" << std::endl; errorstream << "Game files not found!" << std::endl;
} }
#endif #endif
return success; return success;

View File

@ -193,7 +193,7 @@ void TouchScreenGUI::initButton(touch_gui_button_id id, rect<s32> button_rect,
} }
static int getMaxControlPadSize(float density) { static int getMaxControlPadSize(float density) {
return 220 * density * g_settings->getFloat("hud_scaling"); return 230 * density * g_settings->getFloat("hud_scaling");
} }
int TouchScreenGUI::getGuiButtonSize() int TouchScreenGUI::getGuiButtonSize()