add api8 sound dummy for android, android crash bugfix (next steps)
This commit is contained in:
+18
-5
@@ -509,7 +509,12 @@ unix:!mac {
|
||||
LIBS += -ltinyxml
|
||||
LIBS += $$BOOST_LIBS
|
||||
LIBS += -lgsasl -lidn
|
||||
LIBS += -lssl -lcrypto -lgcrypt -lgpg-error -lprotobuf-lite -lOpenSLES
|
||||
LIBS += -lssl -lcrypto -lgcrypt -lgpg-error -lprotobuf-lite
|
||||
|
||||
!android_api8 {
|
||||
#android sound lib for api9 and higher
|
||||
LIBS += -lOpenSLES
|
||||
}
|
||||
}
|
||||
TARGETDEPS += ./lib/libpokerth_lib.a \
|
||||
./lib/libpokerth_db.a \
|
||||
@@ -627,11 +632,19 @@ android{
|
||||
# sqlite3 is included directly.
|
||||
INCLUDEPATH += src/third_party/sqlite3
|
||||
|
||||
HEADERS += src/gui/qt/sound/androidaudio.h \
|
||||
src/gui/qt/sound/androidsoundeffect.h
|
||||
# sound system switches
|
||||
!android_api8 {
|
||||
HEADERS += src/gui/qt/sound/androidaudio.h \
|
||||
src/gui/qt/sound/androidsoundeffect.h
|
||||
|
||||
SOURCES += src/gui/qt/sound/androidaudio.cpp \
|
||||
src/gui/qt/sound/androidsoundeffect.cpp
|
||||
SOURCES += src/gui/qt/sound/androidaudio.cpp \
|
||||
src/gui/qt/sound/androidsoundeffect.cpp
|
||||
}
|
||||
android_api8 {
|
||||
DEFINES += ANDROID_API8
|
||||
HEADERS += src/gui/qt/sound/androidapi8dummy.h
|
||||
SOURCES += src/gui/qt/sound/androidapi8dummy.cpp
|
||||
}
|
||||
}
|
||||
|
||||
!android{
|
||||
|
||||
@@ -28,7 +28,7 @@ changeCompleteBlindsDialogImpl::changeCompleteBlindsDialogImpl(QWidget *parent,
|
||||
setWindowModality(Qt::ApplicationModal);
|
||||
setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
|
||||
#endif
|
||||
setupUi(this);
|
||||
setupUi(this);
|
||||
|
||||
connect( pushButton_add, SIGNAL( clicked() ), this, SLOT( addBlindValueToList() ) );
|
||||
connect( pushButton_delete, SIGNAL( clicked() ), this, SLOT( removeBlindFromList() ) );
|
||||
|
||||
@@ -35,8 +35,7 @@ class changeCompleteBlindsDialogImpl: public QDialog, public Ui::changeCompleteB
|
||||
public:
|
||||
changeCompleteBlindsDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
|
||||
|
||||
void exec();
|
||||
|
||||
void exec();
|
||||
|
||||
public slots:
|
||||
bool getSettingsCorrect() const {
|
||||
|
||||
@@ -28,10 +28,7 @@
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QObject {font: 24px}</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="verticalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
@@ -171,19 +168,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QObject {font: bold 20px}</string>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="enabled">
|
||||
@@ -196,50 +180,6 @@
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="1" column="0" rowspan="2">
|
||||
<widget class="QListWidget" name="listWidget_blinds"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pushButton_delete">
|
||||
<property name="text">
|
||||
<string>Delete</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>121</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QSpinBox" name="spinBox_input">
|
||||
<property name="maximum">
|
||||
<number>20000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pushButton_add">
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
@@ -300,9 +240,106 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="1" column="0" rowspan="2">
|
||||
<widget class="QListWidget" name="listWidget_blinds"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pushButton_delete">
|
||||
<property name="text">
|
||||
<string>Delete</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>121</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QSpinBox" name="spinBox_input">
|
||||
<property name="maximum">
|
||||
<number>20000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pushButton_add">
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string> OK </string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/dialog_ok_apply.png</normaloff>:/gfx/dialog_ok_apply.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
@@ -318,42 +355,11 @@
|
||||
<tabstop>radioButton_afterThisAlwaysRaiseAbout</tabstop>
|
||||
<tabstop>spinBox_afterThisAlwaysRaiseValue</tabstop>
|
||||
<tabstop>radioButton_afterThisStayAtLastBlind</tabstop>
|
||||
<tabstop>buttonBox</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../resources/pokerth.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>changeCompleteBlindsDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>237</x>
|
||||
<y>387</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>changeCompleteBlindsDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>279</x>
|
||||
<y>387</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>radioButton_afterThisAlwaysRaiseAbout</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
@@ -361,12 +367,12 @@
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>327</x>
|
||||
<y>302</y>
|
||||
<x>663</x>
|
||||
<y>349</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>389</x>
|
||||
<y>304</y>
|
||||
<x>763</x>
|
||||
<y>353</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@@ -377,12 +383,28 @@
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>297</x>
|
||||
<y>116</y>
|
||||
<x>706</x>
|
||||
<y>154</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>306</x>
|
||||
<y>164</y>
|
||||
<x>310</x>
|
||||
<y>337</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pushButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>changeCompleteBlindsDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>716</x>
|
||||
<y>465</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>628</x>
|
||||
<y>467</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
|
||||
@@ -131,12 +131,19 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_login">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QObject {font: bold 30px}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Login</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/pokerth.qrc">
|
||||
<normaloff>:/gfx/dialog_ok_apply.png</normaloff>:/gfx/dialog_ok_apply.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@@ -206,7 +213,9 @@
|
||||
<tabstop>checkBox_guest</tabstop>
|
||||
<tabstop>pushButton_login</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../resources/pokerth.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>pushButton_login</sender>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "configfile.h"
|
||||
#include "androidapi8dummy.h"
|
||||
|
||||
AndroidApi8Dummy::AndroidApi8Dummy(ConfigFile *c, QObject *parent) :
|
||||
QObject(parent), myConfig(c)
|
||||
{
|
||||
}
|
||||
|
||||
AndroidApi8Dummy::~AndroidApi8Dummy()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef ANDROIDAPI8DUMMY_H
|
||||
#define ANDROIDAPI8DUMMY_H
|
||||
|
||||
#include <QObject>
|
||||
class ConfigFile;
|
||||
|
||||
class AndroidApi8Dummy : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AndroidApi8Dummy(ConfigFile *c, QObject *parent = 0);
|
||||
~AndroidApi8Dummy();
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
void registerSound(const QString&, const QString&){}
|
||||
void reallyPlaySound(const QString&){}
|
||||
void playSound(const std::string&, int){}
|
||||
void initAudio(){}
|
||||
void closeAudio(){}
|
||||
void reInit(){}
|
||||
|
||||
private:
|
||||
ConfigFile *myConfig;
|
||||
|
||||
};
|
||||
|
||||
#endif // ANDROIDAPI8DUMMY
|
||||
@@ -1,7 +1,11 @@
|
||||
#include "soundevents.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
#include "androidaudio.h"
|
||||
#ifdef ANDROID_API8
|
||||
#include "androidapi8dummy.h"
|
||||
#else
|
||||
#include "androidaudio.h"
|
||||
#endif
|
||||
#else
|
||||
#include "sdlplayer.h"
|
||||
#endif
|
||||
@@ -18,7 +22,11 @@ SoundEvents::SoundEvents(ConfigFile *c): myConfig(c), lastSBValue(0), lastSBLeve
|
||||
{
|
||||
|
||||
#ifdef ANDROID
|
||||
myPlayer = new AndroidAudio(myConfig);
|
||||
#ifdef ANDROID_API8
|
||||
myPlayer = new AndroidApi8Dummy(myConfig);
|
||||
#else
|
||||
myPlayer = new AndroidAudio(myConfig);
|
||||
#endif
|
||||
#else
|
||||
myPlayer = new SDLPlayer(myConfig);
|
||||
#endif
|
||||
|
||||
@@ -3,9 +3,12 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
#ifdef ANDROID
|
||||
class AndroidAudio;
|
||||
#ifdef ANDROID_API8
|
||||
class AndroidApi8Dummy;
|
||||
#else
|
||||
class AndroidAudio;
|
||||
#endif
|
||||
#else
|
||||
class SDLPlayer;
|
||||
#endif
|
||||
@@ -31,7 +34,11 @@ protected:
|
||||
private:
|
||||
|
||||
#ifdef ANDROID
|
||||
AndroidAudio *myPlayer;
|
||||
#ifdef ANDROID_API8
|
||||
AndroidApi8Dummy *myPlayer;
|
||||
#else
|
||||
AndroidAudio *myPlayer;
|
||||
#endif
|
||||
#else
|
||||
SDLPlayer *myPlayer;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user