From a2dfb0f5ea2a0c27cd34659a546ebcc2b03533f3 Mon Sep 17 00:00:00 2001 From: Sacha Date: Sun, 5 Jan 2014 10:53:47 +1000 Subject: [PATCH] Fix Qt for Maemo --- base/QtMain.cpp | 6 ++++-- base/QtMain.h | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/base/QtMain.cpp b/base/QtMain.cpp index 68aee05a08..24aa1496eb 100644 --- a/base/QtMain.cpp +++ b/base/QtMain.cpp @@ -35,6 +35,8 @@ std::string System_GetProperty(SystemProperty prop) { return "Qt:Blackberry"; #elif defined(MEEGO_EDITION_HARMATTAN) return "Qt:Meego"; +#elif defined(MAEMO) + return "Qt:Maemo"; #elif defined(Q_OS_LINUX) return "Qt:Linux"; #elif defined(_WIN32) @@ -100,7 +102,7 @@ Q_DECL_EXPORT #endif int main(int argc, char *argv[]) { -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) && !defined(MAEMO) QApplication::setAttribute(Qt::AA_X11InitThreads, true); #endif QApplication a(argc, argv); @@ -118,7 +120,7 @@ int main(int argc, char *argv[]) #elif defined(BLACKBERRY) const char *savegame_dir = "/accounts/1000/shared/misc/"; const char *assets_dir = "app/native/assets/"; -#elif defined(MEEGO_EDITION_HARMATTAN) +#elif defined(MEEGO_EDITION_HARMATTAN) || defined(MAEMO) const char *savegame_dir = "/home/user/MyDocs/PPSSPP/"; const char *assets_dir = "/opt/PPSSPP/"; #else diff --git a/base/QtMain.h b/base/QtMain.h index 1d9140617b..08dfab062b 100644 --- a/base/QtMain.h +++ b/base/QtMain.h @@ -9,7 +9,7 @@ #include #include -#ifdef USING_GLES2 +#if defined(USING_GLES2) && !defined(MAEMO) #include QTM_USE_NAMESPACE #endif @@ -193,7 +193,7 @@ protected: void updateAccelerometer() { -#ifdef USING_GLES2 +#if defined(USING_GLES2) && !defined(MAEMO) // TODO: Toggle it depending on whether it is enabled QAccelerometerReading *reading = acc->reading(); if (reading) { @@ -206,7 +206,7 @@ protected: private: InputState input_state; -#ifdef USING_GLES2 +#if defined(USING_GLES2) && !defined(MAEMO) QAccelerometer* acc; #endif };