From 1ffa97e8258f93a0a0d218fc1785c4b149d15163 Mon Sep 17 00:00:00 2001 From: Joshua Parmenter Date: Sun, 28 Feb 2010 23:02:21 +0000 Subject: [PATCH] update casting for 10.6 usage of Keyboard UGens git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@9905 a380766d-ff14-0410-b294-a243070f3f08 --- common/Source/plugins/KeyboardUGens.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/common/Source/plugins/KeyboardUGens.cpp b/common/Source/plugins/KeyboardUGens.cpp index bc650722f7..935d59726f 100644 --- a/common/Source/plugins/KeyboardUGens.cpp +++ b/common/Source/plugins/KeyboardUGens.cpp @@ -61,6 +61,21 @@ extern "C" ////////////////////////////////////////////////////////////////////////////////////////////////// #if SC_DARWIN +# if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1050) + +void* gstate_update_func(void* arg) +{ + KeyboardUGenGlobalState* gstate = &gKeyStateGlobals; + for (;;) { + Point p; + GetKeys((BigEndianUInt32*)gstate->keys); + usleep(17000); + } + + return 0; +} + +#else void* gstate_update_func(void* arg) { @@ -74,6 +89,8 @@ void* gstate_update_func(void* arg) return 0; } +#endif + #elif defined(SC_WIN32) void* gstate_update_func(void* arg)