summaryrefslogtreecommitdiffhomepage
path: root/proto-fsuipc/ftnoir_protocol_fsuipc.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-12-03 22:23:08 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-12-04 12:19:26 +0100
commitb256886a5cb9f2ae3ebda70a2045b19ed9f4233e (patch)
tree4fa1e46de224cf834a05824dc1eb86001bdb3300 /proto-fsuipc/ftnoir_protocol_fsuipc.cpp
parente89709a801e7874bc02c66848c638c6a0ccc85c1 (diff)
api: add status check for modules
Diffstat (limited to 'proto-fsuipc/ftnoir_protocol_fsuipc.cpp')
-rw-r--r--proto-fsuipc/ftnoir_protocol_fsuipc.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/proto-fsuipc/ftnoir_protocol_fsuipc.cpp b/proto-fsuipc/ftnoir_protocol_fsuipc.cpp
index 959408fe..b5259581 100644
--- a/proto-fsuipc/ftnoir_protocol_fsuipc.cpp
+++ b/proto-fsuipc/ftnoir_protocol_fsuipc.cpp
@@ -144,23 +144,14 @@ void fsuipc::pose(const double *headpose ) {
prevRotZ = virtRotZ;
}
-bool fsuipc::correct()
+module_status fsuipc::check_status()
{
- qDebug() << "correct says: Starting Function";
-
- //
- // Load the DLL.
- //
FSUIPCLib.setFileName( s.LocationOfDLL );
- if (FSUIPCLib.load() != true) {
- qDebug() << "correct says: Error loading FSUIPC DLL";
- return false;
- }
- else {
- qDebug() << "correct says: FSUIPC DLL loaded.";
- }
- return true;
+ if (FSUIPCLib.load() != true)
+ return error(QCoreApplication::translate("fsuipc", "Can't load fsuipc at '%1'").arg(s.LocationOfDLL));
+ else
+ return status_ok();
}
OPENTRACK_DECLARE_PROTOCOL(fsuipc, FSUIPCControls, fsuipcDll)