Showing the changes to libraries/input-plugins/src/input-plugins (1 of 1 file). Show all
Unified · Split
| @@ -20,6 +20,10 @@ · 19 unmodified lines | |||
| 20 | 20 | ||
| 21 | #include "InputPluginsLogging.h" | 21 | #include "InputPluginsLogging.h" |
| 22 | 22 | ||
| 23 | #ifndef SIXENSE_LIB_FILENAME | ||
| 24 | #define SIXENSE_LIB_FILENAME QCoreApplication::applicationDirPath() + "/../Frameworks/libsixense_x64" | ||
| 25 | #endif | ||
| 26 | |||
| 23 | using Library = std::unique_ptr<QLibrary>; | 27 | using Library = std::unique_ptr<QLibrary>; |
| 24 | static Library SIXENSE; | 28 | static Library SIXENSE; |
| 25 | 29 | ||
| @@ -41,15 +45,9 @@ Callable resolve(const Library& library, const char* name) { · 15 unmodified lines | |||
| 41 | 45 | ||
| 42 | 46 | ||
| 43 | void loadSixense() { | 47 | void loadSixense() { |
| 44 | if (!SIXENSE) { | 48 | Q_ASSERT_X(!(SIXENSE && SIXENSE->isLoaded()), __FUNCTION__, "Sixense library already loaded"); |
| 45 | static const QString LIBRARY_PATH = | 49 | SIXENSE.reset(new QLibrary(SIXENSE_LIB_FILENAME)); |
| 46 | #ifdef SIXENSE_LIB_FILENAME | 50 | Q_CHECK_PTR(SIXENSE); |
| 47 | SIXENSE_LIB_FILENAME; | ||
| 48 | #else | ||
| 49 | QCoreApplication::applicationDirPath() + "/../Frameworks/libsixense_x64"; | ||
| 50 | #endif | ||
| 51 | SIXENSE.reset(new QLibrary(LIBRARY_PATH)); | ||
| 52 | } | ||
| 53 | 51 | ||
| 54 | if (SIXENSE->load()){ | 52 | if (SIXENSE->load()){ |
| 55 | qDebug() << "Loaded sixense library for hydra support -" << SIXENSE->fileName(); | 53 | qDebug() << "Loaded sixense library for hydra support -" << SIXENSE->fileName(); |