Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
2012-12-22 version 1.0-beta1
|
||||
- Support for bigger android screen resolutions enhancement(#160)
|
||||
- Android sound support enhancement (#156)
|
||||
- Online log file analyse tool (#146)
|
||||
- game name in window title enhancement (#155)
|
||||
- new card deck version for bottom action label possibility enhancement (#154)
|
||||
- Emoticons for the chat enhancement (#153)
|
||||
- Show only one game in log preview enhancement (#145)
|
||||
- Extra column in lobby game list for timeouts enhancement (#140)
|
||||
- Update flags enhancement (#137)
|
||||
- Enable Activate the "accidentally call after big raise" blocker by default enhancement (#131)
|
||||
- Server refactoring for libprotobuf usage which basically enables html5 clients
|
||||
- Support for higher android screen resolutions (enhancement #160)
|
||||
- Android sound support (enhancement #156)
|
||||
- Online log file analysis tool (enhancement #146)
|
||||
- Game name in window title (enhancement #155)
|
||||
- New card deck version which supports changes of the action label position (enhancement #154)
|
||||
- Emoticons for the chat (enhancement #153)
|
||||
- Show only one game in the log preview (enhancement #145)
|
||||
- Extra column in lobby game list for timeouts (enhancement #140)
|
||||
- Updated country flags (enhancement #137)
|
||||
- Enable activating the "accidentally call after big raise" blocker by default (enhancement #131)
|
||||
- Server refactoring using google protocol buffers which basically enables use of html5 clients
|
||||
- Chatbot whitelist for poker expressions
|
||||
- BUGFIX: Rich AI players raise although opponents are all-in bug (#4)
|
||||
- BUGFIX: In rare case, winner doesn't win, money disappears (#3)
|
||||
- BUGFIX: Chip Miscalculation bug (#152)
|
||||
- BUGFIX: IPv6 setting grayed out bug (#148)
|
||||
- BUGFIX: Rich AI players raise although opponents are all-in (bug #4)
|
||||
- BUGFIX: In rare case, winner doesn't win, money disappears (bug #3)
|
||||
- BUGFIX: Chip Miscalculation fixed (bug #152)
|
||||
- BUGFIX: IPv6 settings are now correctly grayed out (bug #148)
|
||||
- BUGFIX: Fixing rejoin after synchronization error (bug #147)
|
||||
|
||||
2012-06-21 version 0.9.5
|
||||
- First experimental Android release (#80)
|
||||
|
||||
@@ -578,6 +578,7 @@ mac {
|
||||
-lssl \
|
||||
-lsqlite3 \
|
||||
-ltinyxml \
|
||||
-lprotobuf \
|
||||
-lz \
|
||||
-framework \
|
||||
Carbon
|
||||
@@ -657,4 +658,7 @@ maemo{
|
||||
android_test{
|
||||
DEFINES += ANDROID
|
||||
DEFINES += ANDROID_TEST
|
||||
DEFINES += ANDROID_API8
|
||||
HEADERS += src/gui/qt/sound/androidapi8dummy.h
|
||||
SOURCES += src/gui/qt/sound/androidapi8dummy.cpp
|
||||
}
|
||||
|
||||
@@ -490,7 +490,7 @@ void LocalHand::setBlinds()
|
||||
|
||||
(*it_c)->setMySet((*it_c)->getMyCash());
|
||||
// 1 to do not log this
|
||||
(*it_c)->setMyAction(PLAYER_ACTION_ALLIN,1);
|
||||
(*it_c)->setMyAction(PLAYER_ACTION_ALLIN);
|
||||
|
||||
} else {
|
||||
(*it_c)->setMySet(smallBlind);
|
||||
@@ -510,7 +510,7 @@ void LocalHand::setBlinds()
|
||||
|
||||
(*it_c)->setMySet((*it_c)->getMyCash());
|
||||
// 1 to do not log this
|
||||
(*it_c)->setMyAction(PLAYER_ACTION_ALLIN,1);
|
||||
(*it_c)->setMyAction(PLAYER_ACTION_ALLIN);
|
||||
|
||||
} else {
|
||||
(*it_c)->setMySet(2*smallBlind);
|
||||
@@ -526,7 +526,7 @@ void LocalHand::switchRounds()
|
||||
// logging last player action
|
||||
PlayerListConstIterator previousPlayerIt = getRunningPlayerIt(previousPlayerID);
|
||||
if(previousPlayerIt != runningPlayerList->end()) {
|
||||
if(myLog) myLog->logPlayerAction((*previousPlayerIt)->getMyName(),myLog->transformPlayerActionLog((*previousPlayerIt)->getMyAction()),(*previousPlayerIt)->getMySet());
|
||||
if(myLog) myLog->logPlayerAction((*previousPlayerIt)->getMyName(),myLog->transformPlayerActionLog((*previousPlayerIt)->getMyAction()),(*previousPlayerIt)->getMyLastRelativeSet());
|
||||
}
|
||||
|
||||
PlayerListIterator it, it_1;
|
||||
|
||||
@@ -1068,7 +1068,7 @@ void LocalPlayer::action()
|
||||
//set that i was the last active player. need this for unhighlighting groupbox
|
||||
currentHand->setPreviousPlayerID(myID);
|
||||
|
||||
currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, mySet);
|
||||
currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, myLastRelativeSet);
|
||||
currentHand->getGuiInterface()->nextPlayerAnimation();
|
||||
|
||||
// cout << "playerID in action(): " << (*(currentHand->getCurrentBeRo()->getCurrentPlayersTurnIt()))->getMyID() << endl;
|
||||
@@ -3230,14 +3230,12 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
case 3: {
|
||||
// all in
|
||||
if(highestSet >= myCash + mySet) {
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
setMySet(myCash);
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - highestSet + mySet;
|
||||
mySet = highestSet;
|
||||
setMySet(highestSet-mySet);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -3250,16 +3248,14 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
currentHand->getCurrentBeRo()->setFullBetRule(true);
|
||||
}
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(myCash);
|
||||
mySet = myCash;
|
||||
myCash = 0;
|
||||
setMySet(myCash);
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
highestSet = mySet;
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(bet);
|
||||
myCash = myCash - bet;
|
||||
mySet = bet;
|
||||
setMySet(bet);
|
||||
highestSet = mySet;
|
||||
|
||||
}
|
||||
@@ -3272,14 +3268,12 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
if(currentHand->getCurrentBeRo()->getFullBetRule()) { // full bet rule -> only call possible
|
||||
// all in
|
||||
if(highestSet >= myCash + mySet) {
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
setMySet(myCash);
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - highestSet + mySet;
|
||||
mySet = highestSet;
|
||||
setMySet(highestSet-mySet);
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
} else {
|
||||
@@ -3292,8 +3286,7 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
// perhaps full bet rule
|
||||
if(highestSet >= myCash + mySet) {
|
||||
// only call all-in
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
setMySet(myCash);
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
} else {
|
||||
// raise, but not enough --> full bet rule
|
||||
@@ -3301,9 +3294,8 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
// lastPlayerAction für Karten umblättern reihenfolge setzrn
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
|
||||
mySet += myCash;
|
||||
setMySet(myCash);
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(mySet-highestSet);
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
highestSet = mySet;
|
||||
}
|
||||
@@ -3311,9 +3303,8 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
// lastPlayerAction für Karten umblättern reihenfolge setzrn
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
|
||||
mySet += myCash;
|
||||
setMySet(myCash);
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(mySet-highestSet);
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
highestSet = mySet;
|
||||
}
|
||||
@@ -3321,8 +3312,7 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
// sonst
|
||||
else {
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(raise);
|
||||
myCash = myCash + mySet - highestSet - raise;
|
||||
mySet = highestSet + raise;
|
||||
setMySet(highestSet+raise-mySet);
|
||||
highestSet = mySet;
|
||||
// lastPlayerAction für Karten umblättern reihenfolge setzrn
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
|
||||
@@ -113,10 +113,10 @@ public:
|
||||
return myLastRelativeSet;
|
||||
}
|
||||
|
||||
void setMyAction(PlayerAction theValue, bool blind = 0) {
|
||||
void setMyAction(PlayerAction theValue, bool human = 0) {
|
||||
myAction = theValue;
|
||||
// logging for human player
|
||||
if(myAction && !blind) currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, mySet);
|
||||
// logging for seat 0
|
||||
if(myAction && human) currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, myLastRelativeSet);
|
||||
}
|
||||
PlayerAction getMyAction() const {
|
||||
return myAction;
|
||||
|
||||
@@ -195,7 +195,7 @@ ClientPlayer::getMyLastRelativeSet() const
|
||||
}
|
||||
|
||||
void
|
||||
ClientPlayer::setMyAction(PlayerAction theValue, bool /*blind*/)
|
||||
ClientPlayer::setMyAction(PlayerAction theValue, bool /*human*/)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
myAction = theValue;
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
int getMySet() const;
|
||||
int getMyLastRelativeSet() const;
|
||||
|
||||
void setMyAction(PlayerAction theValue, bool blind);
|
||||
void setMyAction(PlayerAction theValue, bool human);
|
||||
PlayerAction getMyAction() const;
|
||||
|
||||
void setMyButton(int theValue);
|
||||
|
||||
@@ -62,8 +62,8 @@ public:
|
||||
virtual int getMySet() const =0;
|
||||
virtual int getMyLastRelativeSet() const =0;
|
||||
|
||||
virtual void setMyAction(PlayerAction theValue, bool blind=0) =0;
|
||||
virtual PlayerAction getMyAction() const =0;
|
||||
virtual void setMyAction(PlayerAction theValue, bool human=0) =0;
|
||||
virtual PlayerAction getMyAction() const =0;
|
||||
|
||||
virtual void setMyButton(int theValue) =0;
|
||||
virtual int getMyButton() const =0;
|
||||
|
||||
@@ -103,6 +103,21 @@ enum PlayerActionLog {
|
||||
LOG_ACTION_JOIN // has joined the game
|
||||
};
|
||||
|
||||
#define LOG_UPLOAD_ID_SIZE 40
|
||||
|
||||
enum LogUploadErrorCode {
|
||||
LOG_UPLOAD_ERROR_NO_FILE = 1,
|
||||
LOG_UPLOAD_ERROR_OPEN_DB = 2,
|
||||
LOG_UPLOAD_ERROR_MAX_NUM_TOTAL = 3,
|
||||
LOG_UPLOAD_ERROR_MAX_NUM_IP = 4,
|
||||
LOG_UPLOAD_ERROR_FILE_SIZE = 5,
|
||||
LOG_UPLOAD_ERROR_FILE_EXT = 6,
|
||||
LOG_UPLOAD_ERROR_FILE_HEAD = 7,
|
||||
LOG_UPLOAD_ERROR_ID = 8,
|
||||
LOG_UPLOAD_ERROR_FILE_MOVE = 9,
|
||||
LOG_UPLOAD_ERROR_INSERT_DB = 10
|
||||
};
|
||||
|
||||
enum DenyKickPlayerReason {
|
||||
KICK_DENIED_INVALID_STATE = 0,
|
||||
KICK_DENIED_TOO_FEW_PLAYERS,
|
||||
|
||||
@@ -21,8 +21,10 @@
|
||||
#include <QtCore>
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <QPlatformNativeInterface>
|
||||
#include <jni.h>
|
||||
#ifndef ANDROID_TEST
|
||||
#include <QPlatformNativeInterface>
|
||||
#include <jni.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
|
||||
|
||||
@@ -97,9 +97,9 @@ void changeCompleteBlindsDialogImpl::sortBlindsList()
|
||||
|
||||
bool changeCompleteBlindsDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
|
||||
|
||||
#ifdef ANDROID
|
||||
//androi changes for return key behavior (hopefully useless from necessitas beta2)
|
||||
if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Return) {
|
||||
if(spinBox_afterThisAlwaysRaiseValue->hasFocus()) {
|
||||
|
||||
@@ -113,9 +113,9 @@ void changeContentDialogImpl::saveContent()
|
||||
|
||||
bool changeContentDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
|
||||
|
||||
#ifdef ANDROID
|
||||
//androi changes for return key behavior (hopefully useless from necessitas beta2)
|
||||
if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Return) {
|
||||
if(lineEdit->hasFocus()) {
|
||||
|
||||
@@ -235,9 +235,9 @@ void createInternetGameDialogImpl::gameTypeChanged()
|
||||
|
||||
bool createInternetGameDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
|
||||
|
||||
#ifdef ANDROID
|
||||
//androi changes for return key behavior (hopefully useless from necessitas beta2)
|
||||
if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Return) {
|
||||
if(spinBox_startCash->hasFocus()) {
|
||||
|
||||
@@ -132,9 +132,9 @@ void createNetworkGameDialogImpl::callChangeBlindsDialog(bool show)
|
||||
|
||||
bool createNetworkGameDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
|
||||
|
||||
#ifdef ANDROID
|
||||
//androi changes for return key behavior (hopefully useless from necessitas beta2)
|
||||
if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Return) {
|
||||
if(spinBox_startCash ->hasFocus()) {
|
||||
|
||||
@@ -1990,7 +1990,7 @@ void gameTableImpl::myFold()
|
||||
|
||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
||||
boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front();
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_FOLD);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_FOLD,true);
|
||||
humanPlayer->setMyTurn(0);
|
||||
|
||||
//set that i was the last active player. need this for unhighlighting groupbox
|
||||
@@ -2009,7 +2009,7 @@ void gameTableImpl::myCheck()
|
||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
||||
boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front();
|
||||
humanPlayer->setMyTurn(0);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_CHECK);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_CHECK,true);
|
||||
|
||||
//set that i was the last active player. need this for unhighlighting groupbox
|
||||
currentHand->setPreviousPlayerID(0);
|
||||
@@ -2072,10 +2072,10 @@ void gameTableImpl::myCall()
|
||||
|
||||
humanPlayer->setMySet(humanPlayer->getMyCash());
|
||||
humanPlayer->setMyCash(0);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN,true);
|
||||
} else {
|
||||
humanPlayer->setMySet(tempHighestSet - humanPlayer->getMySet());
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_CALL);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_CALL,true);
|
||||
}
|
||||
humanPlayer->setMyTurn(0);
|
||||
|
||||
@@ -2108,7 +2108,7 @@ void gameTableImpl::mySet()
|
||||
|
||||
humanPlayer->setMySet(humanPlayer->getMyCash());
|
||||
humanPlayer->setMyCash(0);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN,true);
|
||||
|
||||
// full bet rule
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() + currentHand->getCurrentBeRo()->getMinimumRaise() > humanPlayer->getMySet()) {
|
||||
@@ -2119,7 +2119,7 @@ void gameTableImpl::mySet()
|
||||
if(myActionIsRaise) {
|
||||
//do not if allIn
|
||||
if(humanPlayer->getMyAction() != 6) {
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_RAISE);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_RAISE,true);
|
||||
}
|
||||
myActionIsRaise = 0;
|
||||
|
||||
@@ -2129,7 +2129,7 @@ void gameTableImpl::mySet()
|
||||
if(myActionIsBet) {
|
||||
//do not if allIn
|
||||
if(humanPlayer->getMyAction() != 6) {
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_BET);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_BET,true);
|
||||
}
|
||||
myActionIsBet = 0;
|
||||
|
||||
@@ -2166,7 +2166,7 @@ void gameTableImpl::myAllIn()
|
||||
|
||||
humanPlayer->setMySet(humanPlayer->getMyCash());
|
||||
humanPlayer->setMyCash(0);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN,true);
|
||||
|
||||
// full bet rule
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() + currentHand->getCurrentBeRo()->getMinimumRaise() > humanPlayer->getMySet()) {
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <sqlite3.h>
|
||||
|
||||
#include "configfile.h"
|
||||
#include <sqlite3.h>
|
||||
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
|
||||
@@ -152,9 +152,9 @@ void internetGameLoginDialogImpl::okButtonCheck()
|
||||
|
||||
bool internetGameLoginDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
|
||||
|
||||
#ifdef ANDROID
|
||||
//androi changes for return key behavior (hopefully useless from necessitas beta2)
|
||||
if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Return) {
|
||||
if(lineEdit_username->hasFocus()) {
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "guilog.h"
|
||||
#include "configfile.h"
|
||||
#include "mymessagebox.h"
|
||||
#include <game_defs.h>
|
||||
#include <net/uploaderthread.h>
|
||||
|
||||
LogFileDialog::LogFileDialog(QWidget *parent, ConfigFile *c) :
|
||||
@@ -223,7 +224,7 @@ void LogFileDialog::uploadFile()
|
||||
|
||||
uploadInProgressAnimationStart();
|
||||
uploader->QueueUpload(
|
||||
"http://pokerth.net/log_file_analysis/upload.php",
|
||||
"http://pokerth.net/log_file_analysis/upload.php",
|
||||
"",
|
||||
"",
|
||||
file.fileName().toStdString(),
|
||||
@@ -260,16 +261,42 @@ void LogFileDialog::showLogAnalysis(QString /*filename*/, QString returnMessage)
|
||||
|
||||
QString id = returnMessage.trimmed();
|
||||
|
||||
if(id.length() == 40 && !id.contains("ERROR")) {
|
||||
if(id.length() == LOG_UPLOAD_ID_SIZE && id.at(0) != '<') {
|
||||
|
||||
qDebug() << id << endl;
|
||||
QDesktopServices::openUrl(QUrl("http://logfile-analysis.pokerth.net/?ID="+id));
|
||||
} else {
|
||||
qDebug() << returnMessage << endl;
|
||||
QString serverMsg(tr("Processing of the log file on the web server failed.\nPlease verify that you are uploading a valid PokerTH log file."));
|
||||
// if there is a readable message, display it.
|
||||
if (!returnMessage.isEmpty() && returnMessage.size() < 128) {
|
||||
serverMsg += "\n" + tr("Failure reason: ") + returnMessage;
|
||||
// if there is an error code, display a corresponding message.
|
||||
if (returnMessage.at(0).isDigit()) {
|
||||
serverMsg += "\n" + tr("Failure reason: ");
|
||||
switch (returnMessage.toInt())
|
||||
{
|
||||
case LOG_UPLOAD_ERROR_NO_FILE :
|
||||
serverMsg += tr("No file received.");
|
||||
break;
|
||||
case LOG_UPLOAD_ERROR_MAX_NUM_TOTAL :
|
||||
serverMsg += tr("File rejected because of too many uploads.");
|
||||
break;
|
||||
case LOG_UPLOAD_ERROR_MAX_NUM_IP :
|
||||
serverMsg += tr("File rejected because of too many recent uploads. Please try again later.");
|
||||
break;
|
||||
case LOG_UPLOAD_ERROR_FILE_SIZE :
|
||||
serverMsg += tr("The file is too large.");
|
||||
break;
|
||||
case LOG_UPLOAD_ERROR_FILE_EXT :
|
||||
case LOG_UPLOAD_ERROR_FILE_HEAD :
|
||||
serverMsg += tr("This file is not a valid and current PokerTH log file.");
|
||||
break;
|
||||
case LOG_UPLOAD_ERROR_OPEN_DB :
|
||||
case LOG_UPLOAD_ERROR_ID :
|
||||
case LOG_UPLOAD_ERROR_FILE_MOVE :
|
||||
case LOG_UPLOAD_ERROR_INSERT_DB :
|
||||
default :
|
||||
serverMsg += tr("Internal error. Please try again later. ID: ") + returnMessage;
|
||||
break;
|
||||
}
|
||||
}
|
||||
MyMessageBox::warning(
|
||||
this, tr("Uploading log file"), serverMsg, QMessageBox::Close );
|
||||
|
||||
@@ -84,9 +84,9 @@ void newGameDialogImpl::callChangeBlindsDialog(bool show)
|
||||
|
||||
bool newGameDialogImpl::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
|
||||
|
||||
#ifdef ANDROID
|
||||
//androi changes for return key behavior (hopefully useless from necessitas beta2)
|
||||
if (event->type() == QEvent::KeyPress && keyEvent->key() == Qt::Key_Return) {
|
||||
if(spinBox_gameSpeed->hasFocus()) {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#include "soundevents.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef ANDROID_API8
|
||||
#include "androidapi8dummy.h"
|
||||
#ifdef ANDROID_API8
|
||||
#include "androidapi8dummy.h"
|
||||
#else
|
||||
#include "androidaudio.h"
|
||||
#endif
|
||||
#else
|
||||
#include "androidaudio.h"
|
||||
#endif
|
||||
#else
|
||||
#include "sdlplayer.h"
|
||||
#include "sdlplayer.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ SoundEvents::SoundEvents(ConfigFile *c): myConfig(c), lastSBValue(0), lastSBLeve
|
||||
{
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef ANDROID_API8
|
||||
myPlayer = new AndroidApi8Dummy(myConfig);
|
||||
#else
|
||||
myPlayer = new AndroidAudio(myConfig);
|
||||
#endif
|
||||
#ifdef ANDROID_API8
|
||||
myPlayer = new AndroidApi8Dummy(myConfig);
|
||||
#else
|
||||
myPlayer = new AndroidAudio(myConfig);
|
||||
#endif
|
||||
#else
|
||||
myPlayer = new SDLPlayer(myConfig);
|
||||
#endif
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
#include <string>
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef ANDROID_API8
|
||||
class AndroidApi8Dummy;
|
||||
#ifdef ANDROID_API8
|
||||
class AndroidApi8Dummy;
|
||||
#else
|
||||
class AndroidAudio;
|
||||
#endif
|
||||
#else
|
||||
class AndroidAudio;
|
||||
#endif
|
||||
#else
|
||||
class SDLPlayer;
|
||||
class SDLPlayer;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -34,14 +34,15 @@ protected:
|
||||
private:
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef ANDROID_API8
|
||||
AndroidApi8Dummy *myPlayer;
|
||||
#else
|
||||
AndroidAudio *myPlayer;
|
||||
#endif
|
||||
#ifdef ANDROID_API8
|
||||
AndroidApi8Dummy *myPlayer;
|
||||
#else
|
||||
AndroidAudio *myPlayer;
|
||||
#endif
|
||||
#else
|
||||
SDLPlayer *myPlayer;
|
||||
#endif
|
||||
|
||||
ConfigFile *myConfig;
|
||||
int lastSBValue;
|
||||
unsigned int lastSBLevel;
|
||||
|
||||
@@ -46,6 +46,13 @@
|
||||
#include "logfiledialog.h"
|
||||
#include "guilog.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifndef ANDROID_TEST
|
||||
#include <QPlatformNativeInterface>
|
||||
#include <jni.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
startWindowImpl::startWindowImpl(ConfigFile *c, Log *l)
|
||||
@@ -99,6 +106,21 @@ startWindowImpl::startWindowImpl(ConfigFile *c, Log *l)
|
||||
|
||||
}
|
||||
this->showFullScreen();
|
||||
|
||||
//TODO HACK Missing QSystemScreenSaver::setScreenSaverInhibited(TRUE)
|
||||
#ifndef ANDROID_TEST
|
||||
JavaVM *currVM = (JavaVM *)QApplication::platformNativeInterface()->nativeResourceForWidget("JavaVM", 0);
|
||||
JNIEnv* env;
|
||||
if (currVM->AttachCurrentThread(&env, NULL)<0) {
|
||||
qCritical()<<"AttachCurrentThread failed";
|
||||
} else {
|
||||
// jclass jclassApplicationClass = env->FindClass("android/view/View");
|
||||
// if (jclassApplicationClass) {
|
||||
// env->SetStaticIntField(jclassApplicationClass, env->GetStaticFieldID(jclassApplicationClass,"KEEP_SCREEN_ON", "I"), 1);
|
||||
// }
|
||||
currVM->DetachCurrentThread();
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
// this->menubar->setStyleSheet("QMenuBar { background-color: #4B4B4B; font-size:20px; border-width: 0px;} QMenuBar::item { color: #F0F0F0; }");
|
||||
this->menubar->hide();
|
||||
|
||||
Reference in New Issue
Block a user