summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-07-04 21:02:29 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-07-04 21:02:29 +0200
commit2b7252c20154628a463efe6f1fa640ac9be9262e (patch)
treedf6240ac5b7df419b961de631189007a647bcbef
parent909886d1371f6c50421b0ab32ef27b370b6a77c5 (diff)
Remove non-working compatibility shim code
-rw-r--r--ftnoir_csv/csv.cpp6
-rw-r--r--ftnoir_csv/csv.h2
-rw-r--r--ftnoir_protocol_ft/ftnoir_protocol_ft.cpp25
-rw-r--r--ftnoir_protocol_ft/ftnoir_protocol_ft.h3
4 files changed, 10 insertions, 26 deletions
diff --git a/ftnoir_csv/csv.cpp b/ftnoir_csv/csv.cpp
index 2b90788f..26b675fc 100644
--- a/ftnoir_csv/csv.cpp
+++ b/ftnoir_csv/csv.cpp
@@ -102,8 +102,10 @@ QStringList CSV::parseLine(QString line){
return list;
}
-void CSV::getGameData( const QString& gameID, bool& tirviews, bool& dummy, unsigned char* table, QString& gamename)
+void CSV::getGameData( const int id, unsigned char* table, QString& gamename)
{
+ QString gameID = QString::number(id);
+
/* zero table first, in case unknown game is connecting */
memset(table, 0, 8);
QStringList gameLine;
@@ -162,8 +164,6 @@ void CSV::getGameData( const QString& gameID, bool& tirviews, bool& dummy, unsig
table[i] = tmp[i];
qDebug() << gameID << "game-id" << gameLine.at(7);
gamename = gameLine.at(1);
- dummy = fuzz[1] & 0xf;
- tirviews = fuzz[1] & 0xf0;
file.close();
return;
}
diff --git a/ftnoir_csv/csv.h b/ftnoir_csv/csv.h
index af62ffbb..bfbece58 100644
--- a/ftnoir_csv/csv.h
+++ b/ftnoir_csv/csv.h
@@ -31,7 +31,7 @@ public:
static QStringList parseLine(QString line);
void setCodec(const char* codecName);
- static void getGameData( const QString& gameID, bool& tirviews, bool& dummy, unsigned char* table, QString& gamename);
+ static void getGameData(const int gameID, unsigned char* table, QString& gamename);
private:
QIODevice *m_device;
QTextCodec *m_codec;
diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
index 1ee8b49e..d4aa3c49 100644
--- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
+++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
@@ -58,9 +58,6 @@ FTNoIR_Protocol::FTNoIR_Protocol() :
viewsStart = 0;
viewsStop = 0;
- force_dummy = false;
- force_tirviews = false;
-
}
/** destructor **/
@@ -182,14 +179,8 @@ float headRotZ;
//
if (intGameID != pMemData->GameID)
{
- QString gameID = QString::number(pMemData->GameID);
- bool tirviews = false, dummy = false;
QString gamename;
- CSV::getGameData(gameID, tirviews, dummy, pMemData->table, gamename);
- if (tirviews)
- start_tirviews();
- if (dummy)
- start_dummy();
+ CSV::getGameData(pMemData->GameID, pMemData->table, gamename);
pMemData->GameID2 = pMemData->GameID;
intGameID = pMemData->GameID;
QMutexLocker foo(&this->game_name_mutex);
@@ -203,8 +194,7 @@ float headRotZ;
void FTNoIR_Protocol::start_tirviews() {
QString aFileName = QCoreApplication::applicationDirPath() + "/TIRViews.dll";
- if ( QFile::exists( aFileName ) && !force_tirviews ) {
- force_tirviews = true;
+ if ( QFile::exists( aFileName )) {
FTIRViewsLib.setFileName(aFileName);
FTIRViewsLib.load();
@@ -228,13 +218,10 @@ void FTNoIR_Protocol::start_tirviews() {
}
void FTNoIR_Protocol::start_dummy() {
- if (!force_dummy) {
- force_dummy = true;
- QString program = QCoreApplication::applicationDirPath() + "/TrackIR.exe";
- dummyTrackIR.startDetached("\"" + program + "\"");
-
- qDebug() << "FTServer::run() says: TrackIR.exe executed!" << program;
- }
+ QString program = QCoreApplication::applicationDirPath() + "/TrackIR.exe";
+ dummyTrackIR.startDetached("\"" + program + "\"");
+
+ qDebug() << "FTServer::run() says: TrackIR.exe executed!" << program;
}
bool FTNoIR_Protocol::checkServerInstallationOK()
diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.h b/ftnoir_protocol_ft/ftnoir_protocol_ft.h
index 2988de21..f87c7300 100644
--- a/ftnoir_protocol_ft/ftnoir_protocol_ft.h
+++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.h
@@ -77,9 +77,6 @@ private:
int intUsedInterface; // Determine which interface to use (or to hide from the game)
bool useTIRViews; // Needs to be in the Settings dialog
bool useDummyExe;
- bool force_tirviews;
- bool force_dummy;
-
float getRadsFromDegrees ( float degrees ) { return (degrees * 0.017453f); }
void loadSettings();
void start_tirviews();