diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-03 22:23:08 +0100 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-04 12:19:26 +0100 | 
| commit | b256886a5cb9f2ae3ebda70a2045b19ed9f4233e (patch) | |
| tree | 4fa1e46de224cf834a05824dc1eb86001bdb3300 /proto-wine | |
| parent | e89709a801e7874bc02c66848c638c6a0ccc85c1 (diff) | |
api: add status check for modules
Diffstat (limited to 'proto-wine')
| -rw-r--r-- | proto-wine/ftnoir_protocol_wine.cpp | 7 | ||||
| -rw-r--r-- | proto-wine/ftnoir_protocol_wine.h | 6 | 
2 files changed, 9 insertions, 4 deletions
diff --git a/proto-wine/ftnoir_protocol_wine.cpp b/proto-wine/ftnoir_protocol_wine.cpp index b1b8ecef..36c01c25 100644 --- a/proto-wine/ftnoir_protocol_wine.cpp +++ b/proto-wine/ftnoir_protocol_wine.cpp @@ -54,9 +54,12 @@ void wine::pose( const double *headpose )      }  } -bool wine::correct() +module_status wine::check_status()  { -    return lck_shm.success(); +    if (lck_shm.success()) +        return status_ok(); +    else +        return error(QCoreApplication::translate("wine", "Can't open shared memory mapping"));  }  OPENTRACK_DECLARE_PROTOCOL(wine, FTControls, wineDll) diff --git a/proto-wine/ftnoir_protocol_wine.h b/proto-wine/ftnoir_protocol_wine.h index e996a2c2..d435ffb6 100644 --- a/proto-wine/ftnoir_protocol_wine.h +++ b/proto-wine/ftnoir_protocol_wine.h @@ -18,9 +18,11 @@ public:      wine();      ~wine() override; -    bool correct() override; +    module_status check_status() override;      void pose(const double* headpose) override; -    QString game_name() override { + +    QString game_name() override +    {          QMutexLocker foo(&game_name_mutex);          return connected_game;      }  | 
