summaryrefslogtreecommitdiffhomepage
path: root/proto-ft/ftnoir_protocol_ft.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-12-09 17:59:57 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-12-09 17:59:57 +0100
commit89f104782e673cfacec0eab016dc22a51533f113 (patch)
tree9fe9dfdbcf1051a49d749a5d77daa8260faa3948 /proto-ft/ftnoir_protocol_ft.h
parent61bf0f0ec4b836981b39910f4719cc526da5c415 (diff)
proto/freetrack: cleanup
- set zeros in shm, for NPClient.dll tracking detection - remove tirviews support - remove registry cleanup on exit support
Diffstat (limited to 'proto-ft/ftnoir_protocol_ft.h')
-rw-r--r--proto-ft/ftnoir_protocol_ft.h40
1 files changed, 12 insertions, 28 deletions
diff --git a/proto-ft/ftnoir_protocol_ft.h b/proto-ft/ftnoir_protocol_ft.h
index e2faacf3..e01c08e2 100644
--- a/proto-ft/ftnoir_protocol_ft.h
+++ b/proto-ft/ftnoir_protocol_ft.h
@@ -7,43 +7,32 @@
*/
#pragma once
+
#include "ui_ftnoir_ftcontrols.h"
-#include "api/plugin-api.hpp"
-#include <QMessageBox>
-#include <QSettings>
-#include <QLibrary>
-#include <QProcess>
-#include <QDebug>
-#include <QFile>
-#include <QString>
-#include <QMutex>
-#include <QMutexLocker>
-#include <cinttypes>
#include "freetrackclient/fttypes.h"
#include "compat/shm.h"
#include "options/options.hpp"
-#include "mutex.hpp"
+#include "api/plugin-api.hpp"
+#include <QProcess>
+#include <QString>
+#include <QMutex>
+
+#include <cinttypes>
#include <memory>
using namespace options;
struct settings : opts {
value<int> intUsedInterface;
- value<bool> useTIRViews, close_protocols_on_exit;
settings() :
opts("proto-freetrack"),
- intUsedInterface(b, "used-interfaces", 0),
- useTIRViews(b, "use-memory-hacks", false),
- close_protocols_on_exit(b, "close-protocols-on-exit", false)
+ intUsedInterface(b, "used-interfaces", 0)
{}
};
-typedef void (__stdcall *importTIRViewsStart)(void);
-typedef void (__stdcall *importTIRViewsStop)(void);
-
class freetrack : public IProtocol
{
public:
@@ -57,20 +46,15 @@ public:
}
private:
settings s;
- shm_wrapper shm;
- FTHeap volatile *pMemData;
+ shm_wrapper shm { FREETRACK_HEAP, FREETRACK_MUTEX, sizeof(FTHeap) };
+ FTHeap volatile *pMemData { (FTHeap*) shm.ptr() };
- QLibrary FTIRViewsLib;
QProcess dummyTrackIR;
- importTIRViewsStart viewsStart;
- importTIRViewsStop viewsStop;
- int intGameID;
+ int intGameID = -1;
QString connected_game;
QMutex game_name_mutex;
- static check_for_first_run runonce_check;
- void start_tirviews();
void start_dummy();
static float degrees_to_rads(double degrees);
@@ -97,6 +81,6 @@ private slots:
class freetrackDll : public Metadata
{
public:
- QString name() { return QString(QCoreApplication::translate("freetrackDll", "freetrack 2.0 Enhanced")); }
+ QString name() { return otr_tr("freetrack 2.0 Enhanced"); }
QIcon icon() { return QIcon(":/images/freetrack.png"); }
};