mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 20:58:38 +02:00
removing unnecessary weak link
This commit is contained in:
parent
b8f7d4b8c8
commit
a01a4f929f
2 changed files with 2 additions and 12 deletions
|
@ -23,7 +23,6 @@ if (APPLE)
|
||||||
set(3DCONNEXIONCLIENT_FOUND true)
|
set(3DCONNEXIONCLIENT_FOUND true)
|
||||||
set(3DCONNEXIONCLIENT_INCLUDE_DIRS ${3DConnexionClient})
|
set(3DCONNEXIONCLIENT_INCLUDE_DIRS ${3DConnexionClient})
|
||||||
set(3DCONNEXIONCLIENT_LIBRARY ${3DConnexionClient})
|
set(3DCONNEXIONCLIENT_LIBRARY ${3DConnexionClient})
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES LINK_FLAGS "-weak_framework 3DConnexionClient")
|
|
||||||
message(STATUS "Found 3DConnexion at " ${3DConnexionClient})
|
message(STATUS "Found 3DConnexion at " ${3DConnexionClient})
|
||||||
mark_as_advanced(3DCONNEXIONCLIENT_INCLUDE_DIR CONNEXIONCLIENT_LIBRARY)
|
mark_as_advanced(3DCONNEXIONCLIENT_INCLUDE_DIR CONNEXIONCLIENT_LIBRARY)
|
||||||
else ()
|
else ()
|
||||||
|
|
|
@ -872,13 +872,6 @@ void MouseParameters::SetPivotVisibility(PivotVisibility visibility) {
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define WITH_SEPARATE_THREAD false // set to true or false
|
|
||||||
|
|
||||||
// Make the linker happy for the framework check (see link below for more info)
|
|
||||||
// http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html
|
|
||||||
|
|
||||||
extern int16_t SetConnexionHandlers(ConnexionMessageHandlerProc messageHandler, ConnexionAddedHandlerProc addedHandler, ConnexionRemovedHandlerProc removedHandler, bool useSeparateThread) __attribute__((weak_import));
|
|
||||||
|
|
||||||
int fConnexionClientID;
|
int fConnexionClientID;
|
||||||
|
|
||||||
static ConnexionDeviceState lastState;
|
static ConnexionDeviceState lastState;
|
||||||
|
@ -887,20 +880,18 @@ static void DeviceAddedHandler(unsigned int connection);
|
||||||
static void DeviceRemovedHandler(unsigned int connection);
|
static void DeviceRemovedHandler(unsigned int connection);
|
||||||
static void MessageHandler(unsigned int connection, unsigned int messageType, void *messageArgument);
|
static void MessageHandler(unsigned int connection, unsigned int messageType, void *messageArgument);
|
||||||
|
|
||||||
void ConnexionClient::toggleConnexion(bool shouldEnable)
|
void ConnexionClient::toggleConnexion(bool shouldEnable) {
|
||||||
{
|
|
||||||
if (shouldEnable && !ConnexionClient::Is3dmouseAttached()) {
|
if (shouldEnable && !ConnexionClient::Is3dmouseAttached()) {
|
||||||
ConnexionClient::init();
|
ConnexionClient::init();
|
||||||
}
|
}
|
||||||
if (!shouldEnable && ConnexionClient::Is3dmouseAttached()) {
|
if (!shouldEnable && ConnexionClient::Is3dmouseAttached()) {
|
||||||
ConnexionClient::destroy();
|
ConnexionClient::destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnexionClient::init() {
|
void ConnexionClient::init() {
|
||||||
// Make sure the framework is installed
|
// Make sure the framework is installed
|
||||||
if (SetConnexionHandlers != NULL && Menu::getInstance()->isOptionChecked(MenuOption::Connexion)) {
|
if (Menu::getInstance()->isOptionChecked(MenuOption::Connexion)) {
|
||||||
// Install message handler and register our client
|
// Install message handler and register our client
|
||||||
InstallConnexionHandlers(MessageHandler, DeviceAddedHandler, DeviceRemovedHandler);
|
InstallConnexionHandlers(MessageHandler, DeviceAddedHandler, DeviceRemovedHandler);
|
||||||
// Either use this to take over in our application only... does not work
|
// Either use this to take over in our application only... does not work
|
||||||
|
|
Loading…
Reference in a new issue