summaryrefslogtreecommitdiffhomepage
path: root/proto-ft/ftnoir_protocol_ft_dialog.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-06-18 18:27:49 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-06-18 18:48:42 +0200
commite92d209598e115acc9ed7bf90bed61be80238536 (patch)
treef50e95f762d4f6844f0b4d5c13f7ffe60a188903 /proto-ft/ftnoir_protocol_ft_dialog.cpp
parente88c7b29ea9ec9fcd6ac6b15c965085152100d2e (diff)
proto/ft: use explicit atomic load/store
"volatile" is too underspecified. Also cleanup some old code.
Diffstat (limited to 'proto-ft/ftnoir_protocol_ft_dialog.cpp')
-rw-r--r--proto-ft/ftnoir_protocol_ft_dialog.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/proto-ft/ftnoir_protocol_ft_dialog.cpp b/proto-ft/ftnoir_protocol_ft_dialog.cpp
index 36846273..5b3ad3b2 100644
--- a/proto-ft/ftnoir_protocol_ft_dialog.cpp
+++ b/proto-ft/ftnoir_protocol_ft_dialog.cpp
@@ -9,6 +9,7 @@
* copyright notice and this permission notice appear in all copies. *
*/
#include "ftnoir_protocol_ft.h"
+#include "opentrack-library-path.h"
#include <QDebug>
#include <QFileDialog>
@@ -29,17 +30,17 @@ FTControls::FTControls()
tie_setting(s.intUsedInterface, ui.cbxSelectInterface);
- QFile memhacks_pathname(QCoreApplication::applicationDirPath() + "/TIRViews.dll");
+ static const QFile memhacks_pathname(OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH "TIRViews.dll");
if (!memhacks_pathname.exists()) {
- ui.chkTIRViews->setChecked( false );
- ui.chkTIRViews->setEnabled ( false );
+ ui.chkTIRViews->setEnabled(false);
}
else {
- ui.chkTIRViews->setEnabled ( true );
+ ui.chkTIRViews->setEnabled(true);
}
}
-void FTControls::doOK() {
+void FTControls::doOK()
+{
s.b->save();
close();
}
@@ -49,13 +50,18 @@ void FTControls::doCancel()
close();
}
-void FTControls::selectDLL() {
- QString filename = QFileDialog::getOpenFileName( this, tr("Select the desired NPClient DLL"), QCoreApplication::applicationDirPath() + "/NPClient.dll", tr("Dll file (*.dll);;All Files (*)"));
+void FTControls::selectDLL()
+{
+ QString filename = QFileDialog::getOpenFileName(this,
+ tr("Select the desired NPClient DLL"),
+ OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH "/NPClient.dll",
+ tr("Dll file (*.dll);;All Files (*)"));
- if (! filename.isEmpty() ) {
+ if (!filename.isEmpty())
+ {
QSettings node("NaturalPoint", "NATURALPOINT\\NPClient Location");
QFileInfo dllname(filename);
- node.setValue( "Path" , dllname.dir().path() );
+ node.setValue("Path", dllname.dir().path());
}
}