debugging help, fastter loading(?) and android sdcard

This commit is contained in:
stonedDiscord 2017-04-18 00:53:53 +02:00
parent 81964cb708
commit ae60825b29
3 changed files with 24 additions and 12 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<manifest package="com.aceattorneyonline.android" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.3.5.0" android:versionCode="2" android:installLocation="auto">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Attorney Online" android:icon="@drawable/icon">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="Attorney Online Lobby" android:screenOrientation="unspecified" android:launchMode="singleTop">
<manifest package="com.aceattorneyonline.ao2" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.3.5.0" android:versionCode="2" android:installLocation="auto">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="Attorney Online 2" android:icon="@drawable/icon">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="Attorney Online 2 Lobby" android:screenOrientation="unspecified" android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
@ -11,7 +11,7 @@
<!-- meta-data android:name="android.app.arguments" android:value="arg1 arg2 arg3"/ -->
<!-- Application arguments -->
<meta-data android:name="android.app.lib_name" android:value="Attorney_Online_remake"/>
<meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
<meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
<meta-data android:name="android.app.repository" android:value="default"/>
<meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
@ -63,12 +63,12 @@
</application>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16"/>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23"/>
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
<!-- %%INSERT_PERMISSIONS -->
<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
Remove the comment if you do not require these default features. -->

View File

@ -3,22 +3,32 @@
#include "file_functions.h"
#include <QDir>
#include <QDebug>
#include <QStandardPaths>
#ifdef BASE_OVERRIDE
#include "base_override.h"
#endif
QString base_path = "";
QString AOApplication::get_base_path()
{
if (base_path == "")
{
#ifdef BASE_OVERRIDE
return base_override;
base_path = base_override;
#elif defined(ANDROID)
return "/storage/extSdCard/AO2/";
QString sdcard_storage = getenv("SECONDARY_STORAGE");
if (dir_exists(sdcard_storage)){
base_path = sdcard_storage + "/AO2/";
}else{
QString external_storage = getenv("EXTERNAL_STORAGE");
base_path = external_storage + "/AO2/";
}
#else
return QDir::currentPath() + "/base/";
base_path = QDir::currentPath() + "/base/";
#endif
}
return base_path;
/*
#ifdef OMNI_DEBUG
return "/media/omnitroid/Data/winshare/AO/client/base/";

View File

@ -152,8 +152,10 @@ QString AOApplication::read_design_ini(QString p_identifier, QString p_design_pa
design_ini.setFileName(p_design_path);
if (!design_ini.open(QIODevice::ReadOnly))
{
qDebug() << "Could not find design ini " + p_design_path;
return "";
}
QTextStream in(&design_ini);
QString result = "";