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 += -ltinyxml
|
||||||
LIBS += $$BOOST_LIBS
|
LIBS += $$BOOST_LIBS
|
||||||
LIBS += -lgsasl -lidn
|
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 \
|
TARGETDEPS += ./lib/libpokerth_lib.a \
|
||||||
./lib/libpokerth_db.a \
|
./lib/libpokerth_db.a \
|
||||||
@@ -627,11 +632,19 @@ android{
|
|||||||
# sqlite3 is included directly.
|
# sqlite3 is included directly.
|
||||||
INCLUDEPATH += src/third_party/sqlite3
|
INCLUDEPATH += src/third_party/sqlite3
|
||||||
|
|
||||||
HEADERS += src/gui/qt/sound/androidaudio.h \
|
# sound system switches
|
||||||
src/gui/qt/sound/androidsoundeffect.h
|
!android_api8 {
|
||||||
|
HEADERS += src/gui/qt/sound/androidaudio.h \
|
||||||
|
src/gui/qt/sound/androidsoundeffect.h
|
||||||
|
|
||||||
SOURCES += src/gui/qt/sound/androidaudio.cpp \
|
SOURCES += src/gui/qt/sound/androidaudio.cpp \
|
||||||
src/gui/qt/sound/androidsoundeffect.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{
|
!android{
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ changeCompleteBlindsDialogImpl::changeCompleteBlindsDialogImpl(QWidget *parent,
|
|||||||
setWindowModality(Qt::ApplicationModal);
|
setWindowModality(Qt::ApplicationModal);
|
||||||
setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
|
setWindowFlags(Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint | Qt::Dialog);
|
||||||
#endif
|
#endif
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
connect( pushButton_add, SIGNAL( clicked() ), this, SLOT( addBlindValueToList() ) );
|
connect( pushButton_add, SIGNAL( clicked() ), this, SLOT( addBlindValueToList() ) );
|
||||||
connect( pushButton_delete, SIGNAL( clicked() ), this, SLOT( removeBlindFromList() ) );
|
connect( pushButton_delete, SIGNAL( clicked() ), this, SLOT( removeBlindFromList() ) );
|
||||||
|
|||||||
@@ -35,8 +35,7 @@ class changeCompleteBlindsDialogImpl: public QDialog, public Ui::changeCompleteB
|
|||||||
public:
|
public:
|
||||||
changeCompleteBlindsDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
|
changeCompleteBlindsDialogImpl(QWidget *parent = 0, ConfigFile *c = 0);
|
||||||
|
|
||||||
void exec();
|
void exec();
|
||||||
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
bool getSettingsCorrect() const {
|
bool getSettingsCorrect() const {
|
||||||
|
|||||||
@@ -28,10 +28,7 @@
|
|||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QObject {font: 24px}</string>
|
<string notr="true">QObject {font: 24px}</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="verticalSpacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<item>
|
<item>
|
||||||
@@ -171,19 +168,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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">
|
<item row="2" column="0" colspan="2">
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
@@ -196,50 +180,6 @@
|
|||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</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">
|
<item row="0" column="1">
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@@ -300,9 +240,106 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
@@ -318,42 +355,11 @@
|
|||||||
<tabstop>radioButton_afterThisAlwaysRaiseAbout</tabstop>
|
<tabstop>radioButton_afterThisAlwaysRaiseAbout</tabstop>
|
||||||
<tabstop>spinBox_afterThisAlwaysRaiseValue</tabstop>
|
<tabstop>spinBox_afterThisAlwaysRaiseValue</tabstop>
|
||||||
<tabstop>radioButton_afterThisStayAtLastBlind</tabstop>
|
<tabstop>radioButton_afterThisStayAtLastBlind</tabstop>
|
||||||
<tabstop>buttonBox</tabstop>
|
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../resources/pokerth.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections>
|
<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>
|
<connection>
|
||||||
<sender>radioButton_afterThisAlwaysRaiseAbout</sender>
|
<sender>radioButton_afterThisAlwaysRaiseAbout</sender>
|
||||||
<signal>toggled(bool)</signal>
|
<signal>toggled(bool)</signal>
|
||||||
@@ -361,12 +367,12 @@
|
|||||||
<slot>setEnabled(bool)</slot>
|
<slot>setEnabled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>327</x>
|
<x>663</x>
|
||||||
<y>302</y>
|
<y>349</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>389</x>
|
<x>763</x>
|
||||||
<y>304</y>
|
<y>353</y>
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
@@ -377,12 +383,28 @@
|
|||||||
<slot>setEnabled(bool)</slot>
|
<slot>setEnabled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>297</x>
|
<x>706</x>
|
||||||
<y>116</y>
|
<y>154</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>306</x>
|
<x>310</x>
|
||||||
<y>164</y>
|
<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>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
|||||||
@@ -131,12 +131,19 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_login">
|
<widget class="QPushButton" name="pushButton_login">
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QObject {font: bold 30px}</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Login</string>
|
<string>Login</string>
|
||||||
</property>
|
</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">
|
<property name="autoDefault">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
@@ -206,7 +213,9 @@
|
|||||||
<tabstop>checkBox_guest</tabstop>
|
<tabstop>checkBox_guest</tabstop>
|
||||||
<tabstop>pushButton_login</tabstop>
|
<tabstop>pushButton_login</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../resources/pokerth.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>pushButton_login</sender>
|
<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"
|
#include "soundevents.h"
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
#include "androidaudio.h"
|
#ifdef ANDROID_API8
|
||||||
|
#include "androidapi8dummy.h"
|
||||||
|
#else
|
||||||
|
#include "androidaudio.h"
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include "sdlplayer.h"
|
#include "sdlplayer.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -18,7 +22,11 @@ SoundEvents::SoundEvents(ConfigFile *c): myConfig(c), lastSBValue(0), lastSBLeve
|
|||||||
{
|
{
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
myPlayer = new AndroidAudio(myConfig);
|
#ifdef ANDROID_API8
|
||||||
|
myPlayer = new AndroidApi8Dummy(myConfig);
|
||||||
|
#else
|
||||||
|
myPlayer = new AndroidAudio(myConfig);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
myPlayer = new SDLPlayer(myConfig);
|
myPlayer = new SDLPlayer(myConfig);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -3,9 +3,12 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
class AndroidAudio;
|
#ifdef ANDROID_API8
|
||||||
|
class AndroidApi8Dummy;
|
||||||
|
#else
|
||||||
|
class AndroidAudio;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
class SDLPlayer;
|
class SDLPlayer;
|
||||||
#endif
|
#endif
|
||||||
@@ -31,7 +34,11 @@ protected:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
AndroidAudio *myPlayer;
|
#ifdef ANDROID_API8
|
||||||
|
AndroidApi8Dummy *myPlayer;
|
||||||
|
#else
|
||||||
|
AndroidAudio *myPlayer;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
SDLPlayer *myPlayer;
|
SDLPlayer *myPlayer;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user