diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-07-05 00:19:03 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-07-05 00:19:03 +0200 |
commit | 30fe442f524e91639e9d5f27d86c2edf290ab9c0 (patch) | |
tree | d5ec865995f07ef419a2c13afaa087ad4f03e599 /ftnoir_protocol_sc/ftnoir_protocol_sc.h | |
parent | 2b7252c20154628a463efe6f1fa640ac9be9262e (diff) |
Robustify SimConnect protocol
- No longer leaks library handle/address space
- Use an activation context instead of hardcoding probable DLL filenames
Diffstat (limited to 'ftnoir_protocol_sc/ftnoir_protocol_sc.h')
-rw-r--r-- | ftnoir_protocol_sc/ftnoir_protocol_sc.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.h b/ftnoir_protocol_sc/ftnoir_protocol_sc.h index 62210d32..c22c36c7 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.h +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.h @@ -30,7 +30,6 @@ #ifndef INCLUDED_SCSERVER_H
#define INCLUDED_SCSERVER_H
#include "facetracknoir/global-settings.h"
-
//
// Prevent the SimConnect manifest from being merged in the application-manifest
// This is necessary to run FaceTrackNoIR on a PC without FSX
@@ -38,11 +37,11 @@ #define SIMCONNECT_H_NOMANIFEST
#define _WIN32_WINNT 0x0502
-#include "Windows.h"
-#include "SimConnect.h"
+#include <Windows.h>
+#include <SimConnect.h>
-#include "..\ftnoir_protocol_base\ftnoir_protocol_base.h"
-#include "ui_FTNoIR_SCcontrols.h"
+#include <..\ftnoir_protocol_base\ftnoir_protocol_base.h>
+#include <ui_FTNoIR_SCcontrols.h>
#include <QMessageBox>
#include <QSettings>
#include <QLibrary>
@@ -92,7 +91,6 @@ public: private:
// Private properties
QString ProgramName;
- QLibrary SCClientLib;
static float virtSCPosX;
static float virtSCPosY;
@@ -121,7 +119,7 @@ private: importSimConnect_AddClientEventToNotificationGroup simconnect_addclienteventtonotificationgroup;
importSimConnect_SetNotificationGroupPriority simconnect_setnotificationgrouppriority;
- static HANDLE hSimConnect; // Handle to SimConnect
+ static HANDLE hSimConnect; // Handle to SimConnect
static void CALLBACK processNextSimconnectEvent(SIMCONNECT_RECV* pData, DWORD cbData, void *pContext);
void loadSettings();
};
|