diff --git a/pokerth_game.pro b/pokerth_game.pro index d387a970..76f9b286 100644 --- a/pokerth_game.pro +++ b/pokerth_game.pro @@ -383,7 +383,7 @@ unix:!mac { $${PREFIX}/lib64 } android{ - LIB_DIRS = ../cmoss/bin/droid/lib/armv5 + LIB_DIRS = $${PREFIX}/lib/armv5 } BOOST_FS = boost_filesystem \ boost_filesystem-mt @@ -598,12 +598,6 @@ gui_800x480 { android{ # Use old boost::filesystem, because the new version requires std::wstring. DEFINES += BOOST_FILESYSTEM_VERSION=2 - # If /usr/include is included, this will mess with the android sdk. - INCLUDEPATH -= /usr/include - LIBPATH -= /usr/lib - # Include directory containing android builds of used libs. - INCLUDEPATH += ../cmoss/bin/droid/include - LIBPATH += ../cmoss/bin/droid/lib/armv5 # sqlite3 is included directly. INCLUDEPATH += src/third_party/sqlite3 } diff --git a/pokerth_lib.pro b/pokerth_lib.pro index b5325065..90641983 100644 --- a/pokerth_lib.pro +++ b/pokerth_lib.pro @@ -245,10 +245,6 @@ mac{ android{ # Use old boost::filesystem, because the new version requires std::wstring. DEFINES += BOOST_FILESYSTEM_VERSION=2 - # If /usr/include is included, this will mess with the android sdk. - INCLUDEPATH -= /usr/include - # Include directory containing android builds of used libs. - INCLUDEPATH += ../cmoss/bin/droid/include # sqlite3 is included directly. INCLUDEPATH += src/third_party/sqlite3 SOURCES += src/third_party/sqlite3/sqlite3.c diff --git a/src/gui/qt/sound/sdlplayer.cpp b/src/gui/qt/sound/sdlplayer.cpp index b4bf3b86..d9e8dea5 100644 --- a/src/gui/qt/sound/sdlplayer.cpp +++ b/src/gui/qt/sound/sdlplayer.cpp @@ -17,33 +17,41 @@ *****************************************************************************/ #include "sdlplayer.h" +#ifndef __ANDROID_API__ #if (defined __APPLE__) #include #else #include #endif +#endif using namespace std; SDLPlayer::SDLPlayer(ConfigFile *c) +#ifndef __ANDROID_API__ : soundData(NULL), currentChannel(0) , audioEnabled(0), myConfig(c) +#endif { +#ifndef __ANDROID_API__ SDL_Init(SDL_INIT_AUDIO); initAudio(); myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str()); +#endif } SDLPlayer::~SDLPlayer() { +#ifndef __ANDROID_API__ closeAudio(); SDL_Quit(); +#endif } void SDLPlayer::initAudio() { - +#ifndef __ANDROID_API__ if (!audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) { int audio_rate = 44100; Uint16 audio_format = AUDIO_S16; /* 16-bit stereo */ @@ -56,11 +64,12 @@ void SDLPlayer::initAudio() audioEnabled = 1; } } +#endif } void SDLPlayer::playSound(string audioString, int playerID) { - +#ifndef __ANDROID_API__ if(audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) { QFile myFile(myAppDataPath + "sounds/default/" + QString::fromStdString(audioString)+".wav"); @@ -142,11 +151,12 @@ void SDLPlayer::playSound(string audioString, int playerID) // currentChannel = Mix_PlayChannel(-1, sound,0); } +#endif } void SDLPlayer::audioDone() { - +#ifndef __ANDROID_API__ if(audioEnabled) { Mix_HaltChannel(currentChannel); Mix_FreeChunk(sound); @@ -154,14 +164,16 @@ void SDLPlayer::audioDone() delete[] soundData; soundData = NULL; } +#endif } void SDLPlayer::closeAudio() { - +#ifndef __ANDROID_API__ if(audioEnabled) { audioDone(); Mix_CloseAudio(); audioEnabled = false; } +#endif } diff --git a/src/gui/qt/sound/sdlplayer.h b/src/gui/qt/sound/sdlplayer.h index 8afe2a45..bffc34e9 100644 --- a/src/gui/qt/sound/sdlplayer.h +++ b/src/gui/qt/sound/sdlplayer.h @@ -21,15 +21,15 @@ #define SDLPLAYER_H #include "configfile.h" +#include -#if (defined __APPLE__) +#ifndef __ANDROID_API__ +#ifdef __APPLE__ #include #else #include #endif - -#include -#include +#endif // struct Mix_Chunk; @@ -52,6 +52,7 @@ public: private: +#ifndef __ANDROID_API__ Mix_Chunk *sound; unsigned char *soundData; int currentChannel; @@ -60,7 +61,7 @@ private: ConfigFile *myConfig; QString myAppDataPath; - +#endif }; #endif