mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Bit of cleanup
This commit is contained in:
parent
137a2c1c48
commit
68a72b0f41
1 changed files with 7 additions and 9 deletions
|
@ -20,6 +20,10 @@
|
||||||
|
|
||||||
#include "InputPluginsLogging.h"
|
#include "InputPluginsLogging.h"
|
||||||
|
|
||||||
|
#ifndef SIXENSE_LIB_FILENAME
|
||||||
|
#define SIXENSE_LIB_FILENAME QCoreApplication::applicationDirPath() + "/../Frameworks/libsixense_x64"
|
||||||
|
#endif
|
||||||
|
|
||||||
using Library = std::unique_ptr<QLibrary>;
|
using Library = std::unique_ptr<QLibrary>;
|
||||||
static Library SIXENSE;
|
static Library SIXENSE;
|
||||||
|
|
||||||
|
@ -41,15 +45,9 @@ Callable resolve(const Library& library, const char* name) {
|
||||||
|
|
||||||
|
|
||||||
void loadSixense() {
|
void loadSixense() {
|
||||||
if (!SIXENSE) {
|
Q_ASSERT_X(!(SIXENSE && SIXENSE->isLoaded()), __FUNCTION__, "Sixense library already loaded");
|
||||||
static const QString LIBRARY_PATH =
|
SIXENSE.reset(new QLibrary(SIXENSE_LIB_FILENAME));
|
||||||
#ifdef SIXENSE_LIB_FILENAME
|
Q_CHECK_PTR(SIXENSE);
|
||||||
SIXENSE_LIB_FILENAME;
|
|
||||||
#else
|
|
||||||
QCoreApplication::applicationDirPath() + "/../Frameworks/libsixense_x64";
|
|
||||||
#endif
|
|
||||||
SIXENSE.reset(new QLibrary(LIBRARY_PATH));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SIXENSE->load()){
|
if (SIXENSE->load()){
|
||||||
qDebug() << "Loaded sixense library for hydra support -" << SIXENSE->fileName();
|
qDebug() << "Loaded sixense library for hydra support -" << SIXENSE->fileName();
|
||||||
|
|
Loading…
Reference in a new issue