Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2011-08-23 00:31:46 +0400
committerJoerg Mueller <nexyon@gmail.com>2011-08-23 00:31:46 +0400
commitf0d5abfcb2b54f6fd7a24220e81e0c88a914d87f (patch)
tree328a631d447ea7c7be2a757d092065c721090f82 /intern
parent1d529d83a0693693878749110a05d8b0fa929d0f (diff)
parent6a374d266d8213629f74a9f4c9a4984ddf59ef4c (diff)
Merging trunk up to r39637.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/SConscript4
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerCocoa.h1
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerCocoa.mm11
3 files changed, 13 insertions, 3 deletions
diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript
index 234fc0a172e..82f65c1c8ae 100644
--- a/intern/ghost/SConscript
+++ b/intern/ghost/SConscript
@@ -26,7 +26,7 @@ if env['WITH_GHOST_SDL']:
pass
incs += ' ' + env['BF_SDL_INC']
defs += ['WITH_GHOST_SDL']
-elif window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'irix6', 'aix4', 'aix5'):
+elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'irix6', 'aix4', 'aix5'):
for f in pf:
try:
sources.remove('intern' + os.sep + f + 'Win32.cpp')
@@ -81,7 +81,7 @@ else:
if env['WITH_BF_3DMOUSE']:
defs.append('WITH_INPUT_NDOF')
- if env['OURPLATFORM']=='linux2':
+ if env['OURPLATFORM']=='linux':
incs += ' ' + env['BF_3DMOUSE_INC']
else:
sources.remove('intern' + os.sep + 'GHOST_NDOFManager.cpp')
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