Skip to content

Commit

Permalink
Make Qt a bit more friendly for Android. Report as Qt:Android. Use st…
Browse files Browse the repository at this point in the history
…andard locations.
  • Loading branch information
xsacha committed Jun 3, 2014
1 parent dfe8664 commit 4f0ffa2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions base/QtMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#include <QLocale>
#include <QThread>

#ifdef ANDROID
#include <QStandardPaths>
#endif

#ifdef __SYMBIAN32__
#include <e32std.h>
#include <QSystemScreenSaver>
Expand All @@ -39,6 +43,8 @@ std::string System_GetProperty(SystemProperty prop) {
return "Qt:Meego";
#elif defined(MAEMO)
return "Qt:Maemo";
#elif defined(ANDROID)
return "Qt:Android";
#elif defined(Q_OS_LINUX)
return "Qt:Linux";
#elif defined(_WIN32)
Expand Down Expand Up @@ -158,6 +164,10 @@ int main(int argc, char *argv[])
#elif defined(MEEGO_EDITION_HARMATTAN) || defined(MAEMO)
const char *savegame_dir = "/home/user/MyDocs/PPSSPP/";
const char *assets_dir = "/opt/PPSSPP/";
#elif defined(ANDROID)
const char *savegame_dir = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0).toStdString().c_str();
const char *assets_dir = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation).at(0).toStdString().c_str();
setenv("QT_USE_ANDROID_NATIVE_DIALOGS", "1", 1); // Which Qt version does this need?
#else
const char *savegame_dir = "./";
const char *assets_dir = "./";
Expand Down

0 comments on commit 4f0ffa2

Please sign in to comment.