summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_protocol_sc/ftnoir_protocol_sc.cpp')
-rw-r--r--ftnoir_protocol_sc/ftnoir_protocol_sc.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
index 8449f6ce..9c144b5d 100644
--- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
+++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
@@ -149,7 +149,12 @@ public:
actx.cbSize = sizeof(ACTCTXA);
actx.lpResourceName = MAKEINTRESOURCEA(resid);
actx.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID;
- QString path = QCoreApplication::applicationDirPath() + "/opentrack-proto-simconnect.dll";
+#ifdef _MSC_VER
+# define PREFIX ""
+#else
+# define PREFIX "lib"
+#endif
+ QString path = QCoreApplication::applicationDirPath() + "/" PREFIX "opentrack-proto-simconnect.dll";
QByteArray name = QFile::encodeName(path);
actx.lpSource = name.constData();
hactctx = CreateActCtxA(&actx);
@@ -194,6 +199,7 @@ bool FTNoIR_Protocol::checkServerInstallationOK()
ActivationContext ctx(142 + act);
+ SCClientLib.setFileName("SimConnect.dll");
if (!SCClientLib.load()) {
qDebug() << "SC load" << SCClientLib.errorString();
return false;