diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-08-17 19:01:26 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-08-17 19:01:26 +0400 |
commit | 37f9d916fab04a96441771d38ecca428456cd47b (patch) | |
tree | a3c1bd3622e6b35b338d0cbce71c437bfdf1cd0f /intern/ghost | |
parent | feb7afe671bb4932ebbbecc2a4cfbc3aa4516366 (diff) |
Fix #28265: blender 2.59 not starting on OS X with old ndof driver.
Patch by Jens Verwiebe.
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_NDOFManagerCocoa.h | 1 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_NDOFManagerCocoa.mm | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_NDOFManagerCocoa.h b/intern/ghost/intern/GHOST_NDOFManagerCocoa.h index e9897f30104..5e85808b5a6 100644 --- a/intern/ghost/intern/GHOST_NDOFManagerCocoa.h +++ b/intern/ghost/intern/GHOST_NDOFManagerCocoa.h @@ -43,6 +43,7 @@ public: // whether multi-axis functionality is available (via the OS or driver) // does not imply that a device is plugged in or being used bool available(); + bool oldDRV(); private: unsigned short m_clientID; diff --git a/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm b/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm index 409ed953134..f665f5f6b39 100644 --- a/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm +++ b/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm @@ -143,7 +143,7 @@ GHOST_NDOFManagerCocoa::GHOST_NDOFManagerCocoa(GHOST_System& sys) // printf("ndof: client id = %d\n", m_clientID); - if (SetConnexionClientButtonMask != NULL) { + if (oldDRV()) { has_old_driver = false; SetConnexionClientButtonMask(m_clientID, kConnexionMaskAllButtons); } @@ -176,5 +176,14 @@ extern "C" { return InstallConnexionHandlers != NULL; // this means that the driver is installed and dynamically linked to blender } + + bool GHOST_NDOFManagerCocoa::oldDRV() + { + extern OSErr SetConnexionClientButtonMask() __attribute__((weak_import)); + // 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 + return SetConnexionClientButtonMask != NULL; + // this means that the driver has this symbol + } } #endif // WITH_INPUT_NDOF |