[Opentnl-cvs] tnl/zap osxInput.cpp,1.5,1.6 sfx.cpp,1.36,1.37
Brought to you by:
mark_frohnmayer,
s_alanet
From: Mark F. <mar...@us...> - 2004-09-29 20:40:28
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25393/zap Modified Files: osxInput.cpp sfx.cpp Log Message: Index: osxInput.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/osxInput.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** osxInput.cpp 29 Jun 2004 21:30:21 -0000 1.5 --- osxInput.cpp 29 Sep 2004 20:40:18 -0000 1.6 *************** *** 213,217 **** } ! void InitJoystick() { --- 213,221 ---- } ! enum { ! MaxJoystickNameLen = 256, ! }; ! char gJoystickName[MaxJoystickNameLen + 1] = { 0, }; ! const char *GetJoystickName() { return gJoystickName; } void InitJoystick() { *************** *** 243,246 **** --- 247,263 ---- { CFTypeRef refCF = 0; + refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDProductKey)); + + if(CFGetTypeID(refCF) == CFStringGetTypeID()) + { + CFIndex bufferSize = CFStringGetLength (refCF) + 1; + char * buffer = (char *)malloc (bufferSize); + if (buffer) + { + if (CFStringGetCString (refCF, buffer, bufferSize, CFStringGetSystemEncoding ())) + strncpy(gJoystickName, buffer, MaxJoystickNameLen); + free(buffer); + } + } refCF = CFDictionaryGetValue (hidProperties, CFSTR(kIOHIDPrimaryUsagePageKey)); long usage, usagePage; Index: sfx.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/sfx.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** sfx.cpp 2 Aug 2004 18:11:54 -0000 1.36 --- sfx.cpp 29 Sep 2004 20:40:18 -0000 1.37 *************** *** 294,300 **** alSourcei(source, AL_LOOPING, mProfile->isLooping); ! //alSourcef(source, AL_REFERENCE_DISTANCE,9000); ! //alSourcef(source, AL_ROLLOFF_FACTOR,1); ! //alSourcef(source, AL_MAX_DISTANCE, 10000); updateMovementParams(); --- 294,303 ---- alSourcei(source, AL_LOOPING, mProfile->isLooping); ! #ifdef TNL_OS_MAC_OSX ! // This is a workaround for the broken OS X implementation of AL_NONE distance model. ! alSourcef(source, AL_REFERENCE_DISTANCE,9000); ! alSourcef(source, AL_ROLLOFF_FACTOR,1); ! alSourcef(source, AL_MAX_DISTANCE, 10000); ! #endif updateMovementParams(); |