[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39495] trunk/blender/intern/ghost/intern: Fix #28265: blender 2.59 not starting on OS X with old ndof driver.
Brecht Van Lommel
brechtvanlommel at pandora.be
Wed Aug 17 17:01:27 CEST 2011
Revision: 39495
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39495
Author: blendix
Date: 2011-08-17 15:01:26 +0000 (Wed, 17 Aug 2011)
Log Message:
-----------
Fix #28265: blender 2.59 not starting on OS X with old ndof driver.
Patch by Jens Verwiebe.
Modified Paths:
--------------
trunk/blender/intern/ghost/intern/GHOST_NDOFManagerCocoa.h
trunk/blender/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
Modified: trunk/blender/intern/ghost/intern/GHOST_NDOFManagerCocoa.h
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_NDOFManagerCocoa.h 2011-08-17 14:43:11 UTC (rev 39494)
+++ trunk/blender/intern/ghost/intern/GHOST_NDOFManagerCocoa.h 2011-08-17 15:01:26 UTC (rev 39495)
@@ -43,6 +43,7 @@
// 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;
Modified: trunk/blender/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm 2011-08-17 14:43:11 UTC (rev 39494)
+++ trunk/blender/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm 2011-08-17 15:01:26 UTC (rev 39495)
@@ -143,7 +143,7 @@
// 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 @@
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
More information about the Bf-blender-cvs
mailing list