diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 2ec04056..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -github: [franticrain] - diff --git a/.gitignore b/.gitignore deleted file mode 100644 index f0a93633..00000000 --- a/.gitignore +++ /dev/null @@ -1,171 +0,0 @@ -######################### -# .gitignore file for Xcode4 / OS X Source projects -# -# Version 2.1 -# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects -# -# 2013 updates: -# - fixed the broken "save personal Schemes" -# - added line-by-line explanations for EVERYTHING (some were missing) -# -# NB: if you are storing "built" products, this WILL NOT WORK, -# and you should use a different .gitignore (or none at all) -# This file is for SOURCE projects, where there are many extra -# files that we want to exclude -# -######################### - -# Xcode configuration files used for storing developer information -*.xcconfig - -##### -# OS X temporary files that should never be committed -# -# c.f. http://www.westwind.com/reference/os-x/invisibles.html - -.DS_Store - -# c.f. http://www.westwind.com/reference/os-x/invisibles.html - -.Trashes - -# c.f. http://www.westwind.com/reference/os-x/invisibles.html - -*.swp - -# *.lock - this is used and abused by many editors for many different things. -# For the main ones I use (e.g. Eclipse), it should be excluded -# from source-control, but YMMV - -*.lock - -# -# profile - REMOVED temporarily (on double-checking, this seems incorrect; I can't find it in OS X docs?) -#profile - - -#### -# Xcode temporary files that should never be committed -# -# NB: NIB/XIB files still exist even on Storyboard projects, so we want this... - -*~.nib - - -#### -# Xcode build files - -# -# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData" - -DerivedData/ - -# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build" - -build/ - - -##### -# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups) -# -# This is complicated: -# -# SOMETIMES you need to put this file in version control. -# Apple designed it poorly - if you use "custom executables", they are -# saved in this file. -# 99% of projects do NOT use those, so they do NOT want to version control this file. -# ..but if you're in the 1%, comment out the line "*.pbxuser" - -# .pbxuser: http://lists.apple.com/archives/xcode-users/2004/Jan/msg00193.html - -*.pbxuser - -# .mode1v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html - -*.mode1v3 - -# .mode2v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html - -*.mode2v3 - -# .perspectivev3: http://stackoverflow.com/questions/5223297/xcode-projects-what-is-a-perspectivev3-file - -*.perspectivev3 - -# NB: also, whitelist the default ones, some projects need to use these -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -#### -# Xcode 5 - checkout data -*.xccheckout - -#### -# Xcode 4 - semi-personal settings -# -# -# OPTION 1: --------------------------------- -# throw away ALL personal settings (including custom schemes! -# - unless they are "shared") -# -# NB: this is exclusive with OPTION 2 below -xcuserdata - -# OPTION 2: --------------------------------- -# get rid of ALL personal settings, but KEEP SOME OF THEM -# - NB: you must manually uncomment the bits you want to keep -# -# NB: this *requires* git v1.8.2 or above; you may need to upgrade to latest OS X, -# or manually install git over the top of the OS X version -# NB: this is exclusive with OPTION 1 above -# -#xcuserdata/**/* - -# (requires option 2 above): Personal Schemes -# -#!xcuserdata/**/xcschemes/* - -#### -# XCode 4 workspaces - more detailed -# -# Workspaces are important! They are a core feature of Xcode - don't exclude them :) -# -# Workspace layout is quite spammy. For reference: -# -# /(root)/ -# /(project-name).xcodeproj/ -# project.pbxproj -# /project.xcworkspace/ -# contents.xcworkspacedata -# /xcuserdata/ -# /(your name)/xcuserdatad/ -# UserInterfaceState.xcuserstate -# /xcsshareddata/ -# /xcschemes/ -# (shared scheme name).xcscheme -# /xcuserdata/ -# /(your name)/xcuserdatad/ -# (private scheme).xcscheme -# xcschememanagement.plist -# -# - -#### -# Xcode 4 - Deprecated classes -# -# Allegedly, if you manually "deprecate" your classes, they get moved here. -# -# We're using source-control, so this is a "feature" that we do not want! - -*.moved-aside - -#### -# UNKNOWN: recommended by others, but I can't discover what these files are -# -# ...none. Everything is now explained. - -# Ignore build products -builds/ -*.dmg -*.dmg.zip diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1333a589..00000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: objective-c -compiler: - - clang -os: - - osx -osx_image: - - xcode6.4 -before_install: - - brew update - - brew outdated || brew upgrade -sudo: required -before_install: - - wget "http://s.sudre.free.fr/Software/files/Packages.dmg" - - sudo installer -pkg Packages.dmg -target / - - rm -f Packages.dmg -xcode_workspace: 360Driver.xcworkspace -script: - - ./build.sh \ No newline at end of file diff --git a/360 Driver.xcodeproj/project.pbxproj b/360 Driver.xcodeproj/project.pbxproj deleted file mode 100644 index 57144446..00000000 --- a/360 Driver.xcodeproj/project.pbxproj +++ /dev/null @@ -1,2021 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXAggregateTarget section */ - 55B6383818C10F8E00CE933D /* Whole Driver */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 55B6383918C10F8E00CE933D /* Build configuration list for PBXAggregateTarget "Whole Driver" */; - buildPhases = ( - ); - dependencies = ( - 55B6383D18C10FA200CE933D /* PBXTargetDependency */, - 55B6383F18C10FA200CE933D /* PBXTargetDependency */, - 55B6384118C10FA200CE933D /* PBXTargetDependency */, - 55B6384318C10FA200CE933D /* PBXTargetDependency */, - 55B6384518C10FA200CE933D /* PBXTargetDependency */, - ); - name = "Whole Driver"; - productName = "Whole Driver"; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 3F9B7C0A1A729C1600149949 /* artworks.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3F9B7C091A729C1600149949 /* artworks.xcassets */; }; - 3FE789A01A701F3400FF4065 /* Pref360StyleKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FE7899E1A701F3400FF4065 /* Pref360StyleKit.h */; }; - 3FE789A11A701F3400FF4065 /* Pref360StyleKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FE7899F1A701F3400FF4065 /* Pref360StyleKit.m */; }; - 3FE789A41A701FE200FF4065 /* MyWhole360Controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FE789A21A701FE200FF4065 /* MyWhole360Controller.h */; }; - 3FE789A51A701FE200FF4065 /* MyWhole360Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FE789A31A701FE200FF4065 /* MyWhole360Controller.m */; }; - 3FE789A81A70281200FF4065 /* MyBatteryMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FE789A61A70281200FF4065 /* MyBatteryMonitor.h */; }; - 3FE789A91A70281200FF4065 /* MyBatteryMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FE789A71A70281200FF4065 /* MyBatteryMonitor.m */; }; - 3FE789AC1A70288F00FF4065 /* MyDeadZoneViewer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FE789AA1A70288F00FF4065 /* MyDeadZoneViewer.h */; }; - 3FE789AD1A70288F00FF4065 /* MyDeadZoneViewer.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FE789AB1A70288F00FF4065 /* MyDeadZoneViewer.m */; }; - 3FE789B01A70331C00FF4065 /* MyTrigger.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FE789AE1A70331C00FF4065 /* MyTrigger.h */; }; - 3FE789B11A70331C00FF4065 /* MyTrigger.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FE789AF1A70331C00FF4065 /* MyTrigger.m */; }; - 551CDFF9196EEE76000869B6 /* Pref360ControlPref.xib in Resources */ = {isa = PBXBuildFile; fileRef = 551CDFFB196EEE76000869B6 /* Pref360ControlPref.xib */; }; - 553BDB44196DF3BA00D1F569 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 553BDB43196DF3BA00D1F569 /* IOKit.framework */; }; - 553BDB45196DF41500D1F569 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 553BDB43196DF3BA00D1F569 /* IOKit.framework */; }; - 553BDB46196DF41600D1F569 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 553BDB43196DF3BA00D1F569 /* IOKit.framework */; }; - 55699CD61971D96E00C40A31 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 55699CD51971D96E00C40A31 /* Images.xcassets */; }; - 55699CD71971DA8100C40A31 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 55699CD51971D96E00C40A31 /* Images.xcassets */; }; - 55750C09190AFB5B0047FF41 /* DaemonLEDs.m in Sources */ = {isa = PBXBuildFile; fileRef = 55750C08190AFB5B0047FF41 /* DaemonLEDs.m */; }; - 5579514B1F7300EE001880D1 /* XBOBTFF.plugin in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5579513E1F73006F001880D1 /* XBOBTFF.plugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 5579514C1F7301F9001880D1 /* FFDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 557951451F7300C9001880D1 /* FFDriver.cpp */; }; - 5579514D1F73021A001880D1 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55B6375818C109E600CE933D /* ForceFeedback.framework */; }; - 557951501F73037B001880D1 /* FeedbackXBOEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5579514E1F73037B001880D1 /* FeedbackXBOEffect.cpp */; }; - 557951511F730CA3001880D1 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 553BDB43196DF3BA00D1F569 /* IOKit.framework */; }; - 557951521F730CAF001880D1 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55B6372018C108A500CE933D /* CoreFoundation.framework */; }; - 55852E1F18D6B5580009BF55 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 55852E2118D6B5580009BF55 /* Localizable.strings */; }; - 55A2B8D518C116BD006829A2 /* 360Daemon.m in Sources */ = {isa = PBXBuildFile; fileRef = 55B637C718C10CB400CE933D /* 360Daemon.m */; }; - 55A2B8D818C116E0006829A2 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 55A2B8DA18C116E0006829A2 /* Localizable.strings */; }; - 55A2B8DD18C11A2F006829A2 /* com.mice.360Daemon.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 55B637CD18C10CB400CE933D /* com.mice.360Daemon.plist */; }; - 55B636B818C104DB00CE933D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55B636B718C104DB00CE933D /* Cocoa.framework */; }; - 55B636C218C104DB00CE933D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 55B636C018C104DB00CE933D /* InfoPlist.strings */; }; - 55B6371618C1058E00CE933D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 55B636F918C1054F00CE933D /* InfoPlist.strings */; }; - 55B6371718C105B800CE933D /* _60Controller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55B636EF18C1054F00CE933D /* _60Controller.cpp */; }; - 55B6371A18C105B800CE933D /* Controller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55B636F618C1054F00CE933D /* Controller.cpp */; }; - 55B6372118C108A500CE933D /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55B6372018C108A500CE933D /* CoreFoundation.framework */; }; - 55B6373C18C108D200CE933D /* devlink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55B6372D18C108D200CE933D /* devlink.cpp */; }; - 55B6373D18C108D200CE933D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 55B6372F18C108D200CE933D /* InfoPlist.strings */; }; - 55B6373E18C108D200CE933D /* Feedback360.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55B6373118C108D200CE933D /* Feedback360.cpp */; }; - 55B6373F18C108D200CE933D /* Feedback360Effect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55B6373618C108D200CE933D /* Feedback360Effect.cpp */; }; - 55B6374F18C1098D00CE933D /* _60Controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B636F018C1054F00CE933D /* _60Controller.h */; }; - 55B6375318C1098D00CE933D /* Controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B636F718C1054F00CE933D /* Controller.h */; }; - 55B6375418C1098D00CE933D /* ControlStruct.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B636F818C1054F00CE933D /* ControlStruct.h */; }; - 55B6375518C1098D00CE933D /* xbox360hid.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B636FD18C1054F00CE933D /* xbox360hid.h */; }; - 55B6375718C1099F00CE933D /* Feedback360.plugin in Copy PlugIns */ = {isa = PBXBuildFile; fileRef = 55B6371F18C108A500CE933D /* Feedback360.plugin */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 55B6375918C109E600CE933D /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55B6375818C109E600CE933D /* ForceFeedback.framework */; }; - 55B6377218C10A5400CE933D /* DriverTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 55B6376C18C10A5400CE933D /* DriverTool.m */; }; - 55B6377618C10ACC00CE933D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55B636BC18C104DB00CE933D /* Foundation.framework */; }; - 55B6377E18C10B0B00CE933D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55B636B718C104DB00CE933D /* Cocoa.framework */; }; - 55B6378018C10B0B00CE933D /* PreferencePanes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55B6377F18C10B0B00CE933D /* PreferencePanes.framework */; }; - 55B6378618C10B0B00CE933D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 55B6378418C10B0B00CE933D /* InfoPlist.strings */; }; - 55B637AA18C10C0C00CE933D /* DeviceItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B6379A18C10C0C00CE933D /* DeviceItem.h */; }; - 55B637AB18C10C0C00CE933D /* DeviceItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 55B6379B18C10C0C00CE933D /* DeviceItem.m */; }; - 55B637AC18C10C0C00CE933D /* DeviceLister.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B6379C18C10C0C00CE933D /* DeviceLister.h */; }; - 55B637AD18C10C0C00CE933D /* DeviceLister.m in Sources */ = {isa = PBXBuildFile; fileRef = 55B6379D18C10C0C00CE933D /* DeviceLister.m */; }; - 55B637B818C10C0C00CE933D /* Pref360ControlPref.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B637A818C10C0C00CE933D /* Pref360ControlPref.h */; }; - 55B637B918C10C0C00CE933D /* Pref360ControlPref.m in Sources */ = {isa = PBXBuildFile; fileRef = 55B637A918C10C0C00CE933D /* Pref360ControlPref.m */; }; - 55B637C018C10C2400CE933D /* pref360controlpref.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 55B637BC18C10C2400CE933D /* pref360controlpref.tiff */; }; - 55B637D318C10CB400CE933D /* Alert.tif in Resources */ = {isa = PBXBuildFile; fileRef = 55B637CC18C10CB400CE933D /* Alert.tif */; }; - 55B637D518C10CB400CE933D /* ControlPrefs.m in Sources */ = {isa = PBXBuildFile; fileRef = 55B637CF18C10CB400CE933D /* ControlPrefs.m */; }; - 55B637DD18C10CCC00CE933D /* ControlPrefs.m in Sources */ = {isa = PBXBuildFile; fileRef = 55B637CF18C10CB400CE933D /* ControlPrefs.m */; }; - 55B637DF18C10CFE00CE933D /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55B637DE18C10CFE00CE933D /* Security.framework */; }; - 55B637E018C10D0D00CE933D /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55B6375818C109E600CE933D /* ForceFeedback.framework */; }; - 55B6380018C10DA300CE933D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 55B637F718C10DA300CE933D /* InfoPlist.strings */; }; - 55B6380318C10DA300CE933D /* Wireless360Controller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55B637FB18C10DA300CE933D /* Wireless360Controller.cpp */; }; - 55B6380418C10DA300CE933D /* Wireless360Controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B637FC18C10DA300CE933D /* Wireless360Controller.h */; }; - 55B6382B18C10EBE00CE933D /* devices.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B6381D18C10EBE00CE933D /* devices.h */; }; - 55B6382C18C10EBE00CE933D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 55B6381E18C10EBE00CE933D /* InfoPlist.strings */; }; - 55B6382F18C10EBE00CE933D /* WirelessDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55B6382218C10EBE00CE933D /* WirelessDevice.cpp */; }; - 55B6383018C10EBE00CE933D /* WirelessDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B6382318C10EBE00CE933D /* WirelessDevice.h */; }; - 55B6383118C10EBE00CE933D /* WirelessGamingReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55B6382418C10EBE00CE933D /* WirelessGamingReceiver.cpp */; }; - 55B6383218C10EBE00CE933D /* WirelessGamingReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B6382518C10EBE00CE933D /* WirelessGamingReceiver.h */; }; - 55B6383318C10EBE00CE933D /* WirelessHIDDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55B6382918C10EBE00CE933D /* WirelessHIDDevice.cpp */; }; - 55B6383418C10EBE00CE933D /* WirelessHIDDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 55B6382A18C10EBE00CE933D /* WirelessHIDDevice.h */; }; - 55B6384618C10FE200CE933D /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55B6375818C109E600CE933D /* ForceFeedback.framework */; }; - 55F7E7C319D8C32000525388 /* DriverTool in Copy Tools */ = {isa = PBXBuildFile; fileRef = 55B6376018C10A3200CE933D /* DriverTool */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - 55FE3CA218D7B77800D69E84 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55B6372018C108A500CE933D /* CoreFoundation.framework */; }; - 55FE3CAB18D7B78D00D69E84 /* testhaptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 55B6373918C108D200CE933D /* testhaptic.c */; }; - 55FE3CAD18D7B7B600D69E84 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55FE3CAC18D7B7B600D69E84 /* SDL2.framework */; }; - 5B943BE11A83EC6600E77A79 /* MyAnalogStick.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B943BDF1A83EC6600E77A79 /* MyAnalogStick.h */; }; - 5B943BE21A83EC6600E77A79 /* MyAnalogStick.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B943BE01A83EC6600E77A79 /* MyAnalogStick.m */; }; - 62035D1620C04F7D003E70C1 /* chatpadkeys.h in Headers */ = {isa = PBXBuildFile; fileRef = 62035D1120C04F7D003E70C1 /* chatpadkeys.h */; }; - 62035D1720C04F7D003E70C1 /* chatpadkeys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 62035D1220C04F7D003E70C1 /* chatpadkeys.cpp */; }; - 62035D1820C04F7D003E70C1 /* chatpadhid.h in Headers */ = {isa = PBXBuildFile; fileRef = 62035D1320C04F7D003E70C1 /* chatpadhid.h */; }; - 62035D1920C04F7D003E70C1 /* ChatPad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 62035D1420C04F7D003E70C1 /* ChatPad.cpp */; }; - 62035D1A20C04F7D003E70C1 /* ChatPad.h in Headers */ = {isa = PBXBuildFile; fileRef = 62035D1520C04F7D003E70C1 /* ChatPad.h */; }; - 622A73C21A7C339000784C02 /* MyWhole360ControllerMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 622A73C01A7C339000784C02 /* MyWhole360ControllerMapper.h */; }; - 622A73C31A7C339000784C02 /* MyWhole360ControllerMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 622A73C11A7C339000784C02 /* MyWhole360ControllerMapper.m */; }; - 622A73CE1A7C879300784C02 /* BindingTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 622A73CC1A7C879300784C02 /* BindingTableView.h */; }; - 622A73CF1A7C879300784C02 /* BindingTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 622A73CD1A7C879300784C02 /* BindingTableView.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 557951491F7300E4001880D1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 55B636AC18C104DB00CE933D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 5579513D1F73006F001880D1; - remoteInfo = XBOBTFF; - }; - 55B6374D18C1097D00CE933D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 55B636AC18C104DB00CE933D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 55B6371E18C108A500CE933D; - remoteInfo = Feedback360; - }; - 55B637C218C10C5600CE933D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 55B636AC18C104DB00CE933D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 55B6375F18C10A3200CE933D; - remoteInfo = DriverTool; - }; - 55B6383C18C10FA200CE933D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 55B636AC18C104DB00CE933D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 55B636B318C104DB00CE933D; - remoteInfo = 360DaemonApp; - }; - 55B6383E18C10FA200CE933D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 55B636AC18C104DB00CE933D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 55B6370618C1057100CE933D; - remoteInfo = 360Controller; - }; - 55B6384018C10FA200CE933D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 55B636AC18C104DB00CE933D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 55B6377C18C10B0B00CE933D; - remoteInfo = Pref360Control; - }; - 55B6384218C10FA200CE933D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 55B636AC18C104DB00CE933D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 55B637E718C10D5000CE933D; - remoteInfo = Wireless360Controller; - }; - 55B6384418C10FA200CE933D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 55B636AC18C104DB00CE933D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 55B6380D18C10E8700CE933D; - remoteInfo = WirelessGamingReceiver; - }; - 55DA7C6C1926BED3002F6A3A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 55B636AC18C104DB00CE933D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 55B6371E18C108A500CE933D; - remoteInfo = Feedback360; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 557951481F7300DC001880D1 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - 5579514B1F7300EE001880D1 /* XBOBTFF.plugin in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55A2B8DC18C11A21006829A2 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = "${LOCAL_LIBRARY_DIR}/LaunchDaemons"; - dstSubfolderSpec = 0; - files = ( - 55A2B8DD18C11A2F006829A2 /* com.mice.360Daemon.plist in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 1; - }; - 55B6375618C1099700CE933D /* Copy PlugIns */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - 55B6375718C1099F00CE933D /* Feedback360.plugin in Copy PlugIns */, - ); - name = "Copy PlugIns"; - runOnlyForDeploymentPostprocessing = 0; - }; - 55F7E7C219D8C31300525388 /* Copy Tools */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 7; - files = ( - 55F7E7C319D8C32000525388 /* DriverTool in Copy Tools */, - ); - name = "Copy Tools"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 3F9B7C091A729C1600149949 /* artworks.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = artworks.xcassets; path = Resources/artworks.xcassets; sourceTree = ""; }; - 3FE7899E1A701F3400FF4065 /* Pref360StyleKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pref360StyleKit.h; sourceTree = ""; }; - 3FE7899F1A701F3400FF4065 /* Pref360StyleKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Pref360StyleKit.m; sourceTree = ""; }; - 3FE789A21A701FE200FF4065 /* MyWhole360Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyWhole360Controller.h; sourceTree = ""; }; - 3FE789A31A701FE200FF4065 /* MyWhole360Controller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyWhole360Controller.m; sourceTree = ""; }; - 3FE789A61A70281200FF4065 /* MyBatteryMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyBatteryMonitor.h; sourceTree = ""; }; - 3FE789A71A70281200FF4065 /* MyBatteryMonitor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyBatteryMonitor.m; sourceTree = ""; }; - 3FE789AA1A70288F00FF4065 /* MyDeadZoneViewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyDeadZoneViewer.h; sourceTree = ""; }; - 3FE789AB1A70288F00FF4065 /* MyDeadZoneViewer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyDeadZoneViewer.m; sourceTree = ""; }; - 3FE789AE1A70331C00FF4065 /* MyTrigger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyTrigger.h; sourceTree = ""; }; - 3FE789AF1A70331C00FF4065 /* MyTrigger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyTrigger.m; sourceTree = ""; }; - 551B911F1A68BDB000EA6527 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/Pref360ControlPref.xib; sourceTree = ""; }; - 551CDFFD196EF52F000869B6 /* Pref360Control_Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Pref360Control_Prefix.pch; sourceTree = ""; }; - 551CDFFF196EFD34000869B6 /* Install360Controller.pkgproj */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Install360Controller.pkgproj; sourceTree = ""; }; - 551CE001196EFD34000869B6 /* finish.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = finish.sh; sourceTree = ""; }; - 551CE002196EFD34000869B6 /* upgrade.sh */ = {isa = PBXFileReference; indentWidth = 3; lastKnownFileType = text.script.sh; path = upgrade.sh; sourceTree = ""; }; - 551CE004196EFD34000869B6 /* Welcome.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Welcome.rtf; sourceTree = ""; }; - 553BDB43196DF3BA00D1F569 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - 55699CD51971D96E00C40A31 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 55750C07190AFB5B0047FF41 /* DaemonLEDs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DaemonLEDs.h; sourceTree = ""; usesTabs = 1; }; - 55750C08190AFB5B0047FF41 /* DaemonLEDs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DaemonLEDs.m; sourceTree = ""; usesTabs = 1; }; - 5579513E1F73006F001880D1 /* XBOBTFF.plugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XBOBTFF.plugin; sourceTree = BUILT_PRODUCTS_DIR; }; - 557951401F73006F001880D1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 557951441F7300C9001880D1 /* FFDriver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FFDriver.h; sourceTree = ""; }; - 557951451F7300C9001880D1 /* FFDriver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FFDriver.cpp; sourceTree = ""; }; - 557951461F7300CA001880D1 /* XBoxOneBTHID.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XBoxOneBTHID.h; sourceTree = ""; }; - 5579514E1F73037B001880D1 /* FeedbackXBOEffect.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FeedbackXBOEffect.cpp; sourceTree = ""; }; - 5579514F1F73037B001880D1 /* FeedbackXBOEffect.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = FeedbackXBOEffect.hpp; sourceTree = ""; }; - 55852E2018D6B5580009BF55 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; - 55A2B8DB18C116E2006829A2 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; - 55ACBFE01D5B9E2E00E4F677 /* XboxOneBluetooth.kext */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XboxOneBluetooth.kext; sourceTree = BUILT_PRODUCTS_DIR; }; - 55ACBFE41D5B9E2F00E4F677 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 55B13FC018C51DD400ACD9AC /* Feedback360.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; path = Feedback360.exp; sourceTree = ""; }; - 55B636B418C104DB00CE933D /* 360Daemon.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = 360Daemon.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 55B636B718C104DB00CE933D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - 55B636BA18C104DB00CE933D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - 55B636BB18C104DB00CE933D /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - 55B636BC18C104DB00CE933D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 55B636BF18C104DB00CE933D /* 360DaemonApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "360DaemonApp-Info.plist"; sourceTree = ""; }; - 55B636C118C104DB00CE933D /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 55B636C518C104DB00CE933D /* 360DaemonApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "360DaemonApp-Prefix.pch"; sourceTree = ""; }; - 55B636EF18C1054F00CE933D /* _60Controller.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = _60Controller.cpp; sourceTree = ""; }; - 55B636F018C1054F00CE933D /* _60Controller.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = _60Controller.h; sourceTree = ""; }; - 55B636F618C1054F00CE933D /* Controller.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Controller.cpp; sourceTree = ""; }; - 55B636F718C1054F00CE933D /* Controller.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Controller.h; sourceTree = ""; }; - 55B636F818C1054F00CE933D /* ControlStruct.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ControlStruct.h; sourceTree = ""; }; - 55B636FA18C1054F00CE933D /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 55B636FB18C1054F00CE933D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 55B636FD18C1054F00CE933D /* xbox360hid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = xbox360hid.h; sourceTree = ""; }; - 55B6370718C1057100CE933D /* 360Controller.kext */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = 360Controller.kext; sourceTree = BUILT_PRODUCTS_DIR; }; - 55B6370818C1057100CE933D /* Kernel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kernel.framework; path = System/Library/Frameworks/Kernel.framework; sourceTree = SDKROOT; }; - 55B6371F18C108A500CE933D /* Feedback360.plugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Feedback360.plugin; sourceTree = BUILT_PRODUCTS_DIR; }; - 55B6372018C108A500CE933D /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; - 55B6372D18C108D200CE933D /* devlink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = devlink.cpp; sourceTree = ""; }; - 55B6372E18C108D200CE933D /* devlink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = devlink.h; sourceTree = ""; }; - 55B6373018C108D200CE933D /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 55B6373118C108D200CE933D /* Feedback360.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Feedback360.cpp; sourceTree = ""; }; - 55B6373218C108D200CE933D /* Feedback360.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Feedback360.h; sourceTree = ""; }; - 55B6373618C108D200CE933D /* Feedback360Effect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Feedback360Effect.cpp; sourceTree = ""; }; - 55B6373718C108D200CE933D /* Feedback360Effect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Feedback360Effect.h; sourceTree = ""; usesTabs = 1; }; - 55B6373818C108D200CE933D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 55B6373918C108D200CE933D /* testhaptic.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testhaptic.c; sourceTree = ""; }; - 55B6373A18C108D200CE933D /* testrumble.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testrumble.c; sourceTree = ""; }; - 55B6375818C109E600CE933D /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = System/Library/Frameworks/ForceFeedback.framework; sourceTree = SDKROOT; }; - 55B6376018C10A3200CE933D /* DriverTool */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = DriverTool; sourceTree = BUILT_PRODUCTS_DIR; }; - 55B6376C18C10A5400CE933D /* DriverTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DriverTool.m; sourceTree = ""; }; - 55B6377018C10A5400CE933D /* DriverTool_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DriverTool_Prefix.pch; sourceTree = ""; }; - 55B6377118C10A5400CE933D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 55B6377D18C10B0B00CE933D /* Pref360Control.prefPane */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Pref360Control.prefPane; sourceTree = BUILT_PRODUCTS_DIR; }; - 55B6377F18C10B0B00CE933D /* PreferencePanes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PreferencePanes.framework; path = System/Library/Frameworks/PreferencePanes.framework; sourceTree = SDKROOT; }; - 55B6378518C10B0B00CE933D /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 55B6379A18C10C0C00CE933D /* DeviceItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceItem.h; sourceTree = ""; }; - 55B6379B18C10C0C00CE933D /* DeviceItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeviceItem.m; sourceTree = ""; }; - 55B6379C18C10C0C00CE933D /* DeviceLister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceLister.h; sourceTree = ""; }; - 55B6379D18C10C0C00CE933D /* DeviceLister.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeviceLister.m; sourceTree = ""; }; - 55B637A818C10C0C00CE933D /* Pref360ControlPref.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pref360ControlPref.h; sourceTree = ""; }; - 55B637A918C10C0C00CE933D /* Pref360ControlPref.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Pref360ControlPref.m; sourceTree = ""; }; - 55B637BB18C10C2400CE933D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 55B637BC18C10C2400CE933D /* pref360controlpref.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = pref360controlpref.tiff; sourceTree = ""; }; - 55B637C718C10CB400CE933D /* 360Daemon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = 360Daemon.m; sourceTree = ""; }; - 55B637CC18C10CB400CE933D /* Alert.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Alert.tif; sourceTree = ""; }; - 55B637CD18C10CB400CE933D /* com.mice.360Daemon.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.mice.360Daemon.plist; sourceTree = ""; }; - 55B637CE18C10CB400CE933D /* ControlPrefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ControlPrefs.h; sourceTree = ""; }; - 55B637CF18C10CB400CE933D /* ControlPrefs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ControlPrefs.m; sourceTree = ""; }; - 55B637DE18C10CFE00CE933D /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - 55B637E818C10D5000CE933D /* Wireless360Controller.kext */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Wireless360Controller.kext; sourceTree = BUILT_PRODUCTS_DIR; }; - 55B637F818C10DA300CE933D /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 55B637F918C10DA300CE933D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 55B637FB18C10DA300CE933D /* Wireless360Controller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Wireless360Controller.cpp; sourceTree = ""; }; - 55B637FC18C10DA300CE933D /* Wireless360Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Wireless360Controller.h; sourceTree = ""; }; - 55B6380E18C10E8700CE933D /* WirelessGamingReceiver.kext */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WirelessGamingReceiver.kext; sourceTree = BUILT_PRODUCTS_DIR; }; - 55B6381D18C10EBE00CE933D /* devices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = devices.h; sourceTree = ""; }; - 55B6381F18C10EBE00CE933D /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 55B6382018C10EBE00CE933D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 55B6382218C10EBE00CE933D /* WirelessDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WirelessDevice.cpp; sourceTree = ""; }; - 55B6382318C10EBE00CE933D /* WirelessDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WirelessDevice.h; sourceTree = ""; }; - 55B6382418C10EBE00CE933D /* WirelessGamingReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WirelessGamingReceiver.cpp; sourceTree = ""; }; - 55B6382518C10EBE00CE933D /* WirelessGamingReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WirelessGamingReceiver.h; sourceTree = ""; }; - 55B6382918C10EBE00CE933D /* WirelessHIDDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WirelessHIDDevice.cpp; sourceTree = ""; }; - 55B6382A18C10EBE00CE933D /* WirelessHIDDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WirelessHIDDevice.h; sourceTree = ""; }; - 55E1C62819708E7300EC9DD8 /* build.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build.sh; sourceTree = SOURCE_ROOT; }; - 55E1C62919708E7300EC9DD8 /* clean.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = clean.sh; sourceTree = SOURCE_ROOT; }; - 55E1C62A19708F8600EC9DD8 /* Readme.md */ = {isa = PBXFileReference; lastKnownFileType = text; path = Readme.md; sourceTree = SOURCE_ROOT; }; - 55FE3CA118D7B77800D69E84 /* testhaptic */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testhaptic; sourceTree = BUILT_PRODUCTS_DIR; }; - 55FE3CAC18D7B7B600D69E84 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = /Library/Frameworks/SDL2.framework; sourceTree = ""; }; - 5B943BDF1A83EC6600E77A79 /* MyAnalogStick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyAnalogStick.h; sourceTree = ""; }; - 5B943BE01A83EC6600E77A79 /* MyAnalogStick.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyAnalogStick.m; sourceTree = ""; }; - 62035D1120C04F7D003E70C1 /* chatpadkeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chatpadkeys.h; sourceTree = ""; }; - 62035D1220C04F7D003E70C1 /* chatpadkeys.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chatpadkeys.cpp; sourceTree = ""; }; - 62035D1320C04F7D003E70C1 /* chatpadhid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chatpadhid.h; sourceTree = ""; }; - 62035D1420C04F7D003E70C1 /* ChatPad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChatPad.cpp; sourceTree = ""; }; - 62035D1520C04F7D003E70C1 /* ChatPad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatPad.h; sourceTree = ""; }; - 622A73C01A7C339000784C02 /* MyWhole360ControllerMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyWhole360ControllerMapper.h; sourceTree = ""; }; - 622A73C11A7C339000784C02 /* MyWhole360ControllerMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyWhole360ControllerMapper.m; sourceTree = ""; }; - 622A73CC1A7C879300784C02 /* BindingTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BindingTableView.h; sourceTree = ""; }; - 622A73CD1A7C879300784C02 /* BindingTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BindingTableView.m; sourceTree = ""; }; - 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DeveloperSettings.xcconfig; sourceTree = SOURCE_ROOT; }; - 96A383052223A4FA00A27767 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; - 96A383062223A4FA00A27767 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; - 96A383072223A4FA00A27767 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; - 96A383082223A4FB00A27767 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; - 96A383092223A4FB00A27767 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; - 96A3830A2223A4FB00A27767 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; - 96A3830C2223A4FB00A27767 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = ""; }; - 96A3830D2223A4FB00A27767 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; - 96A3830E2223A50700A27767 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Pref360ControlPref.strings"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 5579513B1F73006F001880D1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 557951521F730CAF001880D1 /* CoreFoundation.framework in Frameworks */, - 557951511F730CA3001880D1 /* IOKit.framework in Frameworks */, - 5579514D1F73021A001880D1 /* ForceFeedback.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B636B118C104DB00CE933D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B636B818C104DB00CE933D /* Cocoa.framework in Frameworks */, - 55B6384618C10FE200CE933D /* ForceFeedback.framework in Frameworks */, - 553BDB45196DF41500D1F569 /* IOKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6370218C1057100CE933D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6371C18C108A500CE933D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 553BDB44196DF3BA00D1F569 /* IOKit.framework in Frameworks */, - 55B6375918C109E600CE933D /* ForceFeedback.framework in Frameworks */, - 55B6372118C108A500CE933D /* CoreFoundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6375D18C10A3200CE933D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6377618C10ACC00CE933D /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6377818C10B0B00CE933D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B637E018C10D0D00CE933D /* ForceFeedback.framework in Frameworks */, - 55B637DF18C10CFE00CE933D /* Security.framework in Frameworks */, - 55B6377E18C10B0B00CE933D /* Cocoa.framework in Frameworks */, - 55B6378018C10B0B00CE933D /* PreferencePanes.framework in Frameworks */, - 553BDB46196DF41600D1F569 /* IOKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B637E318C10D5000CE933D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6380918C10E8700CE933D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55FE3C9E18D7B77800D69E84 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 55FE3CAD18D7B7B600D69E84 /* SDL2.framework in Frameworks */, - 55FE3CA218D7B77800D69E84 /* CoreFoundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 551CDFFE196EFD0A000869B6 /* Distribution */ = { - isa = PBXGroup; - children = ( - 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */, - 551CDFFF196EFD34000869B6 /* Install360Controller.pkgproj */, - 551CE000196EFD34000869B6 /* Scripts */, - 551CE003196EFD34000869B6 /* Text */, - ); - name = Distribution; - path = Install360Controller; - sourceTree = ""; - }; - 551CE000196EFD34000869B6 /* Scripts */ = { - isa = PBXGroup; - children = ( - 55E1C62819708E7300EC9DD8 /* build.sh */, - 55E1C62919708E7300EC9DD8 /* clean.sh */, - 551CE001196EFD34000869B6 /* finish.sh */, - 551CE002196EFD34000869B6 /* upgrade.sh */, - ); - path = Scripts; - sourceTree = ""; - }; - 551CE003196EFD34000869B6 /* Text */ = { - isa = PBXGroup; - children = ( - 55E1C62A19708F8600EC9DD8 /* Readme.md */, - 551CE004196EFD34000869B6 /* Welcome.rtf */, - ); - path = Text; - sourceTree = ""; - }; - 5579513F1F73006F001880D1 /* XBOBTFF */ = { - isa = PBXGroup; - children = ( - 557951441F7300C9001880D1 /* FFDriver.h */, - 557951451F7300C9001880D1 /* FFDriver.cpp */, - 557951461F7300CA001880D1 /* XBoxOneBTHID.h */, - 5579514F1F73037B001880D1 /* FeedbackXBOEffect.hpp */, - 5579514E1F73037B001880D1 /* FeedbackXBOEffect.cpp */, - 557951401F73006F001880D1 /* Info.plist */, - ); - path = XBOBTFF; - sourceTree = ""; - usesTabs = 1; - }; - 55A2B8E018C11C7E006829A2 /* Resources */ = { - isa = PBXGroup; - children = ( - 55B6372F18C108D200CE933D /* InfoPlist.strings */, - 55B6373818C108D200CE933D /* Info.plist */, - 55B13FC018C51DD400ACD9AC /* Feedback360.exp */, - ); - name = Resources; - sourceTree = ""; - }; - 55A2B8E118C11C8F006829A2 /* Source code */ = { - isa = PBXGroup; - children = ( - 55B6372E18C108D200CE933D /* devlink.h */, - 55B6372D18C108D200CE933D /* devlink.cpp */, - 55B6373218C108D200CE933D /* Feedback360.h */, - 55B6373118C108D200CE933D /* Feedback360.cpp */, - 55B6373718C108D200CE933D /* Feedback360Effect.h */, - 55B6373618C108D200CE933D /* Feedback360Effect.cpp */, - ); - name = "Source code"; - sourceTree = ""; - }; - 55A2B8E218C11D4D006829A2 /* Resources */ = { - isa = PBXGroup; - children = ( - 55B636F918C1054F00CE933D /* InfoPlist.strings */, - 55B636FB18C1054F00CE933D /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 55A2B8E318C11DAD006829A2 /* Resources */ = { - isa = PBXGroup; - children = ( - 55B637F718C10DA300CE933D /* InfoPlist.strings */, - 55B637F918C10DA300CE933D /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 55A2B8E418C11DC5006829A2 /* Resources */ = { - isa = PBXGroup; - children = ( - 55B6381E18C10EBE00CE933D /* InfoPlist.strings */, - 55B6382018C10EBE00CE933D /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 55ACBFE11D5B9E2E00E4F677 /* XboxOneBluetooth */ = { - isa = PBXGroup; - children = ( - 55ACBFE41D5B9E2F00E4F677 /* Info.plist */, - ); - path = XboxOneBluetooth; - sourceTree = ""; - }; - 55B636AB18C104DB00CE933D = { - isa = PBXGroup; - children = ( - 55B6372C18C108D200CE933D /* Feedback360 */, - 55B636EB18C1054F00CE933D /* 360Controller */, - 55B637F618C10DA300CE933D /* Wireless360Controller */, - 55B6381C18C10EBE00CE933D /* WirelessGamingReceiver */, - 55B636BD18C104DB00CE933D /* 360Daemon */, - 55B6376A18C10A5400CE933D /* DriverTool */, - 55B6378118C10B0B00CE933D /* Pref360Control */, - 551CDFFE196EFD0A000869B6 /* Distribution */, - 55ACBFE11D5B9E2E00E4F677 /* XboxOneBluetooth */, - 5579513F1F73006F001880D1 /* XBOBTFF */, - 55B636B618C104DB00CE933D /* Frameworks */, - 55B636B518C104DB00CE933D /* Products */, - ); - sourceTree = ""; - usesTabs = 0; - }; - 55B636B518C104DB00CE933D /* Products */ = { - isa = PBXGroup; - children = ( - 55B636B418C104DB00CE933D /* 360Daemon.app */, - 55B6370718C1057100CE933D /* 360Controller.kext */, - 55B6371F18C108A500CE933D /* Feedback360.plugin */, - 55B6376018C10A3200CE933D /* DriverTool */, - 55B6377D18C10B0B00CE933D /* Pref360Control.prefPane */, - 55B637E818C10D5000CE933D /* Wireless360Controller.kext */, - 55B6380E18C10E8700CE933D /* WirelessGamingReceiver.kext */, - 55FE3CA118D7B77800D69E84 /* testhaptic */, - 55ACBFE01D5B9E2E00E4F677 /* XboxOneBluetooth.kext */, - 5579513E1F73006F001880D1 /* XBOBTFF.plugin */, - ); - name = Products; - sourceTree = ""; - }; - 55B636B618C104DB00CE933D /* Frameworks */ = { - isa = PBXGroup; - children = ( - 55FE3CAC18D7B7B600D69E84 /* SDL2.framework */, - 553BDB43196DF3BA00D1F569 /* IOKit.framework */, - 55B637DE18C10CFE00CE933D /* Security.framework */, - 55B6375818C109E600CE933D /* ForceFeedback.framework */, - 55B636B718C104DB00CE933D /* Cocoa.framework */, - 55B6372018C108A500CE933D /* CoreFoundation.framework */, - 55B6377F18C10B0B00CE933D /* PreferencePanes.framework */, - 55B636B918C104DB00CE933D /* Other Frameworks */, - ); - name = Frameworks; - path = System/Library/Frameworks; - sourceTree = SDKROOT; - }; - 55B636B918C104DB00CE933D /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 55B636BA18C104DB00CE933D /* AppKit.framework */, - 55B636BB18C104DB00CE933D /* CoreData.framework */, - 55B636BC18C104DB00CE933D /* Foundation.framework */, - 55B6370818C1057100CE933D /* Kernel.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 55B636BD18C104DB00CE933D /* 360Daemon */ = { - isa = PBXGroup; - children = ( - 55B637C718C10CB400CE933D /* 360Daemon.m */, - 55B637CE18C10CB400CE933D /* ControlPrefs.h */, - 55B637CF18C10CB400CE933D /* ControlPrefs.m */, - 55750C07190AFB5B0047FF41 /* DaemonLEDs.h */, - 55750C08190AFB5B0047FF41 /* DaemonLEDs.m */, - 55699CD51971D96E00C40A31 /* Images.xcassets */, - 55B636BE18C104DB00CE933D /* Supporting Files */, - ); - path = 360Daemon; - sourceTree = ""; - }; - 55B636BE18C104DB00CE933D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 55B637CC18C10CB400CE933D /* Alert.tif */, - 55B637CD18C10CB400CE933D /* com.mice.360Daemon.plist */, - 55B636BF18C104DB00CE933D /* 360DaemonApp-Info.plist */, - 55B636C018C104DB00CE933D /* InfoPlist.strings */, - 55B636C518C104DB00CE933D /* 360DaemonApp-Prefix.pch */, - 55A2B8DA18C116E0006829A2 /* Localizable.strings */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 55B636EB18C1054F00CE933D /* 360Controller */ = { - isa = PBXGroup; - children = ( - 55B636F018C1054F00CE933D /* _60Controller.h */, - 55B636EF18C1054F00CE933D /* _60Controller.cpp */, - 62035D1520C04F7D003E70C1 /* ChatPad.h */, - 62035D1420C04F7D003E70C1 /* ChatPad.cpp */, - 62035D1320C04F7D003E70C1 /* chatpadhid.h */, - 62035D1120C04F7D003E70C1 /* chatpadkeys.h */, - 62035D1220C04F7D003E70C1 /* chatpadkeys.cpp */, - 55B636F718C1054F00CE933D /* Controller.h */, - 55B636F618C1054F00CE933D /* Controller.cpp */, - 55B636F818C1054F00CE933D /* ControlStruct.h */, - 55B636FD18C1054F00CE933D /* xbox360hid.h */, - 55A2B8E218C11D4D006829A2 /* Resources */, - ); - path = 360Controller; - sourceTree = ""; - }; - 55B6372C18C108D200CE933D /* Feedback360 */ = { - isa = PBXGroup; - children = ( - 55A2B8E118C11C8F006829A2 /* Source code */, - 55B6373918C108D200CE933D /* testhaptic.c */, - 55B6373A18C108D200CE933D /* testrumble.c */, - 55A2B8E018C11C7E006829A2 /* Resources */, - ); - path = Feedback360; - sourceTree = ""; - }; - 55B6376A18C10A5400CE933D /* DriverTool */ = { - isa = PBXGroup; - children = ( - 55B6376C18C10A5400CE933D /* DriverTool.m */, - 55B6377018C10A5400CE933D /* DriverTool_Prefix.pch */, - 55B6377118C10A5400CE933D /* Info.plist */, - ); - path = DriverTool; - sourceTree = ""; - }; - 55B6378118C10B0B00CE933D /* Pref360Control */ = { - isa = PBXGroup; - children = ( - 3FE7899E1A701F3400FF4065 /* Pref360StyleKit.h */, - 3FE7899F1A701F3400FF4065 /* Pref360StyleKit.m */, - 55B6379A18C10C0C00CE933D /* DeviceItem.h */, - 55B6379B18C10C0C00CE933D /* DeviceItem.m */, - 55B6379C18C10C0C00CE933D /* DeviceLister.h */, - 55B6379D18C10C0C00CE933D /* DeviceLister.m */, - 3FE789A21A701FE200FF4065 /* MyWhole360Controller.h */, - 3FE789A31A701FE200FF4065 /* MyWhole360Controller.m */, - 622A73C01A7C339000784C02 /* MyWhole360ControllerMapper.h */, - 622A73C11A7C339000784C02 /* MyWhole360ControllerMapper.m */, - 622A73CC1A7C879300784C02 /* BindingTableView.h */, - 622A73CD1A7C879300784C02 /* BindingTableView.m */, - 3FE789A61A70281200FF4065 /* MyBatteryMonitor.h */, - 3FE789A71A70281200FF4065 /* MyBatteryMonitor.m */, - 3FE789AA1A70288F00FF4065 /* MyDeadZoneViewer.h */, - 3FE789AB1A70288F00FF4065 /* MyDeadZoneViewer.m */, - 5B943BDF1A83EC6600E77A79 /* MyAnalogStick.h */, - 5B943BE01A83EC6600E77A79 /* MyAnalogStick.m */, - 3FE789AE1A70331C00FF4065 /* MyTrigger.h */, - 3FE789AF1A70331C00FF4065 /* MyTrigger.m */, - 55B637A818C10C0C00CE933D /* Pref360ControlPref.h */, - 55B637A918C10C0C00CE933D /* Pref360ControlPref.m */, - 551CDFFB196EEE76000869B6 /* Pref360ControlPref.xib */, - 55B6378218C10B0B00CE933D /* Supporting Files */, - ); - path = Pref360Control; - sourceTree = ""; - }; - 55B6378218C10B0B00CE933D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 55B637BB18C10C2400CE933D /* Info.plist */, - 551CDFFD196EF52F000869B6 /* Pref360Control_Prefix.pch */, - 55B637BC18C10C2400CE933D /* pref360controlpref.tiff */, - 55B6378418C10B0B00CE933D /* InfoPlist.strings */, - 55852E2118D6B5580009BF55 /* Localizable.strings */, - 3F9B7C091A729C1600149949 /* artworks.xcassets */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 55B637F618C10DA300CE933D /* Wireless360Controller */ = { - isa = PBXGroup; - children = ( - 55B637FC18C10DA300CE933D /* Wireless360Controller.h */, - 55B637FB18C10DA300CE933D /* Wireless360Controller.cpp */, - 55A2B8E318C11DAD006829A2 /* Resources */, - ); - path = Wireless360Controller; - sourceTree = ""; - }; - 55B6381C18C10EBE00CE933D /* WirelessGamingReceiver */ = { - isa = PBXGroup; - children = ( - 55B6381D18C10EBE00CE933D /* devices.h */, - 55B6382318C10EBE00CE933D /* WirelessDevice.h */, - 55B6382218C10EBE00CE933D /* WirelessDevice.cpp */, - 55B6382518C10EBE00CE933D /* WirelessGamingReceiver.h */, - 55B6382418C10EBE00CE933D /* WirelessGamingReceiver.cpp */, - 55B6382A18C10EBE00CE933D /* WirelessHIDDevice.h */, - 55B6382918C10EBE00CE933D /* WirelessHIDDevice.cpp */, - 55A2B8E418C11DC5006829A2 /* Resources */, - ); - path = WirelessGamingReceiver; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 55ACBFDD1D5B9E2E00E4F677 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6370318C1057100CE933D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6375318C1098D00CE933D /* Controller.h in Headers */, - 55B6375518C1098D00CE933D /* xbox360hid.h in Headers */, - 62035D1620C04F7D003E70C1 /* chatpadkeys.h in Headers */, - 62035D1A20C04F7D003E70C1 /* ChatPad.h in Headers */, - 55B6374F18C1098D00CE933D /* _60Controller.h in Headers */, - 62035D1820C04F7D003E70C1 /* chatpadhid.h in Headers */, - 55B6375418C1098D00CE933D /* ControlStruct.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6377918C10B0B00CE933D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 5B943BE11A83EC6600E77A79 /* MyAnalogStick.h in Headers */, - 3FE789A81A70281200FF4065 /* MyBatteryMonitor.h in Headers */, - 3FE789A01A701F3400FF4065 /* Pref360StyleKit.h in Headers */, - 3FE789AC1A70288F00FF4065 /* MyDeadZoneViewer.h in Headers */, - 3FE789B01A70331C00FF4065 /* MyTrigger.h in Headers */, - 3FE789A41A701FE200FF4065 /* MyWhole360Controller.h in Headers */, - 622A73C21A7C339000784C02 /* MyWhole360ControllerMapper.h in Headers */, - 55B637AA18C10C0C00CE933D /* DeviceItem.h in Headers */, - 55B637AC18C10C0C00CE933D /* DeviceLister.h in Headers */, - 55B637B818C10C0C00CE933D /* Pref360ControlPref.h in Headers */, - 622A73CE1A7C879300784C02 /* BindingTableView.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B637E418C10D5000CE933D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6380418C10DA300CE933D /* Wireless360Controller.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6380A18C10E8700CE933D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6383418C10EBE00CE933D /* WirelessHIDDevice.h in Headers */, - 55B6383018C10EBE00CE933D /* WirelessDevice.h in Headers */, - 55B6383218C10EBE00CE933D /* WirelessGamingReceiver.h in Headers */, - 55B6382B18C10EBE00CE933D /* devices.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 5579513D1F73006F001880D1 /* XBOBTFF */ = { - isa = PBXNativeTarget; - buildConfigurationList = 557951431F73006F001880D1 /* Build configuration list for PBXNativeTarget "XBOBTFF" */; - buildPhases = ( - 5579513A1F73006F001880D1 /* Sources */, - 5579513B1F73006F001880D1 /* Frameworks */, - 5579513C1F73006F001880D1 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = XBOBTFF; - productName = XBOBTFF; - productReference = 5579513E1F73006F001880D1 /* XBOBTFF.plugin */; - productType = "com.apple.product-type.bundle"; - }; - 55ACBFDF1D5B9E2E00E4F677 /* XboxOneBluetooth */ = { - isa = PBXNativeTarget; - buildConfigurationList = 55ACBFE71D5B9E2F00E4F677 /* Build configuration list for PBXNativeTarget "XboxOneBluetooth" */; - buildPhases = ( - 55ACBFDD1D5B9E2E00E4F677 /* Headers */, - 55ACBFDE1D5B9E2E00E4F677 /* Resources */, - 557951481F7300DC001880D1 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - 5579514A1F7300E4001880D1 /* PBXTargetDependency */, - ); - name = XboxOneBluetooth; - productName = XboxOneBluetooth; - productReference = 55ACBFE01D5B9E2E00E4F677 /* XboxOneBluetooth.kext */; - productType = "com.apple.product-type.kernel-extension"; - }; - 55B636B318C104DB00CE933D /* 360Daemon */ = { - isa = PBXNativeTarget; - buildConfigurationList = 55B636E518C104DB00CE933D /* Build configuration list for PBXNativeTarget "360Daemon" */; - buildPhases = ( - 55B636B018C104DB00CE933D /* Sources */, - 55B636B118C104DB00CE933D /* Frameworks */, - 55B636B218C104DB00CE933D /* Resources */, - 55A2B8DC18C11A21006829A2 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = 360Daemon; - productName = 360DaemonApp; - productReference = 55B636B418C104DB00CE933D /* 360Daemon.app */; - productType = "com.apple.product-type.application"; - }; - 55B6370618C1057100CE933D /* 360Controller */ = { - isa = PBXNativeTarget; - buildConfigurationList = 55B6371318C1057100CE933D /* Build configuration list for PBXNativeTarget "360Controller" */; - buildPhases = ( - 55B6370118C1057100CE933D /* Sources */, - 55B6370218C1057100CE933D /* Frameworks */, - 55B6370318C1057100CE933D /* Headers */, - 55B6370418C1057100CE933D /* Resources */, - 55B6375618C1099700CE933D /* Copy PlugIns */, - ); - buildRules = ( - ); - dependencies = ( - 55B6374E18C1097D00CE933D /* PBXTargetDependency */, - ); - name = 360Controller; - productName = 360Controller2; - productReference = 55B6370718C1057100CE933D /* 360Controller.kext */; - productType = "com.apple.product-type.kernel-extension"; - }; - 55B6371E18C108A500CE933D /* Feedback360 */ = { - isa = PBXNativeTarget; - buildConfigurationList = 55B6372918C108A500CE933D /* Build configuration list for PBXNativeTarget "Feedback360" */; - buildPhases = ( - 55B6371B18C108A500CE933D /* Sources */, - 55B6371C18C108A500CE933D /* Frameworks */, - 55B6371D18C108A500CE933D /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Feedback360; - productName = Feedback3602; - productReference = 55B6371F18C108A500CE933D /* Feedback360.plugin */; - productType = "com.apple.product-type.bundle"; - }; - 55B6375F18C10A3200CE933D /* DriverTool */ = { - isa = PBXNativeTarget; - buildConfigurationList = 55B6376718C10A3200CE933D /* Build configuration list for PBXNativeTarget "DriverTool" */; - buildPhases = ( - 55B6375C18C10A3200CE933D /* Sources */, - 55B6375D18C10A3200CE933D /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = DriverTool; - productName = DriverTool2; - productReference = 55B6376018C10A3200CE933D /* DriverTool */; - productType = "com.apple.product-type.tool"; - }; - 55B6377C18C10B0B00CE933D /* Pref360Control */ = { - isa = PBXNativeTarget; - buildConfigurationList = 55B6379018C10B0B00CE933D /* Build configuration list for PBXNativeTarget "Pref360Control" */; - buildPhases = ( - 55B6377718C10B0B00CE933D /* Sources */, - 55B6377818C10B0B00CE933D /* Frameworks */, - 55B6377918C10B0B00CE933D /* Headers */, - 55B6377A18C10B0B00CE933D /* Resources */, - 55F7E7C219D8C31300525388 /* Copy Tools */, - ); - buildRules = ( - ); - dependencies = ( - 55B637C318C10C5600CE933D /* PBXTargetDependency */, - ); - name = Pref360Control; - productName = Pref360Control; - productReference = 55B6377D18C10B0B00CE933D /* Pref360Control.prefPane */; - productType = "com.apple.product-type.bundle"; - }; - 55B637E718C10D5000CE933D /* Wireless360Controller */ = { - isa = PBXNativeTarget; - buildConfigurationList = 55B637F318C10D5000CE933D /* Build configuration list for PBXNativeTarget "Wireless360Controller" */; - buildPhases = ( - 55B637E218C10D5000CE933D /* Sources */, - 55B637E318C10D5000CE933D /* Frameworks */, - 55B637E418C10D5000CE933D /* Headers */, - 55B637E518C10D5000CE933D /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Wireless360Controller; - productName = Wireless360Controller2; - productReference = 55B637E818C10D5000CE933D /* Wireless360Controller.kext */; - productType = "com.apple.product-type.kernel-extension"; - }; - 55B6380D18C10E8700CE933D /* WirelessGamingReceiver */ = { - isa = PBXNativeTarget; - buildConfigurationList = 55B6381918C10E9500CE933D /* Build configuration list for PBXNativeTarget "WirelessGamingReceiver" */; - buildPhases = ( - 55B6380818C10E8700CE933D /* Sources */, - 55B6380918C10E8700CE933D /* Frameworks */, - 55B6380A18C10E8700CE933D /* Headers */, - 55B6380B18C10E8700CE933D /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = WirelessGamingReceiver; - productName = WirelessGamingReceiver2; - productReference = 55B6380E18C10E8700CE933D /* WirelessGamingReceiver.kext */; - productType = "com.apple.product-type.kernel-extension"; - }; - 55FE3CA018D7B77800D69E84 /* testhaptic */ = { - isa = PBXNativeTarget; - buildConfigurationList = 55FE3CAA18D7B77800D69E84 /* Build configuration list for PBXNativeTarget "testhaptic" */; - buildPhases = ( - 55FE3C9D18D7B77800D69E84 /* Sources */, - 55FE3C9E18D7B77800D69E84 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 55DA7C6D1926BED3002F6A3A /* PBXTargetDependency */, - ); - name = testhaptic; - productName = testhaptic; - productReference = 55FE3CA118D7B77800D69E84 /* testhaptic */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 55B636AC18C104DB00CE933D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0610; - ORGANIZATIONNAME = GitHub; - TargetAttributes = { - 5579513D1F73006F001880D1 = { - CreatedOnToolsVersion = 9.0; - DevelopmentTeam = G947KKM5RL; - ProvisioningStyle = Manual; - }; - 55ACBFDF1D5B9E2E00E4F677 = { - CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = G947KKM5RL; - ProvisioningStyle = Manual; - }; - 55B636B318C104DB00CE933D = { - DevelopmentTeam = G947KKM5RL; - ProvisioningStyle = Manual; - }; - 55B6370618C1057100CE933D = { - DevelopmentTeam = G947KKM5RL; - ProvisioningStyle = Manual; - }; - 55B6371E18C108A500CE933D = { - DevelopmentTeam = G947KKM5RL; - ProvisioningStyle = Manual; - }; - 55B6375F18C10A3200CE933D = { - DevelopmentTeam = G947KKM5RL; - ProvisioningStyle = Manual; - }; - 55B6377C18C10B0B00CE933D = { - DevelopmentTeam = G947KKM5RL; - ProvisioningStyle = Manual; - }; - 55B637E718C10D5000CE933D = { - DevelopmentTeam = G947KKM5RL; - ProvisioningStyle = Manual; - }; - 55B6380D18C10E8700CE933D = { - DevelopmentTeam = G947KKM5RL; - ProvisioningStyle = Manual; - }; - 55B6383818C10F8E00CE933D = { - DevelopmentTeam = G947KKM5RL; - ProvisioningStyle = Manual; - }; - 55FE3CA018D7B77800D69E84 = { - DevelopmentTeam = G947KKM5RL; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = 55B636AF18C104DB00CE933D /* Build configuration list for PBXProject "360 Driver" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - English, - "zh-Hans", - ); - mainGroup = 55B636AB18C104DB00CE933D; - productRefGroup = 55B636B518C104DB00CE933D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 55B6383818C10F8E00CE933D /* Whole Driver */, - 55B6375F18C10A3200CE933D /* DriverTool */, - 55B636B318C104DB00CE933D /* 360Daemon */, - 55B6371E18C108A500CE933D /* Feedback360 */, - 55B6377C18C10B0B00CE933D /* Pref360Control */, - 55B6370618C1057100CE933D /* 360Controller */, - 55B637E718C10D5000CE933D /* Wireless360Controller */, - 55B6380D18C10E8700CE933D /* WirelessGamingReceiver */, - 5579513D1F73006F001880D1 /* XBOBTFF */, - 55ACBFDF1D5B9E2E00E4F677 /* XboxOneBluetooth */, - 55FE3CA018D7B77800D69E84 /* testhaptic */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 5579513C1F73006F001880D1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55ACBFDE1D5B9E2E00E4F677 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B636B218C104DB00CE933D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55699CD61971D96E00C40A31 /* Images.xcassets in Resources */, - 55B636C218C104DB00CE933D /* InfoPlist.strings in Resources */, - 55A2B8D818C116E0006829A2 /* Localizable.strings in Resources */, - 55B637D318C10CB400CE933D /* Alert.tif in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6370418C1057100CE933D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6371618C1058E00CE933D /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6371D18C108A500CE933D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6373D18C108D200CE933D /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6377A18C10B0B00CE933D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6378618C10B0B00CE933D /* InfoPlist.strings in Resources */, - 55699CD71971DA8100C40A31 /* Images.xcassets in Resources */, - 3F9B7C0A1A729C1600149949 /* artworks.xcassets in Resources */, - 55B637C018C10C2400CE933D /* pref360controlpref.tiff in Resources */, - 55852E1F18D6B5580009BF55 /* Localizable.strings in Resources */, - 551CDFF9196EEE76000869B6 /* Pref360ControlPref.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B637E518C10D5000CE933D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6380018C10DA300CE933D /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6380B18C10E8700CE933D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6382C18C10EBE00CE933D /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 5579513A1F73006F001880D1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5579514C1F7301F9001880D1 /* FFDriver.cpp in Sources */, - 557951501F73037B001880D1 /* FeedbackXBOEffect.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B636B018C104DB00CE933D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B637D518C10CB400CE933D /* ControlPrefs.m in Sources */, - 55A2B8D518C116BD006829A2 /* 360Daemon.m in Sources */, - 55750C09190AFB5B0047FF41 /* DaemonLEDs.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6370118C1057100CE933D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 62035D1720C04F7D003E70C1 /* chatpadkeys.cpp in Sources */, - 62035D1920C04F7D003E70C1 /* ChatPad.cpp in Sources */, - 55B6371718C105B800CE933D /* _60Controller.cpp in Sources */, - 55B6371A18C105B800CE933D /* Controller.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6371B18C108A500CE933D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6373E18C108D200CE933D /* Feedback360.cpp in Sources */, - 55B6373C18C108D200CE933D /* devlink.cpp in Sources */, - 55B6373F18C108D200CE933D /* Feedback360Effect.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6375C18C10A3200CE933D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6377218C10A5400CE933D /* DriverTool.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6377718C10B0B00CE933D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5B943BE21A83EC6600E77A79 /* MyAnalogStick.m in Sources */, - 55B637AD18C10C0C00CE933D /* DeviceLister.m in Sources */, - 3FE789A51A701FE200FF4065 /* MyWhole360Controller.m in Sources */, - 3FE789AD1A70288F00FF4065 /* MyDeadZoneViewer.m in Sources */, - 3FE789A11A701F3400FF4065 /* Pref360StyleKit.m in Sources */, - 55B637B918C10C0C00CE933D /* Pref360ControlPref.m in Sources */, - 3FE789A91A70281200FF4065 /* MyBatteryMonitor.m in Sources */, - 622A73CF1A7C879300784C02 /* BindingTableView.m in Sources */, - 55B637AB18C10C0C00CE933D /* DeviceItem.m in Sources */, - 55B637DD18C10CCC00CE933D /* ControlPrefs.m in Sources */, - 622A73C31A7C339000784C02 /* MyWhole360ControllerMapper.m in Sources */, - 3FE789B11A70331C00FF4065 /* MyTrigger.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B637E218C10D5000CE933D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6380318C10DA300CE933D /* Wireless360Controller.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55B6380818C10E8700CE933D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55B6383318C10EBE00CE933D /* WirelessHIDDevice.cpp in Sources */, - 55B6382F18C10EBE00CE933D /* WirelessDevice.cpp in Sources */, - 55B6383118C10EBE00CE933D /* WirelessGamingReceiver.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 55FE3C9D18D7B77800D69E84 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 55FE3CAB18D7B78D00D69E84 /* testhaptic.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 5579514A1F7300E4001880D1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 5579513D1F73006F001880D1 /* XBOBTFF */; - targetProxy = 557951491F7300E4001880D1 /* PBXContainerItemProxy */; - }; - 55B6374E18C1097D00CE933D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 55B6371E18C108A500CE933D /* Feedback360 */; - targetProxy = 55B6374D18C1097D00CE933D /* PBXContainerItemProxy */; - }; - 55B637C318C10C5600CE933D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 55B6375F18C10A3200CE933D /* DriverTool */; - targetProxy = 55B637C218C10C5600CE933D /* PBXContainerItemProxy */; - }; - 55B6383D18C10FA200CE933D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 55B636B318C104DB00CE933D /* 360Daemon */; - targetProxy = 55B6383C18C10FA200CE933D /* PBXContainerItemProxy */; - }; - 55B6383F18C10FA200CE933D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 55B6370618C1057100CE933D /* 360Controller */; - targetProxy = 55B6383E18C10FA200CE933D /* PBXContainerItemProxy */; - }; - 55B6384118C10FA200CE933D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 55B6377C18C10B0B00CE933D /* Pref360Control */; - targetProxy = 55B6384018C10FA200CE933D /* PBXContainerItemProxy */; - }; - 55B6384318C10FA200CE933D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 55B637E718C10D5000CE933D /* Wireless360Controller */; - targetProxy = 55B6384218C10FA200CE933D /* PBXContainerItemProxy */; - }; - 55B6384518C10FA200CE933D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 55B6380D18C10E8700CE933D /* WirelessGamingReceiver */; - targetProxy = 55B6384418C10FA200CE933D /* PBXContainerItemProxy */; - }; - 55DA7C6D1926BED3002F6A3A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 55B6371E18C108A500CE933D /* Feedback360 */; - targetProxy = 55DA7C6C1926BED3002F6A3A /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 551CDFFB196EEE76000869B6 /* Pref360ControlPref.xib */ = { - isa = PBXVariantGroup; - children = ( - 551B911F1A68BDB000EA6527 /* en */, - 96A3830E2223A50700A27767 /* zh-Hans */, - ); - name = Pref360ControlPref.xib; - sourceTree = ""; - }; - 55852E2118D6B5580009BF55 /* Localizable.strings */ = { - isa = PBXVariantGroup; - children = ( - 55852E2018D6B5580009BF55 /* en */, - 96A3830D2223A4FB00A27767 /* zh-Hans */, - ); - name = Localizable.strings; - sourceTree = ""; - }; - 55A2B8DA18C116E0006829A2 /* Localizable.strings */ = { - isa = PBXVariantGroup; - children = ( - 55A2B8DB18C116E2006829A2 /* en */, - 96A3830A2223A4FB00A27767 /* zh-Hans */, - ); - name = Localizable.strings; - sourceTree = ""; - }; - 55B636C018C104DB00CE933D /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 55B636C118C104DB00CE933D /* en */, - 96A383092223A4FB00A27767 /* zh-Hans */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 55B636F918C1054F00CE933D /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 55B636FA18C1054F00CE933D /* English */, - 96A383062223A4FA00A27767 /* zh-Hans */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 55B6372F18C108D200CE933D /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 55B6373018C108D200CE933D /* English */, - 96A383052223A4FA00A27767 /* zh-Hans */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 55B6378418C10B0B00CE933D /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 55B6378518C10B0B00CE933D /* en */, - 96A3830C2223A4FB00A27767 /* zh-Hans */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 55B637F718C10DA300CE933D /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 55B637F818C10DA300CE933D /* English */, - 96A383072223A4FA00A27767 /* zh-Hans */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 55B6381E18C10EBE00CE933D /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 55B6381F18C10EBE00CE933D /* English */, - 96A383082223A4FB00A27767 /* zh-Hans */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 557951411F73006F001880D1 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; - COMBINE_HIDPI_IMAGES = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = XBOBTFF/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.mice.driver.XBOBTFF; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SDKROOT = macosx10.10; - SKIP_INSTALL = YES; - WRAPPER_EXTENSION = plugin; - }; - name = Debug; - }; - 557951421F73006F001880D1 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Manual; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = XBOBTFF/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.mice.driver.XBOBTFF; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SDKROOT = macosx10.10; - SKIP_INSTALL = YES; - WRAPPER_EXTENSION = plugin; - }; - name = Release; - }; - 55ACBFE51D5B9E2F00E4F677 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = XboxOneBluetooth/Info.plist; - MODULE_NAME = com.mice.driver.XboxOneBluetooth; - MODULE_START = XboxOneBluetooth_start; - MODULE_STOP = XboxOneBluetooth_stop; - MODULE_VERSION = 1.0.0d1; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.mice.driver.XboxOneBluetooth; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - WRAPPER_EXTENSION = kext; - }; - name = Debug; - }; - 55ACBFE61D5B9E2F00E4F677 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Manual; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = XboxOneBluetooth/Info.plist; - MODULE_NAME = com.mice.driver.XboxOneBluetooth; - MODULE_START = XboxOneBluetooth_start; - MODULE_STOP = XboxOneBluetooth_stop; - MODULE_VERSION = 1.0.0d1; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.mice.driver.XboxOneBluetooth; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - WRAPPER_EXTENSION = kext; - }; - name = Release; - }; - 55B636E318C104DB00CE933D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.16.11; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MIN_MACOS_VERSION = 10.11; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx10.10; - STRIP_INSTALLED_PRODUCT = NO; - VERSIONING_SYSTEM = "apple-generic"; - WARNING_CFLAGS = ( - "-Wno-unknown-warning-option", - "-Wno-deprecated-register", - ); - }; - name = Debug; - }; - 55B636E418C104DB00CE933D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application"; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.16.11; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.9; - MIN_MACOS_VERSION = 10.11; - SDKROOT = macosx10.10; - STRINGS_FILE_OUTPUT_ENCODING = binary; - VERSIONING_SYSTEM = "apple-generic"; - WARNING_CFLAGS = ( - "-Wno-unknown-warning-option", - "-Wno-deprecated-register", - ); - }; - name = Release; - }; - 55B636E618C104DB00CE933D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = 360Control; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES; - CODE_SIGN_STYLE = Manual; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "360Daemon/360DaemonApp-Prefix.pch"; - INFOPLIST_FILE = "360Daemon/360DaemonApp-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Application Support/MICE"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 55B636E718C104DB00CE933D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = 360Control; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Manual; - DEAD_CODE_STRIPPING = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "360Daemon/360DaemonApp-Prefix.pch"; - INFOPLIST_FILE = "360Daemon/360DaemonApp-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Application Support/MICE"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - 55B6371418C1057100CE933D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - "CLANG_CXX_LANGUAGE_STANDARD[arch=i386]" = "compiler-default"; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; - INFOPLIST_FILE = 360Controller/Info.plist; - MODULE_NAME = com.mice.driver.Xbox360Controller; - MODULE_VERSION = "${CURRENT_PROJECT_VERSION}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - WRAPPER_EXTENSION = kext; - }; - name = Debug; - }; - 55B6371518C1057100CE933D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - "CLANG_CXX_LANGUAGE_STANDARD[arch=i386]" = "compiler-default"; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Manual; - INFOPLIST_FILE = 360Controller/Info.plist; - MODULE_NAME = com.mice.driver.Xbox360Controller; - MODULE_VERSION = "${CURRENT_PROJECT_VERSION}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - WRAPPER_EXTENSION = kext; - }; - name = Release; - }; - 55B6372A18C108A500CE933D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; - EXPORTED_SYMBOLS_FILE = Feedback360/Feedback360.exp; - INFOPLIST_FILE = Feedback360/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - ONLY_ACTIVE_ARCH = NO; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - SKIP_INSTALL = YES; - WRAPPER_EXTENSION = plugin; - }; - name = Debug; - }; - 55B6372B18C108A500CE933D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Manual; - DEAD_CODE_STRIPPING = YES; - EXPORTED_SYMBOLS_FILE = Feedback360/Feedback360.exp; - INFOPLIST_FILE = Feedback360/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - SKIP_INSTALL = YES; - WRAPPER_EXTENSION = plugin; - }; - name = Release; - }; - 55B6376818C10A3200CE933D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES; - CODE_SIGN_STYLE = Manual; - CREATE_INFOPLIST_SECTION_IN_BINARY = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = DriverTool/DriverTool_Prefix.pch; - INFOPLIST_FILE = DriverTool/Info.plist; - MACH_O_TYPE = mh_execute; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 55B6376918C10A3200CE933D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Manual; - CREATE_INFOPLIST_SECTION_IN_BINARY = YES; - DEAD_CODE_STRIPPING = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = DriverTool/DriverTool_Prefix.pch; - INFOPLIST_FILE = DriverTool/Info.plist; - MACH_O_TYPE = mh_execute; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - SKIP_INSTALL = YES; - }; - name = Release; - }; - 55B6379118C10B0B00CE933D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = 360Control; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; - DEPLOYMENT_LOCATION = NO; - DSTROOT = /; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Pref360Control/Pref360Control_Prefix.pch; - HEADER_SEARCH_PATHS = ( - "$(SRCROOT)/360Daemon", - "$(inherited)", - ); - INFOPLIST_FILE = Pref360Control/Info.plist; - INSTALL_PATH = "${LOCAL_LIBRARY_DIR}/PreferencePanes"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - WRAPPER_EXTENSION = prefPane; - }; - name = Debug; - }; - 55B6379218C10B0B00CE933D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = 360Control; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Manual; - DEAD_CODE_STRIPPING = YES; - DEPLOYMENT_LOCATION = NO; - DSTROOT = /; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Pref360Control/Pref360Control_Prefix.pch; - HEADER_SEARCH_PATHS = ( - "$(SRCROOT)/360Daemon", - "$(inherited)", - ); - INFOPLIST_FILE = Pref360Control/Info.plist; - INSTALL_PATH = "${LOCAL_LIBRARY_DIR}/PreferencePanes"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - WRAPPER_EXTENSION = prefPane; - }; - name = Release; - }; - 55B637F418C10D5000CE933D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - "CLANG_CXX_LANGUAGE_STANDARD[arch=i386]" = "compiler-default"; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; - INFOPLIST_FILE = Wireless360Controller/Info.plist; - MODULE_NAME = com.mice.driver.Wireless360Controller; - MODULE_VERSION = "${CURRENT_PROJECT_VERSION}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - WRAPPER_EXTENSION = kext; - }; - name = Debug; - }; - 55B637F518C10D5000CE933D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - "CLANG_CXX_LANGUAGE_STANDARD[arch=i386]" = "compiler-default"; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Manual; - INFOPLIST_FILE = Wireless360Controller/Info.plist; - MODULE_NAME = com.mice.driver.Wireless360Controller; - MODULE_VERSION = "${CURRENT_PROJECT_VERSION}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - WRAPPER_EXTENSION = kext; - }; - name = Release; - }; - 55B6381A18C10E9500CE933D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - "CLANG_CXX_LANGUAGE_STANDARD[arch=i386]" = "compiler-default"; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; - INFOPLIST_FILE = WirelessGamingReceiver/Info.plist; - MODULE_NAME = com.mice.driver.WirelessGamingReceiver; - MODULE_VERSION = "${CURRENT_PROJECT_VERSION}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - WRAPPER_EXTENSION = kext; - }; - name = Debug; - }; - 55B6381B18C10E9500CE933D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - "CLANG_CXX_LANGUAGE_STANDARD[arch=i386]" = "compiler-default"; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Manual; - INFOPLIST_FILE = WirelessGamingReceiver/Info.plist; - MODULE_NAME = com.mice.driver.WirelessGamingReceiver; - MODULE_VERSION = "${CURRENT_PROJECT_VERSION}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - WRAPPER_EXTENSION = kext; - }; - name = Release; - }; - 55B6383A18C10F8E00CE933D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES; - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - }; - name = Debug; - }; - 55B6383B18C10F8E00CE933D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - }; - name = Release; - }; - 55FE3CA818D7B77800D69E84 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(LOCAL_LIBRARY_DIR)/Frameworks", - ); - GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; - LD_RUNPATH_SEARCH_PATHS = /Library/Frameworks; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - }; - name = Debug; - }; - 55FE3CA918D7B77800D69E84 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 62DD3D4920C044980073EC19 /* DeveloperSettings.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; - CODE_SIGN_STYLE = Manual; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(LOCAL_LIBRARY_DIR)/Frameworks", - ); - GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; - LD_RUNPATH_SEARCH_PATHS = /Library/Frameworks; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx10.10; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 557951431F73006F001880D1 /* Build configuration list for PBXNativeTarget "XBOBTFF" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 557951411F73006F001880D1 /* Debug */, - 557951421F73006F001880D1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 55ACBFE71D5B9E2F00E4F677 /* Build configuration list for PBXNativeTarget "XboxOneBluetooth" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 55ACBFE51D5B9E2F00E4F677 /* Debug */, - 55ACBFE61D5B9E2F00E4F677 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 55B636AF18C104DB00CE933D /* Build configuration list for PBXProject "360 Driver" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 55B636E318C104DB00CE933D /* Debug */, - 55B636E418C104DB00CE933D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 55B636E518C104DB00CE933D /* Build configuration list for PBXNativeTarget "360Daemon" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 55B636E618C104DB00CE933D /* Debug */, - 55B636E718C104DB00CE933D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 55B6371318C1057100CE933D /* Build configuration list for PBXNativeTarget "360Controller" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 55B6371418C1057100CE933D /* Debug */, - 55B6371518C1057100CE933D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 55B6372918C108A500CE933D /* Build configuration list for PBXNativeTarget "Feedback360" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 55B6372A18C108A500CE933D /* Debug */, - 55B6372B18C108A500CE933D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 55B6376718C10A3200CE933D /* Build configuration list for PBXNativeTarget "DriverTool" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 55B6376818C10A3200CE933D /* Debug */, - 55B6376918C10A3200CE933D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 55B6379018C10B0B00CE933D /* Build configuration list for PBXNativeTarget "Pref360Control" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 55B6379118C10B0B00CE933D /* Debug */, - 55B6379218C10B0B00CE933D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 55B637F318C10D5000CE933D /* Build configuration list for PBXNativeTarget "Wireless360Controller" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 55B637F418C10D5000CE933D /* Debug */, - 55B637F518C10D5000CE933D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 55B6381918C10E9500CE933D /* Build configuration list for PBXNativeTarget "WirelessGamingReceiver" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 55B6381A18C10E9500CE933D /* Debug */, - 55B6381B18C10E9500CE933D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 55B6383918C10F8E00CE933D /* Build configuration list for PBXAggregateTarget "Whole Driver" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 55B6383A18C10F8E00CE933D /* Debug */, - 55B6383B18C10F8E00CE933D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 55FE3CAA18D7B77800D69E84 /* Build configuration list for PBXNativeTarget "testhaptic" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 55FE3CA818D7B77800D69E84 /* Debug */, - 55FE3CA918D7B77800D69E84 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 55B636AC18C104DB00CE933D /* Project object */; -} diff --git a/360 Driver.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/360 Driver.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 5a85863f..00000000 --- a/360 Driver.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/360 Driver.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/360 Driver.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/360 Driver.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/360Controller/360Controller.xcodeproj/project.pbxproj b/360Controller/360Controller.xcodeproj/project.pbxproj new file mode 100644 index 00000000..04a14efa --- /dev/null +++ b/360Controller/360Controller.xcodeproj/project.pbxproj @@ -0,0 +1,390 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 32D94FC60562CBF700B6AF17 /* _60Controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A224C3EFF42367911CA2CB7 /* _60Controller.h */; }; + 32D94FC80562CBF700B6AF17 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; + 32D94FCA0562CBF700B6AF17 /* _60Controller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A224C3FFF42367911CA2CB7 /* _60Controller.cpp */; settings = {ATTRIBUTES = (); }; }; + 3B36DCC410B7816F00FFD769 /* Controller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B36DCC210B7816F00FFD769 /* Controller.cpp */; }; + 3B36DCC510B7816F00FFD769 /* Controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B36DCC310B7816F00FFD769 /* Controller.h */; }; + 3B36DCCB10B7817E00FFD769 /* ChatPad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B36DCC610B7817E00FFD769 /* ChatPad.cpp */; }; + 3B36DCCC10B7817E00FFD769 /* ChatPad.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B36DCC710B7817E00FFD769 /* ChatPad.h */; }; + 3B36DCCD10B7817E00FFD769 /* chatpadhid.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B36DCC810B7817E00FFD769 /* chatpadhid.h */; }; + 3B36DCCE10B7817E00FFD769 /* chatpadkeys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B36DCC910B7817E00FFD769 /* chatpadkeys.cpp */; }; + 3B36DCCF10B7817E00FFD769 /* chatpadkeys.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B36DCCA10B7817E00FFD769 /* chatpadkeys.h */; }; + 3BB5E09C09641F8200F83598 /* xbox360hid.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BB5E09B09641F8200F83598 /* xbox360hid.h */; }; + 3BCE45CA09638EBC00B69EDF /* ControlStruct.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BCE45C909638EBC00B69EDF /* ControlStruct.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1A224C3EFF42367911CA2CB7 /* _60Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _60Controller.h; sourceTree = ""; }; + 1A224C3FFF42367911CA2CB7 /* _60Controller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _60Controller.cpp; sourceTree = ""; }; + 32D94FCF0562CBF700B6AF17 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 32D94FD00562CBF700B6AF17 /* 360Controller.kext */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = 360Controller.kext; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B0F1276097B395B00127827 /* Feedback360.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Feedback360.bundle; path = ../Feedback360/build/Deployment/Feedback360.bundle; sourceTree = SOURCE_ROOT; }; + 3B36DCC210B7816F00FFD769 /* Controller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Controller.cpp; sourceTree = ""; }; + 3B36DCC310B7816F00FFD769 /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Controller.h; sourceTree = ""; }; + 3B36DCC610B7817E00FFD769 /* ChatPad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChatPad.cpp; sourceTree = ""; }; + 3B36DCC710B7817E00FFD769 /* ChatPad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatPad.h; sourceTree = ""; }; + 3B36DCC810B7817E00FFD769 /* chatpadhid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chatpadhid.h; sourceTree = ""; }; + 3B36DCC910B7817E00FFD769 /* chatpadkeys.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chatpadkeys.cpp; sourceTree = ""; }; + 3B36DCCA10B7817E00FFD769 /* chatpadkeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chatpadkeys.h; sourceTree = ""; }; + 3BB5E09B09641F8200F83598 /* xbox360hid.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = xbox360hid.h; sourceTree = ""; }; + 3BCE45C909638EBC00B69EDF /* ControlStruct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ControlStruct.h; sourceTree = ""; }; + 8DA8362C06AD9B9200E5AC22 /* Kernel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kernel.framework; path = /System/Library/Frameworks/Kernel.framework; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 32D94FCB0562CBF700B6AF17 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* 360Controller */ = { + isa = PBXGroup; + children = ( + 247142CAFF3F8F9811CA285C /* Source */, + 089C167CFE841241C02AAC07 /* Resources */, + 19C28FB6FE9D52B211CA2CBB /* Products */, + ); + name = 360Controller; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 3B2EF52A0965A0AE007BFB7B /* Kernel Driver */, + ); + name = Resources; + sourceTree = ""; + }; + 19C28FB6FE9D52B211CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 32D94FD00562CBF700B6AF17 /* 360Controller.kext */, + ); + name = Products; + sourceTree = ""; + }; + 247142CAFF3F8F9811CA285C /* Source */ = { + isa = PBXGroup; + children = ( + 3B2EF19A0965A03E007BFB7B /* Kernel Driver */, + ); + name = Source; + sourceTree = ""; + }; + 3B2EF19A0965A03E007BFB7B /* Kernel Driver */ = { + isa = PBXGroup; + children = ( + 3B36DCC010B7815000FFD769 /* Controller */, + 3B36DCC110B7815700FFD769 /* ChatPad */, + 3BCE45C909638EBC00B69EDF /* ControlStruct.h */, + 1A224C3EFF42367911CA2CB7 /* _60Controller.h */, + 1A224C3FFF42367911CA2CB7 /* _60Controller.cpp */, + ); + name = "Kernel Driver"; + sourceTree = ""; + }; + 3B2EF52A0965A0AE007BFB7B /* Kernel Driver */ = { + isa = PBXGroup; + children = ( + 3B0F1276097B395B00127827 /* Feedback360.bundle */, + 8DA8362C06AD9B9200E5AC22 /* Kernel.framework */, + 32D94FCF0562CBF700B6AF17 /* Info.plist */, + 089C167DFE841241C02AAC07 /* InfoPlist.strings */, + ); + name = "Kernel Driver"; + sourceTree = ""; + }; + 3B36DCC010B7815000FFD769 /* Controller */ = { + isa = PBXGroup; + children = ( + 3B36DCC210B7816F00FFD769 /* Controller.cpp */, + 3B36DCC310B7816F00FFD769 /* Controller.h */, + 3BB5E09B09641F8200F83598 /* xbox360hid.h */, + ); + name = Controller; + sourceTree = ""; + }; + 3B36DCC110B7815700FFD769 /* ChatPad */ = { + isa = PBXGroup; + children = ( + 3B36DCC610B7817E00FFD769 /* ChatPad.cpp */, + 3B36DCC710B7817E00FFD769 /* ChatPad.h */, + 3B36DCC910B7817E00FFD769 /* chatpadkeys.cpp */, + 3B36DCCA10B7817E00FFD769 /* chatpadkeys.h */, + 3B36DCC810B7817E00FFD769 /* chatpadhid.h */, + ); + name = ChatPad; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 32D94FC50562CBF700B6AF17 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 32D94FC60562CBF700B6AF17 /* _60Controller.h in Headers */, + 3BCE45CA09638EBC00B69EDF /* ControlStruct.h in Headers */, + 3BB5E09C09641F8200F83598 /* xbox360hid.h in Headers */, + 3B36DCC510B7816F00FFD769 /* Controller.h in Headers */, + 3B36DCCC10B7817E00FFD769 /* ChatPad.h in Headers */, + 3B36DCCD10B7817E00FFD769 /* chatpadhid.h in Headers */, + 3B36DCCF10B7817E00FFD769 /* chatpadkeys.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 32D94FC30562CBF700B6AF17 /* 360Controller */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3BBDC682097938A90023AAD8 /* Build configuration list for PBXNativeTarget "360Controller" */; + buildPhases = ( + 32D94FC50562CBF700B6AF17 /* Headers */, + 32D94FC70562CBF700B6AF17 /* Resources */, + 32D94FC90562CBF700B6AF17 /* Sources */, + 32D94FCB0562CBF700B6AF17 /* Frameworks */, + 32D94FCC0562CBF700B6AF17 /* Rez */, + 3B0F12A1097B3A3A00127827 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = 360Controller; + productInstallPath = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + productName = 360Controller; + productReference = 32D94FD00562CBF700B6AF17 /* 360Controller.kext */; + productType = "com.apple.product-type.kernel-extension.iokit"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 3BBDC686097938A90023AAD8 /* Build configuration list for PBXProject "360Controller" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 089C166AFE841209C02AAC07 /* 360Controller */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 32D94FC30562CBF700B6AF17 /* 360Controller */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 32D94FC70562CBF700B6AF17 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 32D94FC80562CBF700B6AF17 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 32D94FCC0562CBF700B6AF17 /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B0F12A1097B3A3A00127827 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cd \"$TARGET_BUILD_DIR/$TARGET_NAME.kext/Contents\"\nmkdir PlugIns > /dev/null 2>&1\nrm -R PlugIns/Feedback360.plugin > /dev/null 2>&1\necho \"$SRCROOT/../Feedback360/build/Deployment/Feedback360.bundle\"\ncp -R \"$SRCROOT/../Feedback360/build/Deployment/Feedback360.bundle\" PlugIns/Feedback360.plugin\n# Renaming extension from bundle to a plugin? Could be naughty."; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 32D94FC90562CBF700B6AF17 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 32D94FCA0562CBF700B6AF17 /* _60Controller.cpp in Sources */, + 3B36DCC410B7816F00FFD769 /* Controller.cpp in Sources */, + 3B36DCCB10B7817E00FFD769 /* ChatPad.cpp in Sources */, + 3B36DCCE10B7817E00FFD769 /* chatpadkeys.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3BBDC683097938A90023AAD8 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1.0.0d12; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + MODULE_NAME = com.mice.driver.Xbox360Controller; + MODULE_VERSION = 1.0.0d11; + PREBINDING = NO; + PRODUCT_NAME = 360Controller; + SDKROOT = ""; + WRAPPER_EXTENSION = kext; + ZERO_LINK = YES; + }; + name = Development; + }; + 3BBDC684097938A90023AAD8 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + x86_64, + ); + COPY_PHASE_STRIP = YES; + CURRENT_PROJECT_VERSION = 1.0.0d12; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + LD_GENERATE_MAP_FILE = NO; + MODULE_NAME = com.mice.driver.Xbox360Controller; + MODULE_VERSION = 1.0.0d11; + PREBINDING = NO; + PRODUCT_NAME = 360Controller; + WRAPPER_EXTENSION = kext; + ZERO_LINK = NO; + }; + name = Deployment; + }; + 3BBDC685097938A90023AAD8 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + CURRENT_PROJECT_VERSION = 1.0.0d12; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + MODULE_NAME = com.mice.driver.Xbox360Controller; + MODULE_VERSION = 1.0.0d11; + PREBINDING = NO; + PRODUCT_NAME = 360Controller; + WRAPPER_EXTENSION = kext; + }; + name = Default; + }; + 3BBDC687097938A90023AAD8 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Development; + }; + 3BBDC688097938A90023AAD8 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + GCC_VERSION = ""; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + "SDKROOT[arch=x86_64]" = ""; + }; + name = Deployment; + }; + 3BBDC689097938A90023AAD8 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Default; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3BBDC682097938A90023AAD8 /* Build configuration list for PBXNativeTarget "360Controller" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3BBDC683097938A90023AAD8 /* Development */, + 3BBDC684097938A90023AAD8 /* Deployment */, + 3BBDC685097938A90023AAD8 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + 3BBDC686097938A90023AAD8 /* Build configuration list for PBXProject "360Controller" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3BBDC687097938A90023AAD8 /* Development */, + 3BBDC688097938A90023AAD8 /* Deployment */, + 3BBDC689097938A90023AAD8 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/360Controller/ChatPad.cpp b/360Controller/ChatPad.cpp index 61ea3f97..7b8feee8 100644 --- a/360Controller/ChatPad.cpp +++ b/360Controller/ChatPad.cpp @@ -1,21 +1,21 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + ChatPad.cpp - Implementation of the ChatPad Accessory driver - + This file is part of Xbox360Controller. - + Xbox360Controller is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + Xbox360Controller is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -34,8 +34,8 @@ OSDefineMetaClassAndStructors(ChatPadKeyboardClass, IOHIDDevice) IOReturn ChatPadKeyboardClass::newReportDescriptor(IOMemoryDescriptor **descriptor) const { IOBufferMemoryDescriptor *buffer; - - buffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, kIODirectionOut, sizeof(HID_ChatPad::ReportDescriptor)); + + buffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, 0, sizeof(HID_ChatPad::ReportDescriptor)); if (buffer == NULL) return kIOReturnNoResources; buffer->writeBytes(0, HID_ChatPad::ReportDescriptor, sizeof(HID_ChatPad::ReportDescriptor)); @@ -106,7 +106,7 @@ OSNumber* ChatPadKeyboardClass::newProductIDNumber() const static IOHIDDevice* GetParent(const IOService *current) { Xbox360Peripheral *owner; - + owner = OSDynamicCast(Xbox360Peripheral, current->getProvider()); if (owner == NULL) return NULL; diff --git a/360Controller/ChatPad.h b/360Controller/ChatPad.h index 89de84c0..c7afdfaf 100644 --- a/360Controller/ChatPad.h +++ b/360Controller/ChatPad.h @@ -1,21 +1,21 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + ChatPad.h - Driver class for the ChatPad accessory - + This file is part of Xbox360Controller. - + Xbox360Controller is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + Xbox360Controller is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -26,7 +26,7 @@ class ChatPadKeyboardClass : public IOHIDDevice { OSDeclareDefaultStructors(ChatPadKeyboardClass) - + private: public: @@ -34,12 +34,12 @@ class ChatPadKeyboardClass : public IOHIDDevice // IOHidDevice methods virtual IOReturn newReportDescriptor(IOMemoryDescriptor **descriptor) const; - + virtual IOReturn setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options=0); virtual IOReturn getReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options); virtual IOReturn handleReport(IOMemoryDescriptor *report, IOHIDReportType reportType = kIOHIDReportTypeInput, IOOptionBits options = 0); - + virtual OSString* newManufacturerString() const; virtual OSNumber* newPrimaryUsageNumber() const; virtual OSNumber* newPrimaryUsagePageNumber() const; @@ -48,6 +48,6 @@ class ChatPadKeyboardClass : public IOHIDDevice virtual OSString* newSerialNumberString() const; virtual OSString* newTransportString() const; virtual OSNumber* newVendorIDNumber() const; - + virtual OSNumber* newLocationIDNumber() const; }; diff --git a/360Controller/ControlStruct.h b/360Controller/ControlStruct.h index 68f4026f..80c5a651 100644 --- a/360Controller/ControlStruct.h +++ b/360Controller/ControlStruct.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + ControlStruct.h - Structures used by the device - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -23,50 +23,50 @@ #ifndef __CONTROLSTRUCT_H__ #define __CONTROLSTRUCT_H__ -typedef UInt8 Xbox360_Byte; -typedef UInt16 Xbox360_Short; -typedef SInt16 Xbox360_SShort; +typedef UInt8 XBox360_Byte; +typedef UInt16 XBox360_Short; +typedef SInt16 XBox360_SShort; #define Xbox360_Prepare(x,t) {memset(&x,0,sizeof(x));x.header.command=t;x.header.size=sizeof(x);} #define PACKED __attribute__((__packed__)) // Common structure format -typedef struct XBOX360_PACKET { - Xbox360_Byte command; - Xbox360_Byte size; +typedef struct { + XBox360_Byte command; + XBox360_Byte size; } PACKED XBOX360_PACKET; // Analog stick format -typedef struct XBOX360_HAT { - Xbox360_SShort x,y; +typedef struct { + XBox360_SShort x,y; } PACKED XBOX360_HAT; // Structure describing the report had back from the controller -typedef struct XBOX360_IN_REPORT { +typedef struct { XBOX360_PACKET header; - Xbox360_Short buttons; - Xbox360_Byte trigL,trigR; + XBox360_Short buttons; + XBox360_Byte trigL,trigR; XBOX360_HAT left,right; - Xbox360_Byte reserved[6]; + XBox360_Byte reserved[6]; } PACKED XBOX360_IN_REPORT; // Structure describing the command to change LED status -typedef struct XBOX360_OUT_LED { +typedef struct { XBOX360_PACKET header; - Xbox360_Byte pattern; + XBox360_Byte pattern; } PACKED XBOX360_OUT_LED; // Structure describing the command to change rumble motor status -typedef struct XBOX360_OUT_RUMBLE { +typedef struct { XBOX360_PACKET header; - Xbox360_Byte reserved1; - Xbox360_Byte big,little; - Xbox360_Byte reserved[3]; + XBox360_Byte reserved1; + XBox360_Byte big,little; + XBox360_Byte reserved[3]; } PACKED XBOX360_OUT_RUMBLE; // Enumeration of command types -enum CommandTypes { +enum { // In inReport = 0, // Out @@ -75,7 +75,7 @@ enum CommandTypes { }; // Button bits -enum ButtonBits { +enum { btnHatRight = 0x8000, btnHatLeft = 0x4000, btnBack = 0x2000, @@ -95,7 +95,7 @@ enum ButtonBits { }; // LED values -enum LEDValues { +enum { ledOff = 0x00, ledBlinkingAll = 0x01, ledFlashOn1 = 0x02, diff --git a/360Controller/Controller.cpp b/360Controller/Controller.cpp index 8fd4a191..7bc3903e 100644 --- a/360Controller/Controller.cpp +++ b/360Controller/Controller.cpp @@ -1,21 +1,21 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + Controller.cpp - driver class for the 360 controller - + This file is part of Xbox360Controller. - + Xbox360Controller is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + Xbox360Controller is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -24,19 +24,19 @@ #include #include #include "Controller.h" +#include "ControlStruct.h" namespace HID_360 { #include "xbox360hid.h" } #include "_60Controller.h" -#pragma mark - Xbox360ControllerClass - OSDefineMetaClassAndStructors(Xbox360ControllerClass, IOHIDDevice) static Xbox360Peripheral* GetOwner(IOService *us) { - IOService *prov = us->getProvider(); - + IOService *prov; + + prov = us->getProvider(); if (prov == NULL) return NULL; return OSDynamicCast(Xbox360Peripheral, prov); @@ -44,8 +44,9 @@ static Xbox360Peripheral* GetOwner(IOService *us) static IOUSBDevice* GetOwnerProvider(const IOService *us) { - IOService *prov = us->getProvider(), *provprov; - + IOService *prov, *provprov; + + prov = us->getProvider(); if (prov == NULL) return NULL; provprov = prov->getProvider(); @@ -72,9 +73,10 @@ IOReturn Xbox360ControllerClass::setProperties(OSObject *properties) // Returns the HID descriptor for this device IOReturn Xbox360ControllerClass::newReportDescriptor(IOMemoryDescriptor **descriptor) const { - IOBufferMemoryDescriptor *buffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task,kIODirectionOut,sizeof(HID_360::ReportDescriptor)); - - if (buffer == NULL) return kIOReturnNoResources; + IOBufferMemoryDescriptor *buffer; + + buffer=IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task,0,sizeof(HID_360::ReportDescriptor)); + if(buffer==NULL) return kIOReturnNoResources; buffer->writeBytes(0,HID_360::ReportDescriptor,sizeof(HID_360::ReportDescriptor)); *descriptor=buffer; return kIOReturnSuccess; @@ -84,34 +86,32 @@ IOReturn Xbox360ControllerClass::newReportDescriptor(IOMemoryDescriptor **descri IOReturn Xbox360ControllerClass::setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options) { char data[2]; - - report->readBytes(0, data, 2); - if (GetOwner(this)->rumbleType == 1) // Don't Rumble - return kIOReturnSuccess; + + report->readBytes(0,data,2); switch(data[0]) { case 0x00: // Set force feedback - if((data[1]!=report->getLength()) || (data[1]!=0x04)) return kIOReturnUnsupported; + if((data[1]!=report->getLength())||(data[1]!=0x04)) return kIOReturnUnsupported; { XBOX360_OUT_RUMBLE rumble; - + Xbox360_Prepare(rumble,outRumble); report->readBytes(2,data,2); rumble.big=data[0]; rumble.little=data[1]; GetOwner(this)->QueueWrite(&rumble,sizeof(rumble)); - // IOLog("Set rumble: big(%d) little(%d)\n", rumble.big, rumble.little); +// IOLog("Set rumble: big(%d) little(%d)\n", rumble.big, rumble.little); } return kIOReturnSuccess; case 0x01: // Set LEDs if((data[1]!=report->getLength())||(data[1]!=0x03)) return kIOReturnUnsupported; { XBOX360_OUT_LED led; - + report->readBytes(2,data,1); Xbox360_Prepare(led,outLed); led.pattern=data[0]; GetOwner(this)->QueueWrite(&led,sizeof(led)); - // IOLog("Set LED: %d\n", led.pattern); +// IOLog("Set LED: %d\n", led.pattern); } return kIOReturnSuccess; default: @@ -127,37 +127,18 @@ IOReturn Xbox360ControllerClass::getReport(IOMemoryDescriptor *report,IOHIDRepor return kIOReturnUnsupported; } -IOReturn Xbox360ControllerClass::handleReport(IOMemoryDescriptor * descriptor, IOHIDReportType reportType, IOOptionBits options) { - if (descriptor->getLength() >= sizeof(XBOX360_IN_REPORT)) { - IOBufferMemoryDescriptor *desc = OSDynamicCast(IOBufferMemoryDescriptor, descriptor); - if (desc != NULL) { - XBOX360_IN_REPORT *report=(XBOX360_IN_REPORT*)desc->getBytesNoCopy(); - if ((report->header.command==inReport) && (report->header.size==sizeof(XBOX360_IN_REPORT))) { - GetOwner(this)->fiddleReport(report->left, report->right); - if (!(GetOwner(this)->noMapping)) - remapButtons(report); - if (GetOwner(this)->swapSticks) - remapAxes(report); - } - } - } - IOReturn ret = IOHIDDevice::handleReport(descriptor, reportType, options); - return ret; -} - - // Returns the string for the specified index from the USB device's string list, with an optional default OSString* Xbox360ControllerClass::getDeviceString(UInt8 index,const char *def) const { IOReturn err; char buf[1024]; const char *string; - - err = GetOwnerProvider(this)->GetStringDescriptor(index, buf, sizeof(buf)); + + err = GetOwnerProvider(this)->GetStringDescriptor(index,buf,sizeof(buf)); if(err==kIOReturnSuccess) string=buf; else { - if(def == NULL) string = "Unknown"; - else string = def; + if(def==NULL) string="Unknown"; + else string=def; } return OSString::withCString(string); } @@ -184,7 +165,7 @@ OSNumber* Xbox360ControllerClass::newProductIDNumber() const OSString* Xbox360ControllerClass::newProductString() const { - return OSString::withCString("Xbox 360 Wired Controller"); + return getDeviceString(GetOwnerProvider(this)->GetProductStringIndex()); } OSString* Xbox360ControllerClass::newSerialNumberString() const @@ -206,8 +187,8 @@ OSNumber* Xbox360ControllerClass::newLocationIDNumber() const { IOUSBDevice *device; OSNumber *number; - UInt32 location = 0; - + UInt32 location; + device = GetOwnerProvider(this); if (device) { @@ -220,573 +201,11 @@ OSNumber* Xbox360ControllerClass::newLocationIDNumber() const // Make up an address if ((number = OSDynamicCast(OSNumber, device->getProperty("USB Address")))) location |= number->unsigned8BitValue() << 24; - + if ((number = OSDynamicCast(OSNumber, device->getProperty("idProduct")))) location |= number->unsigned8BitValue() << 16; } } - + return (location != 0) ? OSNumber::withNumber(location, 32) : 0; } - -void Xbox360ControllerClass::remapButtons(void *buffer) -{ - XBOX360_IN_REPORT *report360 = (XBOX360_IN_REPORT*)buffer; - UInt16 new_buttons = 0; - - new_buttons |= ((report360->buttons & 1) == 1) << GetOwner(this)->mapping[0]; - new_buttons |= ((report360->buttons & 2) == 2) << GetOwner(this)->mapping[1]; - new_buttons |= ((report360->buttons & 4) == 4) << GetOwner(this)->mapping[2]; - new_buttons |= ((report360->buttons & 8) == 8) << GetOwner(this)->mapping[3]; - new_buttons |= ((report360->buttons & 16) == 16) << GetOwner(this)->mapping[4]; - new_buttons |= ((report360->buttons & 32) == 32) << GetOwner(this)->mapping[5]; - new_buttons |= ((report360->buttons & 64) == 64) << GetOwner(this)->mapping[6]; - new_buttons |= ((report360->buttons & 128) == 128) << GetOwner(this)->mapping[7]; - new_buttons |= ((report360->buttons & 256) == 256) << GetOwner(this)->mapping[8]; - new_buttons |= ((report360->buttons & 512) == 512) << GetOwner(this)->mapping[9]; - new_buttons |= ((report360->buttons & 1024) == 1024) << GetOwner(this)->mapping[10]; - new_buttons |= ((report360->buttons & 4096) == 4096) << GetOwner(this)->mapping[11]; - new_buttons |= ((report360->buttons & 8192) == 8192) << GetOwner(this)->mapping[12]; - new_buttons |= ((report360->buttons & 16384) == 16384) << GetOwner(this)->mapping[13]; - new_buttons |= ((report360->buttons & 32768) == 32768) << GetOwner(this)->mapping[14]; - -// IOLog("BUTTON PACKET - %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n", GetOwner(this)->mapping[0], GetOwner(this)->mapping[1], GetOwner(this)->mapping[2], GetOwner(this)->mapping[3], GetOwner(this)->mapping[4], GetOwner(this)->mapping[5], GetOwner(this)->mapping[6], GetOwner(this)->mapping[7], GetOwner(this)->mapping[8], GetOwner(this)->mapping[9], GetOwner(this)->mapping[10], GetOwner(this)->mapping[11], GetOwner(this)->mapping[12], GetOwner(this)->mapping[13], GetOwner(this)->mapping[14]); - - report360->buttons = new_buttons; -} - -void Xbox360ControllerClass::remapAxes(void *buffer) -{ - XBOX360_IN_REPORT *report360 = (XBOX360_IN_REPORT*)buffer; - - XBOX360_HAT temp = report360->left; - report360->left = report360->right; - report360->right = temp; -} - - -#pragma mark - XboxOnePretend360Class - -/* - * Xbox 360 controller. - * Fake PID and VID of Xbox 360 controller - */ - -OSDefineMetaClassAndStructors(Xbox360Pretend360Class, Xbox360ControllerClass) - -OSString* Xbox360Pretend360Class::newProductString() const -{ - return OSString::withCString("Xbox 360 Wired Controller"); -} - -OSNumber* Xbox360Pretend360Class::newProductIDNumber() const -{ - return OSNumber::withNumber(654,16); -} - -OSNumber* Xbox360Pretend360Class::newVendorIDNumber() const -{ - return OSNumber::withNumber(1118,16); -} - -#pragma mark - XboxOriginalControllerClass - -/* - * Xbox original controller. - * Convert reports to Xbox 360 controller format and fake product ids - */ - -typedef struct { - XBOX360_PACKET header; - Xbox360_Byte buttons; - Xbox360_Byte reserved1; - Xbox360_Byte a, b, x, y, black, white; - Xbox360_Byte trigL,trigR; - Xbox360_Short xL,yL; - Xbox360_Short xR,yR; -} PACKED XBOX_IN_REPORT; - -typedef struct { - XBOX360_PACKET header; - Xbox360_Byte reserved1; - Xbox360_Byte left; - Xbox360_Byte reserved2; - Xbox360_Byte right; -} PACKED XBOX_OUT_RUMBLE; - - -OSDefineMetaClassAndStructors(XboxOriginalControllerClass, Xbox360ControllerClass) - -OSNumber* XboxOriginalControllerClass::newVendorIDNumber() const -{ - return OSNumber::withNumber(1118,16); -} - -OSString* XboxOriginalControllerClass::newManufacturerString() const -{ - return OSString::withCString("Holtek"); -} - -OSNumber* XboxOriginalControllerClass::newProductIDNumber() const -{ - return OSNumber::withNumber(654,16); -} - -OSString* XboxOriginalControllerClass::newProductString() const -{ - return OSString::withCString("Xbox Original Wired Controller"); -} - -static void logData(UInt8 *data, int len) { - for (int i = 0; i < len; i++) IOLog("%02x ", (int)data[i]); - IOLog("\n"); -} - -// This converts Xbox original controller report into Xbox360 form -// See https://github.com/Grumbel/xboxdrv/blob/master/src/controller/xbox_controller.cpp -static void convertFromXboxOriginal(UInt8 *data) { - if (data[0] != 0x00 || data[1] != 0x14) { - IOLog("Unknown report command %d, length %d\n", (int)data[0], (int)data[1]); - return; - } - XBOX360_IN_REPORT report; - Xbox360_Prepare (report, 0); - XBOX_IN_REPORT *in = (XBOX_IN_REPORT*)data; - Xbox360_Short buttons = in->buttons; - if (in->a) buttons |= 1 << 12; // a - if (in->b) buttons |= 1 << 13; // b - if (in->x) buttons |= 1 << 14; // x - if (in->y) buttons |= 1 << 15; // y - if (in->black) buttons |= 1 << 9; // black mapped to shoulder right - if (in->white) buttons |= 1 << 8; // white mapped to shoulder left - report.buttons = buttons; - report.trigL = in->trigL; - report.trigR = in->trigR; - report.left.x = in->xL; - report.left.y = in->yL; - report.right.x = in->xR; - report.right.y = in->yR; - *((XBOX360_IN_REPORT *)data) = report; -} - -IOReturn XboxOriginalControllerClass::handleReport(IOMemoryDescriptor * descriptor, IOHIDReportType reportType, IOOptionBits options) { -// IOLog("%s\n", __FUNCTION__); - UInt8 data[sizeof(XBOX360_IN_REPORT)]; - if (descriptor->getLength() >= sizeof(XBOX360_IN_REPORT)) { - descriptor->readBytes(0, data, sizeof(XBOX360_IN_REPORT)); - const XBOX360_IN_REPORT *report=(const XBOX360_IN_REPORT*)data; - if ((report->header.command==inReport) && (report->header.size==sizeof(XBOX360_IN_REPORT))) { - convertFromXboxOriginal(data); - if (memcmp(data, lastData, sizeof(XBOX360_IN_REPORT)) == 0) { - repeatCount ++; - // drop triplicate reports - if (repeatCount > 1) { - return kIOReturnSuccess; - } - } else { - repeatCount = 0; - } - memcpy(lastData, data, sizeof(XBOX360_IN_REPORT)); - descriptor->writeBytes(0, data, sizeof(XBOX360_IN_REPORT)); - //if (data[2]&1) { - // IOLog("%s after %d ", __FUNCTION__, (int)reportType); - // logData(data, 20); - //} - } else { - IOLog("%s %d \n", __FUNCTION__, (int)descriptor->getLength()); - IOLog("%s %d \n", __FUNCTION__, (int)reportType); - logData(data, (int)descriptor->getLength()); - } - - } else { - descriptor->readBytes(0, data, descriptor->getLength()); - if (reportType != 0 && data[0] != 0) { - // not a rumble report - IOLog("%s %d \n", __FUNCTION__, (int)reportType); - logData(data, (int)descriptor->getLength()); - } - } - - IOReturn ret = Xbox360ControllerClass::handleReport(descriptor, reportType, options); - //IOLog("%s END\n", __FUNCTION__); - return ret; -} - -IOReturn XboxOriginalControllerClass::setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options) -{ - char data[2]; - - report->readBytes(0, data, 2); - if (GetOwner(this)->rumbleType == 1) // Don't Rumble - return kIOReturnSuccess; - switch(data[0]) { - case 0x00: // Set force feedback - if((data[1]!=report->getLength()) || (data[1]!=0x04)) return kIOReturnUnsupported; - { - XBOX_OUT_RUMBLE rumble; - Xbox360_Prepare(rumble,outRumble); - report->readBytes(2,data,2); - rumble.left=data[0]; // CHECKME != big, little - rumble.right=data[1]; - GetOwner(this)->QueueWrite(&rumble,sizeof(rumble)); - // IOLog("Set rumble: big(%d) little(%d)\n", rumble.big, rumble.little); - } - return kIOReturnSuccess; - case 0x01: // Set LEDs - if((data[1]!=report->getLength())||(data[1]!=0x03)) return kIOReturnUnsupported; - // No leds - return kIOReturnSuccess; - - default: - IOLog("Unknown escape %d\n", data[0]); - return kIOReturnUnsupported; - } -} - - -#pragma mark - XboxOneControllerClass - -/* - * Xbox One controller. - * Does not pretend to be an Xbox 360 controller. - */ - -typedef struct { - UInt8 command; - UInt8 reserved1; - UInt8 counter; - UInt8 size; -} PACKED XBOXONE_HEADER; - -typedef struct { - XBOXONE_HEADER header; - UInt16 buttons; - UInt16 trigL, trigR; - XBOX360_HAT left, right; -} PACKED XBOXONE_IN_REPORT; - -typedef struct { - XBOXONE_HEADER header; - UInt16 buttons; - UInt16 trigL, trigR; - XBOX360_HAT left, right; - UInt8 unknown1[6]; - UInt8 triggersAsButtons; // 0x40 is RT. 0x80 is LT - UInt8 unknown2[7]; -} PACKED XBOXONE_IN_FIGHTSTICK_REPORT; - -typedef struct { - XBOXONE_HEADER header; - UInt16 buttons; - union { - UInt16 steering; // leftX - SInt16 leftX; - }; - union { - UInt16 accelerator; - UInt16 trigR; - }; - union { - UInt16 brake; - UInt16 trigL; - }; - union { - UInt8 clutch; - UInt8 leftY; - }; - UInt8 unknown3[8]; -} PACKED XBOXONE_IN_WHEEL_REPORT; - -typedef struct { - XBOXONE_HEADER header; - UInt16 buttons; - UInt16 trigL, trigR; - XBOX360_HAT left, right; - UInt16 true_buttons; - UInt16 true_trigL, true_trigR; - XBOX360_HAT true_left, true_right; - UInt8 paddle; -} PACKED XBOXONE_ELITE_IN_REPORT; - -typedef struct { - XBOXONE_HEADER header; - UInt8 state; - UInt8 dummy; -} PACKED XBOXONE_IN_GUIDE_REPORT; - -typedef struct { - XBOXONE_HEADER header; - UInt8 data[4]; - UInt8 zero[5]; -} PACKED XBOXONE_OUT_GUIDE_REPORT; - -typedef struct { - XBOXONE_HEADER header; - UInt8 mode; // So far always 0x00 - UInt8 rumbleMask; // So far always 0x0F - UInt8 trigL, trigR; - UInt8 little, big; - UInt8 length; // Length of time to rumble - UInt8 period; // Period of time between pulses. DO NOT INCLUDE WHEN SUBSTRUCTURE IS 0x09 - UInt8 extra; -} PACKED XBOXONE_OUT_RUMBLE; - -typedef struct { - XBOXONE_HEADER header; // 0x0a 0x20 0x04 0x03 - UInt8 zero; - UInt8 command; - UInt8 brightness; // 0x00 - 0x20 -} PACKED XBOXONE_OUT_LED; - -typedef enum { - XONE_SYNC = 0x0001, // Bit 00 - XONE_MENU = 0x0004, // Bit 02 - XONE_VIEW = 0x0008, // Bit 03 - XONE_A = 0x0010, // Bit 04 - XONE_B = 0x0020, // Bit 05 - XONE_X = 0x0040, // Bit 06 - XONE_Y = 0x0080, // Bit 07 - XONE_DPAD_UP = 0x0100, // Bit 08 - XONE_DPAD_DOWN = 0x0200, // Bit 09 - XONE_DPAD_LEFT = 0x0400, // Bit 10 - XONE_DPAD_RIGHT = 0x0800, // Bit 11 - XONE_LEFT_SHOULDER = 0x1000, // Bit 12 - XONE_RIGHT_SHOULDER = 0x2000, // Bit 13 - XONE_LEFT_THUMB = 0x4000, // Bit 14 - XONE_RIGHT_THUMB = 0x8000, // Bit 15 -} GAMEPAD_XONE; - -typedef enum { - XONE_PADDLE_UPPER_LEFT = 0x0001, // Bit 00 - XONE_PADDLE_UPPER_RIGHT = 0x0002, // Bit 01 - XONE_PADDLE_LOWER_LEFT = 0x0004, // Bit 02 - XONE_PADDLE_LOWER_RIGHT = 0x0008, // Bit 03 - XONE_PADDLE_PRESET_NUM = 0x0010, // Bit 04 -} GAMEPAD_XONE_ELITE_PADDLE; - -typedef enum { - XONE_LED_OFF_1 = 0x00, - XONE_LED_SOLID = 0x01, - XONE_LED_BLINK_FAST = 0x02, - XONE_LED_BLINK_SLOW = 0x03, - XONE_LED_BLINK_VERY_SLOW = 0x04, - XONE_LED_SOLD_1 = 0x05, - XONE_LED_SOLD_2 = 0x06, - XONE_LED_SOLD_3 = 0x07, - XONE_LED_PHASE_SLOW = 0x08, - XONE_LED_PHASE_FAST = 0x09, - XONE_LED_REBOOT_1 = 0x0a, - XONE_LED_OFF = 0x0b, - XONE_LED_FLICKER = 0x0c, - XONE_LED_SOLID_4 = 0x0d, - XONE_LED_SOLID_5 = 0x0e, - XONE_LED_REBOOT_2 = 0x0f, -} LED_XONE; - -OSDefineMetaClassAndStructors(XboxOneControllerClass, Xbox360ControllerClass) - -OSString* XboxOneControllerClass::newProductString() const -{ - return OSString::withCString("Xbox One Wired Controller"); -} - -UInt16 XboxOneControllerClass::convertButtonPacket(UInt16 buttons) -{ - UInt16 new_buttons = 0; - - new_buttons |= ((buttons & 4) == 4) << 4; - new_buttons |= ((buttons & 8) == 8) << 5; - new_buttons |= ((buttons & 16) == 16) << 12; - new_buttons |= ((buttons & 32) == 32) << 13; - new_buttons |= ((buttons & 64) == 64) << 14; - new_buttons |= ((buttons & 128) == 128) << 15; - new_buttons |= ((buttons & 256) == 256) << 0; - new_buttons |= ((buttons & 512) == 512) << 1; - new_buttons |= ((buttons & 1024) == 1024) << 2; - new_buttons |= ((buttons & 2048) == 2048) << 3; - new_buttons |= ((buttons & 4096) == 4096) << 8; - new_buttons |= ((buttons & 8192) == 8192) << 9; - new_buttons |= ((buttons & 16384) == 16384) << 6; - new_buttons |= ((buttons & 32768) == 32768) << 7; - - new_buttons |= (isXboxOneGuideButtonPressed) << 10; - - return new_buttons; -} - -void XboxOneControllerClass::convertFromXboxOne(void *buffer, UInt8 packetSize) -{ - XBOXONE_ELITE_IN_REPORT *reportXone = (XBOXONE_ELITE_IN_REPORT*)buffer; - XBOX360_IN_REPORT *report360 = (XBOX360_IN_REPORT*)buffer; - UInt8 trigL = 0, trigR = 0; - XBOX360_HAT left, right; - - report360->header.command = 0x00; - report360->header.size = 0x14; - - if (packetSize == 0x1a) // Fight Stick - { - if ((0x80 & reportXone->true_trigR) == 0x80) { trigL = 255; } - if ((0x40 & reportXone->true_trigR) == 0x40) { trigR = 255; } - - left = reportXone->left; - right = reportXone->right; - } - else if (packetSize == 0x11) // Racing Wheel - { - XBOXONE_IN_WHEEL_REPORT *wheelReport=(XBOXONE_IN_WHEEL_REPORT*)buffer; - - trigR = (wheelReport->accelerator / 1023.0) * 255; // UInt16 -> UInt8 - trigL = (wheelReport->brake / 1023.0) * 255; // UInt16 -> UInt8 - left.x = wheelReport->steering - 32768; // UInt16 -> SInt16 - left.y = wheelReport->clutch * 128; // Clutch is 0-255. Upconvert to half signed 16 range. (0 - 32640) - right = {}; - } - else // Traditional Controllers - { - trigL = (reportXone->trigL / 1023.0) * 255; - trigR = (reportXone->trigR / 1023.0) * 255; - - left = reportXone->left; - right = reportXone->right; - } - - report360->buttons = convertButtonPacket(reportXone->buttons); - report360->trigL = trigL; - report360->trigR = trigR; - report360->left = left; - report360->right = right; -} - -IOReturn XboxOneControllerClass::handleReport(IOMemoryDescriptor * descriptor, IOHIDReportType reportType, IOOptionBits options) -{ - if (descriptor->getLength() >= sizeof(XBOXONE_IN_GUIDE_REPORT)) { - IOBufferMemoryDescriptor *desc = OSDynamicCast(IOBufferMemoryDescriptor, descriptor); - if (desc != NULL) { - XBOXONE_ELITE_IN_REPORT *report=(XBOXONE_ELITE_IN_REPORT*)desc->getBytesNoCopy(); - if ((report->header.command==0x07) && (report->header.size==(sizeof(XBOXONE_IN_GUIDE_REPORT)-4))) - { - XBOXONE_IN_GUIDE_REPORT *guideReport=(XBOXONE_IN_GUIDE_REPORT*)report; - - if (guideReport->header.reserved1 == 0x30) // 2016 Controller - { - XBOXONE_OUT_GUIDE_REPORT outReport = {}; - outReport.header.command = 0x01; - outReport.header.reserved1 = 0x20; - outReport.header.counter = guideReport->header.counter; - outReport.header.size = 0x09; - outReport.data[0] = 0x00; - outReport.data[1] = 0x07; - outReport.data[2] = 0x20; - outReport.data[3] = 0x02; - - GetOwner(this)->QueueWrite(&outReport, 13); - } - - isXboxOneGuideButtonPressed = (bool)guideReport->state; - XBOX360_IN_REPORT *oldReport = (XBOX360_IN_REPORT*)lastData; - oldReport->buttons ^= (-isXboxOneGuideButtonPressed ^ oldReport->buttons) & (1 << GetOwner(this)->mapping[10]); - memcpy(report, lastData, sizeof(XBOX360_IN_REPORT)); - } - else if (report->header.command==0x20) - { - convertFromXboxOne(report, report->header.size); - XBOX360_IN_REPORT *report360=(XBOX360_IN_REPORT*)report; - if (!(GetOwner(this)->noMapping)) - remapButtons(report360); - GetOwner(this)->fiddleReport(report360->left, report360->right); - - if (GetOwner(this)->swapSticks) - remapAxes(report360); - - memcpy(lastData, report360, sizeof(XBOX360_IN_REPORT)); - } - } - } - IOReturn ret = IOHIDDevice::handleReport(descriptor, reportType, options); - return ret; -} - -IOReturn XboxOneControllerClass::setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options) -{ - // IOLog("Xbox One Controller - setReport\n"); - unsigned char data[4]; - report->readBytes(0, &data, 4); -// IOLog("Attempting to send: %d %d %d %d\n",((unsigned char*)data)[0], ((unsigned char*)data)[1], ((unsigned char*)data)[2], ((unsigned char*)data)[3]); - UInt8 rumbleType; - switch(data[0])//(header.command) - { - case 0x00: // Set force feedback - XBOXONE_OUT_RUMBLE rumble; - rumble.header.command = 0x09; - rumble.header.reserved1 = 0x00; - rumble.header.counter = (GetOwner(this)->outCounter)++; - rumble.header.size = 0x09; - rumble.mode = 0x00; - rumble.rumbleMask = 0x0F; - rumble.length = 0xFF; - rumble.period = 0x00; - rumble.extra = 0x00; -// IOLog("Data: %d %d %d %d, outCounter: %d\n", data[0], data[1], data[2], data[3], rumble.reserved2); - - rumbleType = GetOwner(this)->rumbleType; - if (rumbleType == 0) // Default - { - rumble.trigL = 0x00; - rumble.trigR = 0x00; - rumble.little = data[2]; - rumble.big = data[3]; - } - else if (rumbleType == 1) // None - { - return kIOReturnSuccess; - } - else if (rumbleType == 2) // Trigger - { - rumble.trigL = data[2] / 2.0; - rumble.trigR = data[3] / 2.0; - rumble.little = 0x00; - rumble.big = 0x00; - } - else if (rumbleType == 3) // Both - { - rumble.trigL = data[2] / 2.0; - rumble.trigR = data[3] / 2.0; - rumble.little = data[2]; - rumble.big = data[3]; - } - - GetOwner(this)->QueueWrite(&rumble,13); - return kIOReturnSuccess; - case 0x01: // Unsupported LED - return kIOReturnSuccess; - default: - IOLog("Unknown escape %d\n", data[0]); - return kIOReturnUnsupported; - } -} - - -#pragma mark - XboxOnePretend360Class - -/* - * Xbox One controller. - * Fake PID and VID of Xbox 360 controller - */ - -OSDefineMetaClassAndStructors(XboxOnePretend360Class, XboxOneControllerClass) - -OSString* XboxOnePretend360Class::newProductString() const -{ - return OSString::withCString("Xbox 360 Wired Controller"); -} - -OSNumber* XboxOnePretend360Class::newProductIDNumber() const -{ - return OSNumber::withNumber(654,16); -} - -OSNumber* XboxOnePretend360Class::newVendorIDNumber() const -{ - return OSNumber::withNumber(1118,16); -} diff --git a/360Controller/Controller.h b/360Controller/Controller.h index db24d4af..0ac4321b 100644 --- a/360Controller/Controller.h +++ b/360Controller/Controller.h @@ -1,21 +1,21 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + Controller.h - Driver class for the 360 controller - + This file is part of Xbox360Controller. - + Xbox360Controller is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + Xbox360Controller is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -25,10 +25,7 @@ class Xbox360ControllerClass : public IOHIDDevice { - OSDeclareDefaultStructors(Xbox360ControllerClass) - -private: - bool pretend360; + OSDeclareDefaultStructors(Xbox360ControllerClass) private: OSString* getDeviceString(UInt8 index,const char *def=NULL) const; @@ -39,14 +36,10 @@ class Xbox360ControllerClass : public IOHIDDevice virtual IOReturn setProperties(OSObject *properties); virtual IOReturn newReportDescriptor(IOMemoryDescriptor **descriptor) const; - + virtual IOReturn setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options=0); virtual IOReturn getReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options); - virtual IOReturn handleReport( - IOMemoryDescriptor * report, - IOHIDReportType reportType = kIOHIDReportTypeInput, - IOOptionBits options = 0 ); - + virtual OSString* newManufacturerString() const; virtual OSNumber* newPrimaryUsageNumber() const; virtual OSNumber* newPrimaryUsagePageNumber() const; @@ -55,77 +48,6 @@ class Xbox360ControllerClass : public IOHIDDevice virtual OSString* newSerialNumberString() const; virtual OSString* newTransportString() const; virtual OSNumber* newVendorIDNumber() const; - + virtual OSNumber* newLocationIDNumber() const; - - virtual void remapButtons(void *buffer); - virtual void remapAxes(void *buffer); -}; - - -class Xbox360Pretend360Class : public Xbox360ControllerClass -{ - OSDeclareDefaultStructors(Xbox360Pretend360Class) - -public: - virtual OSString* newProductString() const; - virtual OSNumber* newProductIDNumber() const; - virtual OSNumber* newVendorIDNumber() const; -}; - - -class XboxOriginalControllerClass : public Xbox360ControllerClass -{ - OSDeclareDefaultStructors(XboxOriginalControllerClass) - -private: - UInt8 lastData[32]; - UInt32 repeatCount; - -public: - virtual IOReturn setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options=0); - virtual IOReturn handleReport( - IOMemoryDescriptor * report, - IOHIDReportType reportType = kIOHIDReportTypeInput, - IOOptionBits options = 0 ); - - virtual OSString* newManufacturerString() const; - virtual OSNumber* newProductIDNumber() const; - virtual OSNumber* newVendorIDNumber() const; - virtual OSString* newProductString() const; -}; - - -class XboxOneControllerClass : public Xbox360ControllerClass -{ - OSDeclareDefaultStructors(XboxOneControllerClass) - -#define XboxOne_Prepare(x,t) {memset(&x,0,sizeof(x));x.header.command=t;x.header.size=sizeof(x-4);} - -protected: - UInt8 lastData[20]; - bool isXboxOneGuideButtonPressed; - void reorderButtons(UInt16* buttons, UInt8 mapping[]); - UInt16 convertButtonPacket(UInt16 buttons); - -public: - virtual IOReturn setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options=0); - virtual IOReturn handleReport( - IOMemoryDescriptor * report, - IOHIDReportType reportType = kIOHIDReportTypeInput, - IOOptionBits options = 0 ); - - virtual void convertFromXboxOne(void *buffer, UInt8 packetSize); - virtual OSString* newProductString() const; -}; - - -class XboxOnePretend360Class : public XboxOneControllerClass -{ - OSDeclareDefaultStructors(XboxOnePretend360Class) - -public: - virtual OSString* newProductString() const; - virtual OSNumber* newProductIDNumber() const; - virtual OSNumber* newVendorIDNumber() const; }; diff --git a/360Controller/English.lproj/InfoPlist.strings b/360Controller/English.lproj/InfoPlist.strings index 4a8156e4..068787ee 100644 --- a/360Controller/English.lproj/InfoPlist.strings +++ b/360Controller/English.lproj/InfoPlist.strings @@ -1,4 +1,4 @@ /* Localized versions of Info.plist keys */ CFBundleName = "360Controller"; -NSHumanReadableCopyright = "© Colin Munro, 2005-11"; +NSHumanReadableCopyright = "© Colin Munro, 2005-11"; \ No newline at end of file diff --git a/360Controller/Info copy.plist b/360Controller/Info copy.plist new file mode 100644 index 00000000..b06cc87e --- /dev/null +++ b/360Controller/Info copy.plist @@ -0,0 +1,56 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + 360Controller + CFBundleIconFile + + CFBundleIdentifier + com.mice.driver.Xbox360Controller + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + KEXT + CFBundleSignature + ???? + CFBundleVersion + 1.0.0d1 + IOKitPersonalities + + Controller + + CFBundleIdentifier + com.mice.driver.Xbox360Controller + IOCFPlugInTypes + + F4545CE5-BF5B-11D6-A4BB-0003933E3E3E + 360Controller.kext/Contents/PlugIns/Feedback360.plugin + + IOClass + Xbox360ControllerClass + IOKitDebug + 65535 + IOProviderClass + IOUSBDevice + idProduct + 654 + idVendor + 1118 + + + OSBundleLibraries + + com.apple.iokit.IOHIDFamily + 1.2 + com.apple.iokit.IOUSBFamily + 1.8 + com.apple.kernel.libkern + 6.9.9 + com.apple.kernel.mach + 6.9.9 + + + diff --git a/360Controller/Info.plist b/360Controller/Info.plist index e6893f5b..681fbe73 100644 --- a/360Controller/Info.plist +++ b/360Controller/Info.plist @@ -6,6 +6,8 @@ English CFBundleExecutable ${EXECUTABLE_NAME} + CFBundleIconFile + CFBundleIdentifier com.mice.driver.Xbox360Controller CFBundleInfoDictionaryVersion @@ -14,17 +16,13 @@ ${PRODUCT_NAME} CFBundlePackageType KEXT - CFBundleShortVersionString - $(CURRENT_PROJECT_VERSION) CFBundleSignature ???? CFBundleVersion - ${CURRENT_PROJECT_VERSION} - LSMinimumSystemVersion - ${MIN_MACOS_VERSION} + 1.0.0d12 IOKitPersonalities - AfterglowGamepad1 + AfterglowGamepadforXbox360 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -40,3062 +38,11 @@ IOProviderClass IOUSBDevice idProduct - 64252 - idVendor - 9414 - - AfterglowGamepad2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 63751 - idVendor - 7085 - - AfterglowGamepad3 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 64253 - idVendor - 9414 - - AfterglowGamepad4 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 742 - idVendor - 1118 - - AfterglowGamepad5 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 768 - idVendor - 7085 - - AfterglowGamepad6 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 22554 - idVendor - 9414 - - AfterglowGamepadForXbox360 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 1043 - idVendor - 3695 - - AfterglowPrismaticOne1 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 313 - idVendor - 3695 - - AfterglowPrismaticOne2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 691 - idVendor - 3695 - - AfterglowPrismaticOne3 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 696 - idVendor - 3695 - - AtplayController1 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 64250 - idVendor - 9414 - - AtplayController2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 64251 - idVendor - 9414 - - AtplayController3 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 690 - idVendor - 3695 - - ArcadeGameStick - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 18264 - idVendor - 1848 - - Ardwiino - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 10370 - idVendor - 4617 - - BETOPGAMEFORWINDOWS - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 21766 - idVendor - 4544 - - BatarangWired - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 16144 - idVendor - 5604 - - BD&AAirFloController - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 21251 - idVendor - 9414 - - BigBenController - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 1537 - idVendor - 5227 - - BrookNEOGEOConverter - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 2036 - idVendor - 3090 - - BrookPS2Converter - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 2289 - idVendor - 3090 - - ChatPadKeyboardEvents - - CFBundleIdentifier - com.apple.iokit.IOHIDFamily - IOClass - IOHIDEventDriver - IOProviderClass - IOHIDInterface - VendorID - 100 - - Chinese-madeXboxController - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 65535 - idVendor - 65535 - - Controller - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 654 - idVendor - 1118 - - Controller2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 655 - idVendor - 1118 - - Controller3 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 307 - idVendor - 3695 - - Controller4 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 63233 - idVendor - 3695 - - Counterfeit360Controller1 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 672 - idVendor - 3695 - - Counterfeit360Controller2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 62721 - idVendor - 3695 - - DOA4Stick - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 10 - idVendor - 3853 - - DragonRiseFightStick - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 6268 - idVendor - 121 - - ElecomJCU3613M - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 8196 - idVendor - 1390 - - FUSIONProXboxOne - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 21786 - idVendor - 9414 - - FUSIONXboxOne - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 22042 - idVendor - 9414 - - GEMPADEX - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 21773 - idVendor - 9414 - - GameStopGamepad3 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 1025 - idVendor - 3695 - - GameStopGamepad4 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 769 - idVendor - 3695 - - GamestopGamepad - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 770 - idVendor - 4779 - - GamestopGamepad2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 63745 - idVendor - 7085 - - GenericController - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 62209 - idVendor - 1133 - - GuitarHero - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 18248 - idVendor - 5168 - - HarmonixDrumKit360 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 4408 - idVendor - 7085 - - HarmonixKeyboard360 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 4920 - idVendor - 7085 - - HarmonixGuitar360 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 5432 - idVendor - 7085 - - HoneyBee360Gamepad - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 21760 - idVendor - 4779 - - HORI Real Arcade Pro.EX Premium VLX - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 62726 - idVendor - 7085 - - HoriClassicControllerSwitch - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 220 - idVendor - 3853 - - HoriEdge301 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 109 - idVendor - 3853 - - HoriEX2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 13 - idVendor - 3853 - - HoriFSVX - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 62723 - idVendor - 7085 - - HoriFSVXAlt - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 21762 - idVendor - 9414 - - HoriFightingCommander - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 197 - idVendor - 3853 - - HoriFightingCommander2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 21776 - idVendor - 9414 - - HoriFightingCommanderPS4 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 134 - idVendor - 3853 - - HoriFightingEdge - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 21763 - idVendor - 9414 - - HoriFightingStickEX2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 10 - idVendor - 3853 - - HoriFightingStickEX2B - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 62725 - idVendor - 7085 - - HoriFightingStickEX2C - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 13 - idVendor - 3853 - - HoriFightingStickMini - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 237 - idVendor - 3853 - - HoriPadEX2Turbo1 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 62721 - idVendor - 7085 - - HoriPadEX2Turbo2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 21760 - idVendor - 9414 - - HoriPadEXTurbo - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 12 - idVendor - 3853 - - HoriPadOne1 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 103 - idVendor - 3853 - - HoriPadOne2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 256 - idVendor - 3853 - - HoriPadUltimate - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 144 - idVendor - 3853 - - HoriRAP4 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 140 - idVendor - 3853 - - HoriRAPHayabusaXboxOne - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 99 - idVendor - 3853 - - HoriRAPN4 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 174 - idVendor - 3853 - - HoriRAPVHayabusaSwitch - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 216 - idVendor - 3853 - - HoriRAPVKai360 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 21774 - idVendor - 9414 - - HoriRAPVKaiXboxOne - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 120 - idVendor - 3853 - - HoriRAPVX - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 27 - idVendor - 3853 - - HoriRAPVXSA - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 62722 - idVendor - 7085 - - HoriRAPVXSA2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 21761 - idVendor - 9414 - - HoriUnnamed - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 21760 - idVendor - 7085 - - HoriUnnamed2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 654 - idVendor - 7085 - - HoriUnnamedBlueSolo - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 64001 - idVendor - 7085 - - HyperkinX91 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 5768 - idVendor - 11812 - - INJUSTICEFightStick360 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 293 - idVendor - 3695 - - IonDrumRocker - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 304 - idVendor - 7085 - - JoytekXbox360 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 48879 - idVendor - 5678 - - KonamiDancePad - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 4 - idVendor - 4779 - - LogitechChillStream - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 49730 - idVendor - 1133 - - LogitechDriveFx - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 51875 - idVendor - 1133 - - LogitechF310 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 49693 - idVendor - 1133 - - LogitechF310Alt - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 49686 - idVendor - 1133 - - LogitechF510 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 49694 - idVendor - 1133 - - LogitechF710 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 49695 - idVendor - 1133 - - LogitechG920 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 49761 - idVendor - 1133 - - LogitechTHUNDERPAD - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 51848 - idVendor - 1133 - - MKKlassicFightStick - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 771 - idVendor - 4779 - - MLGGamePadforXbox360 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61475 - idVendor - 7085 - - MVC2TEStick - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61497 - idVendor - 7085 - - MVC2TEStick2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 46904 - idVendor - 1848 - - MadCatzBrawlStick - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61465 - idVendor - 7085 - - MadCatzCallOfDuty - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61477 - idVendor - 7085 - - MadCatzFPSPro - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61479 - idVendor - 7085 - - MadCatzFightPad - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61486 - idVendor - 7085 - - MadCatzFightStickNeo - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61498 - idVendor - 7085 - - MadCatzFightStickSoulCaliber - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61503 - idVendor - 7085 - - MadCatzFightStickTE2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61568 - idVendor - 7085 - - MadCatzFightStickTES+ - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61506 - idVendor - 7085 - - MadCatzGamepad - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 18198 - idVendor - 1848 - - MadCatzGamepad2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 63746 - idVendor - 7085 - - MadCatzGamepad3 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61642 - idVendor - 7085 - - MadCatzGamepad4 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 672 - idVendor - 1848 - - MadCatzGhostReconFS - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61473 - idVendor - 7085 - - MadCatzInnoGamePad - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 62465 - idVendor - 1848 - - MadCatzMC2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61472 - idVendor - 7085 - - MadCatzMLGFightStickTE - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61502 - idVendor - 7085 - - MadCatzMicroConGamepad - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 18230 - idVendor - 1848 - - MadCatzMicroGamepad - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 18230 - idVendor - 1848 - - MadCatzPad3 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 61462 - idVendor - 7085 - - MadCatzPortableDrum - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 39025 - idVendor - 1848 - - MadCatzProGamepad - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 18214 - idVendor - 1848 - - MayflashMAGICNS - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 6355 - idVendor - 121 - - McbazelPlaystationToXbox360 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 654 - idVendor - 3695 - - MicrosoftBigButtonController - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 672 - idVendor - 1118 - - MicrosoftCorp.XboxControllerS - 2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 649 - idVendor - 1118 - - MicrosoftCorp.XboxControllerSHub - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 648 - idVendor - 1118 - - MicrosoftX-Boxpad(Japan) - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 645 - idVendor - 1118 - - MicrosoftX-Boxpadv1(US) - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 514 - idVendor - 1118 - - MicrosoftXboxControllerS - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 647 - idVendor - 1118 - - MicrosoftXboxControllerS - 2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 648 - idVendor - 1118 - - MicrosoftXboxOneController2013 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 721 - idVendor - 1118 - - MicrosoftXboxOneController2015 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 733 - idVendor - 1118 - - MicrosoftXboxOneController2016 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 746 - idVendor - 1118 - - MicrosoftXboxOneController2018 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 765 - idVendor - 1118 - - MicrosoftXboxOneControllerAdaptive - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 2826 - idVendor - 1118 - - MicrosoftXboxOneControllerElite - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 739 - idVendor - 1118 - - NaconGC100XF - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 22000 - idVendor - 4553 - - PDPAfterglow - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 63744 - idVendor - 7085 - - PDPAfterglowAX.1 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 63744 - idVendor - 3695 - - PDPAfterglowAX1 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 275 - idVendor - 3695 - - PDPAfterglowV2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 531 - idVendor - 3695 - - PDPAfterglowV3 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 769 - idVendor - 4779 - - PDPAfterglowV4 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 4371 - idVendor - 3695 - - PDPBattlefieldOne - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 356 - idVendor - 3695 - - PDPEASports - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 305 - idVendor - 3695 - - PDPMarvelXboxOneController - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 327 - idVendor - 3695 - - PDPMetallicsLEXbox360 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 345 - idVendor - 3695 - - PDPStealthPhantomBlack - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 676 - idVendor - 3695 - - PDPStealthVioletSpectral - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 715 - idVendor - 3695 - - PDPTitanfall2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 357 - idVendor - 3695 - - PDPTron - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 63747 - idVendor - 7085 - - PDPVersusPad - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 63748 - idVendor - 7085 - - PDPXbox360 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 1281 - idVendor - 3695 - - PDPXboxOne1 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 314 - idVendor - 3695 - - PDPXboxOne2 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 354 - idVendor - 3695 - - PDPXboxOne3 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 22042 - idVendor - 9414 - - PDPXboxOne4 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 353 - idVendor - 3695 - - PDPXboxOne5 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 355 - idVendor - 3695 - - PDPXboxOne6 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 683 - idVendor - 3695 - - PDPXboxOne7 - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 352 + 275 idVendor 3695 - PDPXboxOneArcticWhite + AfterglowGamepadforXbox360Z CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3111,11 +58,11 @@ IOProviderClass IOUSBDevice idProduct - 680 + 531 idVendor 3695 - PDPXboxOneArcadeStick + AfterglowGamepadforXbox360ZZ CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3131,11 +78,11 @@ IOProviderClass IOUSBDevice idProduct - 348 + 63744 idVendor - 3695 + 7085 - PDPXboxOneCrimsonRed + AviatorforXbox360PC CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3151,11 +98,11 @@ IOProviderClass IOUSBDevice idProduct - 674 + 52009 idVendor - 3695 + 1848 - PDPXboxOneFallout4 + BatarangwiredcontrollerXBOX CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3171,11 +118,11 @@ IOProviderClass IOUSBDevice idProduct - 347 + 16144 idVendor - 3695 + 5604 - PDPXboxOneGhostWhite + BigbenControllerBB7201 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3191,31 +138,22 @@ IOProviderClass IOUSBDevice idProduct - 677 + 1537 idVendor - 3695 + 5227 - PDPXboxOnePhantomBlack + ChatPadKeyboardEvents CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - + com.apple.iokit.IOHIDFamily IOClass - Xbox360Peripheral - IOKitDebug - 65535 + IOHIDEventDriver IOProviderClass - IOUSBDevice - idProduct - 685 - idVendor - 3695 + IOHIDInterface + VendorID + 100 - PDPXboxOnePhantomBlack - 2 + Controller CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3231,11 +169,11 @@ IOProviderClass IOUSBDevice idProduct - 704 + 62465 idVendor - 3695 + 1848 - PDPXboxOneRavenBlack + ControllerZ CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3251,11 +189,11 @@ IOProviderClass IOUSBDevice idProduct - 679 + 62721 idVendor 3695 - PDPXboxOneRevenantBlue + ControllerZZ CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3271,11 +209,11 @@ IOProviderClass IOUSBDevice idProduct - 678 + 63489 idVendor - 3695 + 5168 - PowerAAirflow + ControllerZZZ CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3291,11 +229,11 @@ IOProviderClass IOUSBDevice idProduct - 16138 + 654 idVendor - 5604 + 7085 - PowerAFUS1ONTournament + ControllerZZZZ CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3311,11 +249,11 @@ IOProviderClass IOUSBDevice idProduct - 21399 + 64001 idVendor - 9414 + 7085 - PowerAMiniProEXGreen + DDRUniverse2Mat CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3331,11 +269,11 @@ IOProviderClass IOUSBDevice idProduct - 16128 + 4 idVendor - 5604 + 4779 - PowerAMiniProEXGreen2 + Ferrari458Racingwheel CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3351,11 +289,11 @@ IOProviderClass IOUSBDevice idProduct - 21274 + 23296 idVendor 9414 - PowerAMiniProEXWhite + GH4Guitar CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3371,11 +309,11 @@ IOProviderClass IOUSBDevice idProduct - 21248 + 18228 idVendor - 9414 + 5168 - PowerAMiniXboxOne + GamepadF310 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3391,11 +329,11 @@ IOProviderClass IOUSBDevice idProduct - 21530 + 49693 idVendor - 9414 + 1133 - PowerAMiniXboxOne2 + GamepadforXbox360 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3411,11 +349,11 @@ IOProviderClass IOUSBDevice idProduct - 21562 + 769 idVendor - 9414 + 3695 - PowerASpectraIlluminatedXboxOne + GamepadforXbox360Z CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3431,11 +369,11 @@ IOProviderClass IOUSBDevice idProduct - 21546 + 1025 idVendor - 9414 + 3695 - QanBaJoystickPlus + GamepadforXbox360ZZ CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3451,11 +389,11 @@ IOProviderClass IOUSBDevice idProduct - 48879 + 770 idVendor - 1848 + 4779 - RAPEXSE + GamepadforXbox360ZZZ CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3471,11 +409,11 @@ IOProviderClass IOUSBDevice idProduct - 22 + 63746 idVendor - 3853 + 7085 - REALARCADEPROEX + GamestopXbox360Controller CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3491,11 +429,11 @@ IOProviderClass IOUSBDevice idProduct - 62724 + 63745 idVendor 7085 - RazerAtrox + GuitarHeroforPCMAC CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3511,11 +449,11 @@ IOProviderClass IOUSBDevice idProduct - 2560 + 18252 idVendor - 5426 + 5168 - RazerAtrox2 + HORIPADEX2TURBO CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3531,11 +469,11 @@ IOProviderClass IOUSBDevice idProduct - 20480 + 62721 idVendor - 9414 + 7085 - RazerOnza + HarmonixDrumKitforXbox360 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3551,11 +489,11 @@ IOProviderClass IOUSBDevice idProduct - 64769 + 3 idVendor 7085 - RazerOnza2 + HarmonixGuitarforXbox360 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3571,11 +509,11 @@ IOProviderClass IOUSBDevice idProduct - 64769 + 2 idVendor - 5769 + 7085 - RazerOnzaTE + HoriCoDOA4FightStick CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3591,11 +529,11 @@ IOProviderClass IOUSBDevice idProduct - 64768 + 10 idVendor - 7085 + 3853 - RazerOnzaTE2 + HoriFightingStickEx2 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3611,11 +549,11 @@ IOProviderClass IOUSBDevice idProduct - 64768 + 13 idVendor - 5769 + 3853 - RazerSabertoothElite + HoriRealArcadeProEx CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3631,11 +569,11 @@ IOProviderClass IOUSBDevice idProduct - 65024 + 22 idVendor - 5769 + 3853 - RazerSabertoothElite2 + HoriRealArcadeProVXSA CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3651,11 +589,11 @@ IOProviderClass IOUSBDevice idProduct - 23812 + 21761 idVendor 9414 - RazerWildcat + HoriSOULCALIBURVStick CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3671,11 +609,11 @@ IOProviderClass IOUSBDevice idProduct - 2563 + 21766 idVendor - 5426 + 9414 - RazerWolverineUltimate + JoytechNeoSe CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3691,11 +629,11 @@ IOProviderClass IOUSBDevice idProduct - 2580 + 61485 idVendor - 5426 + 7085 - RedOctaneController + JoytechNeoSeTake2 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3711,11 +649,11 @@ IOProviderClass IOUSBDevice idProduct - 63489 + 48879 idVendor - 5168 + 5678 - RedOctaneControllerAdapter + LogitechChillStream CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3731,11 +669,11 @@ IOProviderClass IOUSBDevice idProduct - 672 + 49730 idVendor - 5168 + 1133 - RockBandDrums + LogitechF510 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3751,11 +689,11 @@ IOProviderClass IOUSBDevice idProduct - 3 + 49694 idVendor - 7085 + 1133 - RockBandGuitar + MadCatz360 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3771,31 +709,11 @@ IOProviderClass IOUSBDevice idProduct - 2 + 64769 idVendor 7085 - RockCandy - - CFBundleIdentifier - com.mice.driver.Xbox360Controller - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - 360Controller.kext/Contents/PlugIns/Feedback360.plugin - - IOClass - Xbox360Peripheral - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice - idProduct - 287 - idVendor - 3695 - - RockCandyGamepadForXbox360 + MadCatzBeatPad CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3811,11 +729,11 @@ IOProviderClass IOUSBDevice idProduct - 543 + 18240 idVendor - 3695 + 1848 - RockCandyGamepadForXbox360 - 2 + MadCatzCallofDutyGamePad CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3831,11 +749,11 @@ IOProviderClass IOUSBDevice idProduct - 64254 + 61477 idVendor - 9414 + 7085 - RockCandyGamepadForXbox360 - 3 + MadCatzFPSProGamePad CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3851,11 +769,11 @@ IOProviderClass IOUSBDevice idProduct - 338 + 61479 idVendor - 3695 + 7085 - RockCandyGamepadForXboxOne2013 + MadCatzGhostReconFSGamePad CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3871,11 +789,11 @@ IOProviderClass IOUSBDevice idProduct - 326 + 61473 idVendor - 3695 + 7085 - RockCandyGamepadForXboxOne2015 + MadCatzMicroConGamePadPro CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3891,11 +809,11 @@ IOProviderClass IOUSBDevice idProduct - 582 + 18230 idVendor - 3695 + 1848 - RockCandyGamepadForXboxOne2016 + MadCatzMicroConGamePadProZ CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3911,11 +829,11 @@ IOProviderClass IOUSBDevice idProduct - 838 + 61494 idVendor - 3695 + 7085 - RockCandyGamepadForXboxOne2019 + MadCatzPortableDrumKit CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3931,11 +849,11 @@ IOProviderClass IOUSBDevice idProduct - 719 + 39025 idVendor - 3695 + 1848 - RockCandyGamepadforPS3 + MadCatzStreetFighterIVFightPad CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3951,11 +869,11 @@ IOProviderClass IOUSBDevice idProduct - 286 + 18216 idVendor - 3695 + 1848 - SC4VF5Stick + MadCatzStreetFighterIVFightStickSE CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3971,11 +889,11 @@ IOProviderClass IOUSBDevice idProduct - 13 + 18200 idVendor - 3853 + 1848 - SF4FightPad + MadCatzXbox360Controller CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -3991,11 +909,11 @@ IOProviderClass IOUSBDevice idProduct - 61480 + 18198 idVendor - 7085 + 1848 - SF4FightPad2 + MadCatzXbox360ControllerZ CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4011,11 +929,11 @@ IOProviderClass IOUSBDevice idProduct - 18216 + 18214 idVendor 1848 - SF4StickSE + MadCatzXbox360ControllerZZ CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4031,11 +949,11 @@ IOProviderClass IOUSBDevice idProduct - 18200 + 48879 idVendor 1848 - SF4StickTE + MadCatzXbox360ControllerZZZ CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4051,11 +969,11 @@ IOProviderClass IOUSBDevice idProduct - 18232 + 61462 idVendor - 1848 + 7085 - SF4StickTER2 + MadCatzXboxcontrollerMW2 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4071,11 +989,11 @@ IOProviderClass IOUSBDevice idProduct - 61496 + 46886 idVendor - 7085 + 1848 - SSF4StickTE + MicrosoftXbox360Controller CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4091,11 +1009,11 @@ IOProviderClass IOUSBDevice idProduct - 63288 + 654 idVendor - 1848 + 1118 - SSFIVTEChunLi + PDPAFTERGLOWAX1 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4111,11 +1029,11 @@ IOProviderClass IOUSBDevice idProduct - 61501 + 769 idVendor - 7085 + 4779 - SaitekAV8R02 + PDPDancePad CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4131,11 +1049,11 @@ IOProviderClass IOUSBDevice idProduct - 52009 + 261 idVendor - 1848 + 3695 - SaitekCB360 + PelicanTSZ360Pad CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4151,11 +1069,11 @@ IOProviderClass IOUSBDevice idProduct - 51970 + 513 idVendor - 1848 + 3695 - StrikeController + PowerAMiniProElite CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4171,11 +1089,11 @@ IOProviderClass IOUSBDevice idProduct - 1 + 16128 idVendor - 5769 + 5604 - TSZPelican + PowerAMiniProEliteGlow CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4191,11 +1109,11 @@ IOProviderClass IOUSBDevice idProduct - 513 + 21248 idVendor - 3695 + 9414 - ThrustmasterFerrari430 + REALARCADEPROEX CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4211,11 +1129,11 @@ IOProviderClass IOUSBDevice idProduct - 46683 + 62724 idVendor - 1103 + 7085 - ThrustMasterFerrari458 + REALARCADEProVX CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4231,11 +1149,11 @@ IOProviderClass IOUSBDevice idProduct - 23296 + 62722 idVendor - 9414 + 7085 - ThrustMasterFerrari458Italia + RazerOnza CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4251,11 +1169,11 @@ IOProviderClass IOUSBDevice idProduct - 23299 + 64768 idVendor - 9414 + 5769 - ThrustMasterFerrari458Spider + RazerOnzaTournamentEdition CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4271,11 +1189,11 @@ IOProviderClass IOUSBDevice idProduct - 46705 + 64769 idVendor - 1103 + 5769 - ThrustMasterGPXGamepad + RedOctaneGuitarHeroXplorer CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4291,11 +1209,11 @@ IOProviderClass IOUSBDevice idProduct - 45862 + 18248 idVendor - 1103 + 5168 - ThrustmasterGPXLightback + RockCandyGamepadforXbox360 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4311,11 +1229,11 @@ IOProviderClass IOUSBDevice idProduct - 23298 + 287 idVendor - 9414 + 3695 - ThrustmasterTXGIP + RockRevolutionforXbox360 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4331,11 +1249,11 @@ IOProviderClass IOUSBDevice idProduct - 46692 + 6 idVendor - 1103 + 4779 - ThrustmasterTMX + SaitekCyborgRumblePadPCXbox360 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4351,11 +1269,11 @@ IOProviderClass IOUSBDevice idProduct - 46718 + 51970 idVendor - 1103 + 1848 - TrustPredator + SaitekP3200RumblePadPCXbox360 CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4371,11 +1289,11 @@ IOProviderClass IOUSBDevice idProduct - 3 + 51971 idVendor - 2064 + 1848 - XB360MortalKombatFightStick + StreetFighterIVFightPad CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4391,11 +1309,11 @@ IOProviderClass IOUSBDevice idProduct - 63750 + 61480 idVendor 7085 - Xbox360ProEXController + StreetFighterIVFightStickTE CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4411,11 +1329,11 @@ IOProviderClass IOUSBDevice idProduct - 21258 + 18232 idVendor - 9414 + 1848 - Xbox360ProEXController2 + SuperSFIVFightStickTES CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4431,11 +1349,11 @@ IOProviderClass IOUSBDevice idProduct - 10271 + 63288 idVendor - 8406 + 1848 - XboxOneProEXController + TronXbox360controller CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4451,11 +1369,11 @@ IOProviderClass IOUSBDevice idProduct - 21562 + 63747 idVendor - 9414 + 7085 - MadCatzBeatPad + USBGamepad CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4471,11 +1389,11 @@ IOProviderClass IOUSBDevice idProduct - 18240 + 21760 idVendor - 1848 + 7085 - RedOctane guitar hero guitar + XB360MortalKombatFightStick CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4491,11 +1409,11 @@ IOProviderClass IOUSBDevice idProduct - 1803 + 63750 idVendor - 5168 + 7085 - MADCATZ 360 MC2 + XboxAirflowiredcontroller CFBundleIdentifier com.mice.driver.Xbox360Controller @@ -4511,9 +1429,9 @@ IOProviderClass IOUSBDevice idProduct - 18208 + 16138 idVendor - 1848 + 5604 NSHumanReadableCopyright diff --git a/360Controller/_60Controller.cpp b/360Controller/_60Controller.cpp index 91c7a2b3..faecb563 100644 --- a/360Controller/_60Controller.cpp +++ b/360Controller/_60Controller.cpp @@ -1,30 +1,31 @@ /* - MICE Xbox 360 Controller driver for Mac OS X - Copyright (C) 2006-2013 Colin Munro - Bug fixes contributed by Cody "codeman38" Boisclair - - _60Controller.cpp - main source of the driver - - This file is part of Xbox360Controller. - - Xbox360Controller is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Xbox360Controller is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Foobar; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ + MICE Xbox 360 Controller driver for Mac OS X + Copyright (C) 2006-2013 Colin Munro + Bug fixes contributed by Cody "codeman38" Boisclair + + _60Controller.cpp - main source of the driver + + This file is part of Xbox360Controller. + + Xbox360Controller is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Xbox360Controller is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Foobar; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ #include #include #include #include "_60Controller.h" +#include "ControlStruct.h" #include "ChatPad.h" #include "Controller.h" @@ -54,245 +55,202 @@ class LockRequired // Find the maximum packet size of this pipe static UInt32 GetMaxPacketSize(IOUSBPipe *pipe) { - const IOUSBEndpointDescriptor *ed = pipe->GetEndpointDescriptor(); - + const IOUSBEndpointDescriptor *ed; + + ed=pipe->GetEndpointDescriptor(); if(ed==NULL) return 0; else return ed->wMaxPacketSize; } void Xbox360Peripheral::SendSpecial(UInt16 value) { - IOUSBDevRequest controlReq; + IOUSBDevRequest controlReq; - controlReq.bmRequestType = USBmakebmRequestType(kUSBOut, kUSBVendor, kUSBInterface); - controlReq.bRequest = 0x00; - controlReq.wValue = value; - controlReq.wIndex = 0x0002; - controlReq.wLength = 0; - controlReq.pData = NULL; - if (device->DeviceRequest(&controlReq, 100, 100, NULL) != kIOReturnSuccess) - IOLog("Failed to send special message %.4x\n", value); + controlReq.bmRequestType = USBmakebmRequestType(kUSBOut, kUSBVendor, kUSBInterface); + controlReq.bRequest = 0x00; + controlReq.wValue = value; + controlReq.wIndex = 0x0002; + controlReq.wLength = 0; + controlReq.pData = NULL; + if (device->DeviceRequest(&controlReq, 100, 100, NULL) != kIOReturnSuccess) + IOLog("Failed to send special message %.4x\n", value); } void Xbox360Peripheral::SendInit(UInt16 value, UInt16 index) { - IOUSBDevRequest controlReq; - - controlReq.bmRequestType = USBmakebmRequestType(kUSBOut, kUSBVendor, kUSBDevice); - controlReq.bRequest = 0xa9; - controlReq.wValue = value; - controlReq.wIndex = index; - controlReq.wLength = 0; - controlReq.pData = NULL; - device->DeviceRequest(&controlReq, 100, 100, NULL); // Will fail - but device should still act on it + IOUSBDevRequest controlReq; + + controlReq.bmRequestType = USBmakebmRequestType(kUSBOut, kUSBVendor, kUSBDevice); + controlReq.bRequest = 0xa9; + controlReq.wValue = value; + controlReq.wIndex = index; + controlReq.wLength = 0; + controlReq.pData = NULL; + device->DeviceRequest(&controlReq, 100, 100, NULL); // Will fail - but device should still act on it } bool Xbox360Peripheral::SendSwitch(bool sendOut) { - IOUSBDevRequest controlReq; + IOUSBDevRequest controlReq; - controlReq.bmRequestType = USBmakebmRequestType(sendOut ? kUSBOut : kUSBIn, kUSBVendor, kUSBDevice); - controlReq.bRequest = 0xa1; - controlReq.wValue = 0x0000; - controlReq.wIndex = 0xe416; - controlReq.wLength = sizeof(chatpadInit); - controlReq.pData = chatpadInit; - IOReturn err = device->DeviceRequest(&controlReq, 100, 100, NULL); - if (err == kIOReturnSuccess) + controlReq.bmRequestType = USBmakebmRequestType(sendOut ? kUSBOut : kUSBIn, kUSBVendor, kUSBDevice); + controlReq.bRequest = 0xa1; + controlReq.wValue = 0x0000; + controlReq.wIndex = 0xe416; + controlReq.wLength = sizeof(chatpadInit); + controlReq.pData = chatpadInit; + if (device->DeviceRequest(&controlReq, 100, 100, NULL) == kIOReturnSuccess) return true; - - const char *errStr = device->stringFromReturn(err); - IOLog("start - failed to %s chatpad setting (%x): %s\n", - sendOut ? "write" : "read", err, errStr); + IOLog("start - failed to %s chatpad setting\n", sendOut ? "write" : "read"); return false; } void Xbox360Peripheral::SendToggle(void) { - SendSpecial(serialToggle ? 0x1F : 0x1E); - serialToggle = !serialToggle; + SendSpecial(serialToggle ? 0x1F : 0x1E); + serialToggle = !serialToggle; } void Xbox360Peripheral::ChatPadTimerActionWrapper(OSObject *owner, IOTimerEventSource *sender) { - Xbox360Peripheral *controller; + Xbox360Peripheral *controller; - controller = OSDynamicCast(Xbox360Peripheral, owner); - controller->ChatPadTimerAction(sender); + controller = OSDynamicCast(Xbox360Peripheral, owner); + controller->ChatPadTimerAction(sender); } void Xbox360Peripheral::ChatPadTimerAction(IOTimerEventSource *sender) { - int nextTime, serialGot; - - serialGot = 0; - nextTime = 1000; - switch (serialTimerState) - { - case tsToggle: - SendToggle(); - if (serialActive) - { - if (!serialHeard) - { - serialActive = false; - serialGot = 2; - } - } - else - { - if (serialHeard) - { - serialTimerState = tsReset1; - serialResetCount = 0; - nextTime = 40; - } - } - break; - - case tsMiniToggle: - SendToggle(); - if (serialHeard) - { - serialTimerState = tsSet1; - nextTime = 40; - } - else - { - serialResetCount++; - if (serialResetCount > 3) - { - serialTimerState = tsToggle; - } - else - { - serialTimerState = tsReset1; - nextTime = 40; - } - } - break; - - case tsReset1: - SendSpecial(0x1B); - serialTimerState = tsReset2; - nextTime = 35; - break; - - case tsReset2: - SendSpecial(0x1B); - serialTimerState = tsMiniToggle; - nextTime = 150; - break; - - case tsSet1: - SendSpecial(0x18); - serialTimerState = tsSet2; - nextTime = 10; - break; - - case tsSet2: - SendSpecial(0x10); - serialTimerState = tsSet3; - nextTime = 10; - break; - - case tsSet3: - SendSpecial(0x03); - serialTimerState = tsToggle; - nextTime = 940; - serialActive = true; - serialGot = 1; - break; - } - sender->setTimeoutMS(nextTime); // Todo: Make it take into account function execution time? - serialHeard = false; - // Make it happen after the timer's set, for minimum impact - switch (serialGot) - { - case 1: - SerialConnect(); - break; - - case 2: - SerialDisconnect(); - break; - - default: - break; - } + int nextTime, serialGot; + + serialGot = 0; + nextTime = 1000; + switch (serialTimerState) + { + case tsToggle: + SendToggle(); + if (serialActive) + { + if (!serialHeard) + { + serialActive = false; + serialGot = 2; + } + } + else + { + if (serialHeard) + { + serialTimerState = tsReset1; + serialResetCount = 0; + nextTime = 40; + } + } + break; + + case tsMiniToggle: + SendToggle(); + if (serialHeard) + { + serialTimerState = tsSet1; + nextTime = 40; + } + else + { + serialResetCount++; + if (serialResetCount > 3) + { + serialTimerState = tsToggle; + } + else + { + serialTimerState = tsReset1; + nextTime = 40; + } + } + break; + + case tsReset1: + SendSpecial(0x1B); + serialTimerState = tsReset2; + nextTime = 35; + break; + + case tsReset2: + SendSpecial(0x1B); + serialTimerState = tsMiniToggle; + nextTime = 150; + break; + + case tsSet1: + SendSpecial(0x18); + serialTimerState = tsSet2; + nextTime = 10; + break; + + case tsSet2: + SendSpecial(0x10); + serialTimerState = tsSet3; + nextTime = 10; + break; + + case tsSet3: + SendSpecial(0x03); + serialTimerState = tsToggle; + nextTime = 940; + serialActive = true; + serialGot = 1; + break; + } + sender->setTimeoutMS(nextTime); // Todo: Make it take into account function execution time? + serialHeard = false; + // Make it happen after the timer's set, for minimum impact + switch (serialGot) + { + case 1: + SerialConnect(); + break; + + case 2: + SerialDisconnect(); + break; + + default: + break; + } } // Read the settings from the registry void Xbox360Peripheral::readSettings(void) { - OSBoolean *value = NULL; - OSNumber *number = NULL; - OSDictionary *dataDictionary = OSDynamicCast(OSDictionary, getProperty(kDriverSettingKey)); - - if (dataDictionary == NULL) return; - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("InvertLeftX")); - if (value != NULL) invertLeftX = value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("InvertLeftY")); - if (value != NULL) invertLeftY = value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("InvertRightX")); - if (value != NULL) invertRightX = value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("InvertRightY")); - if (value != NULL) invertRightY = value->getValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("DeadzoneLeft")); - if (number != NULL) deadzoneLeft = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("DeadzoneRight")); - if (number != NULL) deadzoneRight = number->unsigned32BitValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("RelativeLeft")); - if (value != NULL) relativeLeft = value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("RelativeRight")); - if (value != NULL) relativeRight=value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("DeadOffLeft")); - if (value != NULL) deadOffLeft = value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("DeadOffRight")); - if (value != NULL) deadOffRight = value->getValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("RumbleType")); - if (number != NULL) rumbleType = number->unsigned8BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingUp")); - if (number != NULL) mapping[0] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingDown")); - if (number != NULL) mapping[1] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingLeft")); - if (number != NULL) mapping[2] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingRight")); - if (number != NULL) mapping[3] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingStart")); - if (number != NULL) mapping[4] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingBack")); - if (number != NULL) mapping[5] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingLSC")); - if (number != NULL) mapping[6] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingRSC")); - if (number != NULL) mapping[7] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingLB")); - if (number != NULL) mapping[8] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingRB")); - if (number != NULL) mapping[9] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingGuide")); - if (number != NULL) mapping[10] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingA")); - if (number != NULL) mapping[11] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingB")); - if (number != NULL) mapping[12] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingX")); - if (number != NULL) mapping[13] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingY")); - if (number != NULL) mapping[14] = number->unsigned32BitValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("SwapSticks")); - if (value != NULL) swapSticks = value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("Pretend360")); - if (value != NULL) pretend360 = value->getValue(); - -#if 0 + OSDictionary *dataDictionary; + OSBoolean *value; + OSNumber *number; + + dataDictionary=OSDynamicCast(OSDictionary,getProperty(kDriverSettingKey)); + if(dataDictionary==NULL) return; + value=OSDynamicCast(OSBoolean,dataDictionary->getObject("InvertLeftX")); + if(value!=NULL) invertLeftX=value->getValue(); + value=OSDynamicCast(OSBoolean,dataDictionary->getObject("InvertLeftY")); + if(value!=NULL) invertLeftY=value->getValue(); + value=OSDynamicCast(OSBoolean,dataDictionary->getObject("InvertRightX")); + if(value!=NULL) invertRightX=value->getValue(); + value=OSDynamicCast(OSBoolean,dataDictionary->getObject("InvertRightY")); + if(value!=NULL) invertRightY=value->getValue(); + number=OSDynamicCast(OSNumber,dataDictionary->getObject("DeadzoneLeft")); + if(number!=NULL) deadzoneLeft=number->unsigned32BitValue(); + number=OSDynamicCast(OSNumber,dataDictionary->getObject("DeadzoneRight")); + if(number!=NULL) deadzoneRight=number->unsigned32BitValue(); + value=OSDynamicCast(OSBoolean,dataDictionary->getObject("RelativeLeft")); + if(value!=NULL) relativeLeft=value->getValue(); + value=OSDynamicCast(OSBoolean,dataDictionary->getObject("RelativeRight")); + if(value!=NULL) relativeRight=value->getValue(); + /* IOLog("Xbox360Peripheral preferences loaded:\n invertLeft X: %s, Y: %s\n invertRight X: %s, Y:%s\n deadzone Left: %d, Right: %d\n\n", - invertLeftX?"True":"False",invertLeftY?"True":"False", - invertRightX?"True":"False",invertRightY?"True":"False", - deadzoneLeft,deadzoneRight); -#endif + invertLeftX?"True":"False",invertLeftY?"True":"False", + invertRightX?"True":"False",invertRightY?"True":"False", + deadzoneLeft,deadzoneRight); + */ } // Initialise the extension @@ -305,33 +263,17 @@ bool Xbox360Peripheral::init(OSDictionary *propTable) inPipe=NULL; outPipe=NULL; inBuffer=NULL; - padHandler = NULL; - serialIn = NULL; - serialInPipe = NULL; - serialInBuffer = NULL; - serialTimer = NULL; - serialHandler = NULL; + padHandler = NULL; + serialIn = NULL; + serialInPipe = NULL; + serialInBuffer = NULL; + serialTimer = NULL; + serialHandler = NULL; // Default settings - invertLeftX=invertLeftY=false; - invertRightX=invertRightY=false; + invertLeftX=invertLeftY=FALSE; + invertRightX=invertRightY=FALSE; deadzoneLeft=deadzoneRight=0; - relativeLeft=relativeRight=false; - deadOffLeft = false; - deadOffRight = false; - swapSticks = false; - pretend360 = false; - // Controller Specific - rumbleType = 0; - // Bindings - noMapping = true; - for (int i = 0; i < 11; i++) - { - mapping[i] = i; - } - for (int i = 12; i < 16; i++) - { - mapping[i-1] = i; - } + relativeLeft=relativeRight=FALSE; // Done return res; } @@ -350,9 +292,9 @@ bool Xbox360Peripheral::start(IOService *provider) IOUSBFindEndpointRequest pipe; XBOX360_OUT_LED led; IOWorkLoop *workloop = NULL; - + if (!super::start(provider)) - return false; + return false; // Get device device=OSDynamicCast(IOUSBDevice,provider); if(device==NULL) { @@ -387,7 +329,7 @@ bool Xbox360Peripheral::start(IOService *provider) UInt16 release = device->GetDeviceRelease(); switch (release) { default: - IOLog("Unknown device release %.4x\n", release); + IOLog("Unknown device release %.4x", release); // fall through case 0x0110: chatpadInit[0] = 0x01; @@ -400,38 +342,15 @@ bool Xbox360Peripheral::start(IOService *provider) } } // Find correct interface - controllerType = Xbox360; intf.bInterfaceClass=kIOUSBFindInterfaceDontCare; intf.bInterfaceSubClass=93; intf.bInterfaceProtocol=1; intf.bAlternateSetting=kIOUSBFindInterfaceDontCare; interface=device->FindNextInterface(NULL,&intf); if(interface==NULL) { - // Find correct interface, Xbox original - intf.bInterfaceClass=kIOUSBFindInterfaceDontCare; - intf.bInterfaceSubClass=66; - intf.bInterfaceProtocol=0; - intf.bAlternateSetting=kIOUSBFindInterfaceDontCare; - interface=device->FindNextInterface(NULL,&intf); - if(interface==NULL) { - // Find correct interface, Xbox One - intf.bInterfaceClass=255; - intf.bInterfaceSubClass=71; - intf.bInterfaceProtocol=208; - intf.bAlternateSetting=kIOUSBFindInterfaceDontCare; - interface=device->FindNextInterface(NULL, &intf); - if(interface==NULL) - { - IOLog("start - unable to find the interface\n"); - goto fail; - } - controllerType = XboxOne; - goto interfacefound; - } - controllerType = XboxOriginal; - goto interfacefound; + IOLog("start - unable to find the interface\n"); + goto fail; } -interfacefound: interface->open(this); // Find pipes pipe.direction=kUSBIn; @@ -452,98 +371,82 @@ bool Xbox360Peripheral::start(IOService *provider) } outPipe->retain(); // Get a buffer - inBuffer=IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task,kIODirectionIn,GetMaxPacketSize(inPipe)); + inBuffer=IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task,0,GetMaxPacketSize(inPipe)); if(inBuffer==NULL) { IOLog("start - failed to allocate input buffer\n"); goto fail; } - // Find chatpad interface - intf.bInterfaceClass = kIOUSBFindInterfaceDontCare; - intf.bInterfaceSubClass = 93; - intf.bInterfaceProtocol = 2; - intf.bAlternateSetting = kIOUSBFindInterfaceDontCare; - serialIn = device->FindNextInterface(NULL, &intf); - if (serialIn == NULL) { - IOLog("start - unable to find chatpad interface\n"); + // Find chatpad interface + intf.bInterfaceClass = kIOUSBFindInterfaceDontCare; + intf.bInterfaceSubClass = 93; + intf.bInterfaceProtocol = 2; + intf.bAlternateSetting = kIOUSBFindInterfaceDontCare; + serialIn = device->FindNextInterface(NULL, &intf); + if (serialIn == NULL) { + IOLog("start - unable to find chatpad interface\n"); goto nochat; } - serialIn->open(this); - // Find chatpad pipe - pipe.direction = kUSBIn; - pipe.interval = 0; - pipe.type = kUSBInterrupt; - pipe.maxPacketSize = 0; - serialInPipe = serialIn->FindNextPipe(NULL, &pipe); - if (serialInPipe == NULL) - { - IOLog("start - unable to find chatpad in pipe\n"); - goto fail; - } - serialInPipe->retain(); - // Get a buffer for the chatpad - serialInBuffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, kIODirectionIn, GetMaxPacketSize(serialInPipe)); - if (serialInBuffer == NULL) - { - IOLog("start - failed to allocate input buffer for chatpad\n"); - goto fail; - } - // Create timer for chatpad - serialTimer = IOTimerEventSource::timerEventSource(this, ChatPadTimerActionWrapper); - if (serialTimer == NULL) - { - IOLog("start - failed to create timer for chatpad\n"); - goto fail; - } + serialIn->open(this); + // Find chatpad pipe + pipe.direction = kUSBIn; + pipe.interval = 0; + pipe.type = kUSBInterrupt; + pipe.maxPacketSize = 0; + serialInPipe = serialIn->FindNextPipe(NULL, &pipe); + if (serialInPipe == NULL) + { + IOLog("start - unable to find chatpad in pipe\n"); + goto fail; + } + serialInPipe->retain(); + // Get a buffer for the chatpad + serialInBuffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, 0, GetMaxPacketSize(serialInPipe)); + if (serialInBuffer == NULL) + { + IOLog("start - failed to allocate input buffer for chatpad\n"); + goto fail; + } + // Create timer for chatpad + serialTimer = IOTimerEventSource::timerEventSource(this, ChatPadTimerActionWrapper); + if (serialTimer == NULL) + { + IOLog("start - failed to create timer for chatpad\n"); + goto fail; + } workloop = getWorkLoop(); - if ((workloop == NULL) || (workloop->addEventSource(serialTimer) != kIOReturnSuccess)) - { - IOLog("start - failed to connect timer for chatpad\n"); + if ((workloop == NULL) || (workloop->addEventSource(serialTimer) != kIOReturnSuccess)) + { + IOLog("start - failed to connect timer for chatpad\n"); + goto fail; + } + // Configure ChatPad + // Send 'configuration' + SendInit(0xa30c, 0x4423); + SendInit(0x2344, 0x7f03); + SendInit(0x5839, 0x6832); + // Set 'switch' + if ((!SendSwitch(false)) || (!SendSwitch(true)) || (!SendSwitch(false))) goto fail; - } - // Configure ChatPad - // Send 'configuration' - SendInit(0xa30c, 0x4423); - SendInit(0x2344, 0x7f03); - SendInit(0x5839, 0x6832); - // Set 'switch' - if ((!SendSwitch(false)) || (!SendSwitch(true)) || (!SendSwitch(false))) { - // Commenting goto fail fixes the driver for the Hori Real Arcade Pro EX - //goto fail; - } - // Begin toggle - serialHeard = false; - serialActive = false; - serialToggle = false; - serialResetCount = 0; - serialTimerState = tsToggle; - serialTimer->setTimeoutMS(1000); + // Begin toggle + serialHeard = false; + serialActive = false; + serialToggle = false; + serialResetCount = 0; + serialTimerState = tsToggle; + serialTimer->setTimeoutMS(1000); // Begin reading if (!QueueSerialRead()) goto fail; nochat: if (!QueueRead()) - goto fail; - if (controllerType == XboxOne || controllerType == XboxOnePretend360) { - UInt8 xoneInit0[] = { 0x01, 0x20, 0x00, 0x09, 0x00, 0x04, 0x20, 0x3a, 0x00, 0x00, 0x00, 0x80, 0x00 }; - UInt8 xoneInit1[] = { 0x05, 0x20, 0x00, 0x01, 0x00 }; - UInt8 xoneInit2[] = { 0x09, 0x00, 0x00, 0x09, 0x00, 0x0F, 0x00, 0x00, - 0x1D, 0x1D, 0xFF, 0x00, 0x00 }; - UInt8 xoneInit3[] = { 0x09, 0x00, 0x00, 0x09, 0x00, 0x0F, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00 }; - QueueWrite(&xoneInit0, sizeof(xoneInit0)); - QueueWrite(&xoneInit1, sizeof(xoneInit1)); - QueueWrite(&xoneInit2, sizeof(xoneInit2)); - QueueWrite(&xoneInit3, sizeof(xoneInit3)); - } else { - // Disable LED - Xbox360_Prepare(led,outLed); - led.pattern=ledOff; - QueueWrite(&led,sizeof(led)); - } - + goto fail; + // Disable LED + Xbox360_Prepare(led,outLed); + led.pattern=ledOff; + QueueWrite(&led,sizeof(led)); // Done - PadConnect(); - registerService(); + PadConnect(); + registerService(); return true; fail: ReleaseAll(); @@ -573,7 +476,7 @@ bool Xbox360Peripheral::QueueSerialRead(void) { IOUSBCompletion complete; IOReturn err; - + if ((serialInPipe == NULL) || (serialInBuffer == NULL)) return false; complete.target = this; @@ -581,11 +484,11 @@ bool Xbox360Peripheral::QueueSerialRead(void) complete.parameter = serialInBuffer; err = serialInPipe->Read(serialInBuffer, 0, 0, serialInBuffer->getLength(), &complete); if (err == kIOReturnSuccess) - { - return true; - } + { + return true; + } else - { + { IOLog("read - failed to start for chatpad (0x%.8x)\n",err); return false; } @@ -597,8 +500,8 @@ bool Xbox360Peripheral::QueueWrite(const void *bytes,UInt32 length) IOBufferMemoryDescriptor *outBuffer; IOUSBCompletion complete; IOReturn err; - - outBuffer=IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task,kIODirectionOut,length); + + outBuffer=IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task,0,length); if(outBuffer==NULL) { IOLog("send - unable to allocate buffer\n"); return false; @@ -615,17 +518,9 @@ bool Xbox360Peripheral::QueueWrite(const void *bytes,UInt32 length) } } -bool Xbox360Peripheral::willTerminate(IOService *provider, IOOptionBits options) -{ - ReleaseAll(); - - return super::willTerminate(provider, options); -} - void Xbox360Peripheral::stop(IOService *provider) { ReleaseAll(); - super::stop(provider); } @@ -633,32 +528,32 @@ void Xbox360Peripheral::stop(IOService *provider) void Xbox360Peripheral::ReleaseAll(void) { LockRequired locker(mainLock); - - SerialDisconnect(); - PadDisconnect(); - if (serialTimer != NULL) - { - serialTimer->cancelTimeout(); - getWorkLoop()->removeEventSource(serialTimer); - serialTimer->release(); - serialTimer = NULL; - } - if (serialInPipe != NULL) - { - serialInPipe->Abort(); - serialInPipe->release(); - serialInPipe = NULL; - } - if (serialInBuffer != NULL) - { - serialInBuffer->release(); - serialInBuffer = NULL; - } - if (serialIn != NULL) - { - serialIn->close(this); - serialIn = NULL; - } + + SerialDisconnect(); + PadDisconnect(); + if (serialTimer != NULL) + { + serialTimer->cancelTimeout(); + getWorkLoop()->removeEventSource(serialTimer); + serialTimer->release(); + serialTimer = NULL; + } + if (serialInPipe != NULL) + { + serialInPipe->Abort(); + serialInPipe->release(); + serialInPipe = NULL; + } + if (serialInBuffer != NULL) + { + serialInBuffer->release(); + serialInBuffer = NULL; + } + if (serialIn != NULL) + { + serialIn->close(this); + serialIn = NULL; + } if(outPipe!=NULL) { outPipe->Abort(); outPipe->release(); @@ -683,31 +578,24 @@ void Xbox360Peripheral::ReleaseAll(void) } } -// Handle termination -bool Xbox360Peripheral::didTerminate(IOService *provider, IOOptionBits options, bool *defer) -{ - // release all objects used and close the device - ReleaseAll(); - return super::didTerminate(provider, options, defer); -} - - // Handle message sent to the driver IOReturn Xbox360Peripheral::message(UInt32 type,IOService *provider,void *argument) { switch(type) { case kIOMessageServiceIsTerminated: case kIOMessageServiceIsRequestingClose: + if(device->isOpen(this)) ReleaseAll(); + return kIOReturnSuccess; default: return super::message(type,provider,argument); } } // This returns the abs() value of a short, swapping it if necessary -static inline Xbox360_SShort getAbsolute(Xbox360_SShort value) +static inline XBox360_SShort getAbsolute(XBox360_SShort value) { - Xbox360_SShort reverse; - + XBox360_SShort reverse; + #ifdef __LITTLE_ENDIAN__ reverse=value; #elif __BIG_ENDIAN__ @@ -718,75 +606,34 @@ static inline Xbox360_SShort getAbsolute(Xbox360_SShort value) return (reverse<0)?~reverse:reverse; } -void Xbox360Peripheral::normalizeAxis(SInt16& axis, short deadzone) +// Adjusts the report for any settings speciified by the user +void Xbox360Peripheral::fiddleReport(IOBufferMemoryDescriptor *buffer) { - static const UInt16 max16=32767; - const float current=getAbsolute(axis); - const float maxVal=max16-deadzone; - - if (current>deadzone) { - if (axis<0) { - axis=max16*(current-deadzone)/maxVal; - axis=~axis; - } else { - axis=max16*(current-deadzone)/maxVal; - } - } else { - axis=0; - } -} - -void Xbox360Peripheral::fiddleReport(XBOX360_HAT& left, XBOX360_HAT& right) -{ - // deadOff - Normalize checkbox is checked if true - // relative - Linked checkbox is checked if true - - if(invertLeftX) left.x=~left.x; - if(!invertLeftY) left.y=~left.y; - if(invertRightX) right.x=~right.x; - if(!invertRightY) right.y=~right.y; - + XBOX360_IN_REPORT *report=(XBOX360_IN_REPORT*)buffer->getBytesNoCopy(); + if(invertLeftX) report->left.x=~report->left.x; + if(!invertLeftY) report->left.y=~report->left.y; + if(invertRightX) report->right.x=~report->right.x; + if(!invertRightY) report->right.y=~report->right.y; if(deadzoneLeft!=0) { if(relativeLeft) { - if((getAbsolute(left.x)left.x)left.y)left.x=0; + report->left.y=0; } - } else { // Linked checkbox has no check - if(getAbsolute(left.x)left.x)left.x=0; + if(getAbsolute(report->left.y)left.y=0; } } if(deadzoneRight!=0) { if(relativeRight) { - if((getAbsolute(right.x)right.x)right.y)right.x=0; + report->right.y=0; } } else { - if(getAbsolute(right.x)right.x)right.x=0; + if(getAbsolute(report->right.y)right.y=0; } } } @@ -800,8 +647,8 @@ void Xbox360Peripheral::ReadCompleteInternal(void *target,void *parameter,IORetu void Xbox360Peripheral::SerialReadCompleteInternal(void *target, void *parameter, IOReturn status, UInt32 bufferSizeRemaining) { - if (target != NULL) - ((Xbox360Peripheral*)target)->SerialReadComplete(parameter, status, bufferSizeRemaining); + if (target != NULL) + ((Xbox360Peripheral*)target)->SerialReadComplete(parameter, status, bufferSizeRemaining); } // This forwards a completed write notification to a member function @@ -814,75 +661,75 @@ void Xbox360Peripheral::WriteCompleteInternal(void *target,void *parameter,IORet // This handles a completed asynchronous read void Xbox360Peripheral::ReadComplete(void *parameter,IOReturn status,UInt32 bufferSizeRemaining) { - if (padHandler != NULL) // avoid deadlock with release - { - LockRequired locker(mainLock); - IOReturn err; - bool reread=!isInactive(); - - switch(status) { - case kIOReturnOverrun: - IOLog("read - kIOReturnOverrun, clearing stall\n"); - if (inPipe != NULL) - inPipe->ClearStall(); - // Fall through - case kIOReturnSuccess: - if (inBuffer != NULL) - { - const XBOX360_IN_REPORT *report=(const XBOX360_IN_REPORT*)inBuffer->getBytesNoCopy(); - if(((report->header.command==inReport)&&(report->header.size==sizeof(XBOX360_IN_REPORT))) - || (report->header.command==0x20) || (report->header.command==0x07)) /* Xbox One */ { - err = padHandler->handleReport(inBuffer, kIOHIDReportTypeInput); - if(err!=kIOReturnSuccess) { - IOLog("read - failed to handle report: 0x%.8x\n",err); - } - } - } - break; - case kIOReturnNotResponding: - IOLog("read - kIOReturnNotResponding\n"); - reread=false; - break; - default: - reread=false; - break; - } - if(reread) QueueRead(); + if (padHandler != NULL) // avoid deadlock with release + { + LockRequired locker(mainLock); + IOReturn err; + bool reread=!isInactive(); + + switch(status) { + case kIOReturnOverrun: + IOLog("read - kIOReturnOverrun, clearing stall\n"); + if (inPipe != NULL) + inPipe->ClearStall(); + // Fall through + case kIOReturnSuccess: + if (inBuffer != NULL) + { + const XBOX360_IN_REPORT *report=(const XBOX360_IN_REPORT*)inBuffer->getBytesNoCopy(); + if((report->header.command==inReport)&&(report->header.size==sizeof(XBOX360_IN_REPORT))) { + fiddleReport(inBuffer); + err = padHandler->handleReport(inBuffer, kIOHIDReportTypeInput); + if(err!=kIOReturnSuccess) { + IOLog("read - failed to handle report: 0x%.8x\n",err); + } + } + } + break; + case kIOReturnNotResponding: + IOLog("read - kIOReturnNotResponding\n"); + reread=false; + break; + default: + reread=false; + break; + } + if(reread) QueueRead(); } } void Xbox360Peripheral::SerialReadComplete(void *parameter, IOReturn status, UInt32 bufferSizeRemaining) { - if (padHandler != NULL) // avoid deadlock with release - { - LockRequired locker(mainLock); - bool reread = !isInactive(); - - switch (status) - { - case kIOReturnOverrun: - IOLog("read (serial) - kIOReturnOverrun, clearing stall\n"); - if (serialInPipe != NULL) - serialInPipe->ClearStall(); - // Fall through - case kIOReturnSuccess: - serialHeard = true; - if (serialInBuffer != NULL) - SerialMessage(serialInBuffer, serialInBuffer->getCapacity() - bufferSizeRemaining); - break; - - case kIOReturnNotResponding: - IOLog("read (serial) - kIOReturnNotResponding\n"); - reread = false; - break; - - default: - reread = false; - break; - } - if (reread) - QueueSerialRead(); - } + if (padHandler != NULL) // avoid deadlock with release + { + LockRequired locker(mainLock); + bool reread = !isInactive(); + + switch (status) + { + case kIOReturnOverrun: + IOLog("read (serial) - kIOReturnOverrun, clearing stall\n"); + if (serialInPipe != NULL) + serialInPipe->ClearStall(); + // Fall through + case kIOReturnSuccess: + serialHeard = true; + if (serialInBuffer != NULL) + SerialMessage(serialInBuffer, serialInBuffer->getCapacity() - bufferSizeRemaining); + break; + + case kIOReturnNotResponding: + IOLog("read (serial) - kIOReturnNotResponding\n"); + reread = false; + break; + + default: + reread = false; + break; + } + if (reread) + QueueSerialRead(); + } } // Handle a completed asynchronous write @@ -896,144 +743,80 @@ void Xbox360Peripheral::WriteComplete(void *parameter,IOReturn status,UInt32 buf } -void Xbox360Peripheral::MakeSettingsChanges() -{ - if (controllerType == XboxOne) - { - if (pretend360) - { - controllerType = XboxOnePretend360; - PadConnect(); - } - } - else if (controllerType == XboxOnePretend360) - { - if (!pretend360) - { - controllerType = XboxOne; - PadConnect(); - } - } - - if (controllerType == Xbox360) - { - if (pretend360) - { - controllerType = Xbox360Pretend360; - PadConnect(); - } - } - else if (controllerType == Xbox360Pretend360) - { - if (!pretend360) - { - controllerType = Xbox360; - PadConnect(); - } - } - - noMapping = true; - UInt8 normalMapping[15] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15 }; - for (int i = 0; i < 15; i++) - { - if (normalMapping[i] != mapping[i]) - { - noMapping = false; - break; - } - } -} - - // Called by the userspace IORegistryEntrySetCFProperties function IOReturn Xbox360Peripheral::setProperties(OSObject *properties) { OSDictionary *dictionary; - + dictionary=OSDynamicCast(OSDictionary,properties); - if(dictionary!=NULL) { - dictionary->setObject(OSString::withCString("ControllerType"), OSNumber::withNumber(controllerType, 8)); setProperty(kDriverSettingKey,dictionary); readSettings(); - - MakeSettingsChanges(); - return kIOReturnSuccess; } else return kIOReturnBadArgument; } IOHIDDevice* Xbox360Peripheral::getController(int index) { - switch (index) - { - case 0: - return padHandler; - case 1: - return serialHandler; - default: - return NULL; - } + switch (index) + { + case 0: + return padHandler; + case 1: + return serialHandler; + default: + return NULL; + } } // Main controller support void Xbox360Peripheral::PadConnect(void) { - PadDisconnect(); - if (controllerType == XboxOriginal) { - padHandler = new XboxOriginalControllerClass; - } else if (controllerType == XboxOne) { - padHandler = new XboxOneControllerClass; - } else if (controllerType == XboxOnePretend360) { - padHandler = new XboxOnePretend360Class; - } else if (controllerType == Xbox360Pretend360) { - padHandler = new Xbox360Pretend360Class; - } else { - padHandler = new Xbox360ControllerClass; - } - if (padHandler != NULL) - { + PadDisconnect(); + padHandler = new Xbox360ControllerClass; + if (padHandler != NULL) + { const OSString *keys[] = { OSString::withCString(kIOSerialDeviceType), - OSString::withCString("IOCFPlugInTypes"), - OSString::withCString("IOKitDebug"), + OSString::withCString("IOCFPlugInTypes"), + OSString::withCString("IOKitDebug"), }; const OSObject *objects[] = { OSNumber::withNumber((unsigned long long)1, 32), - getProperty("IOCFPlugInTypes"), + getProperty("IOCFPlugInTypes"), OSNumber::withNumber((unsigned long long)65535, 32), }; - OSDictionary *dictionary = OSDictionary::withObjects(objects, keys, sizeof(keys) / sizeof(keys[0])); - if (padHandler->init(dictionary)) - { - padHandler->attach(this); - padHandler->start(this); - } - else - { - padHandler->release(); - padHandler = NULL; - } - } + OSDictionary *dictionary = OSDictionary::withObjects(objects, keys, sizeof(keys) / sizeof(keys[0]), 0); + if (padHandler->init(dictionary)) + { + padHandler->attach(this); + padHandler->start(this); + } + else + { + padHandler->release(); + padHandler = NULL; + } + } } void Xbox360Peripheral::PadDisconnect(void) { - if (padHandler != NULL) - { - padHandler->terminate(kIOServiceRequired | kIOServiceSynchronous); - padHandler->release(); - padHandler = NULL; - } + if (padHandler != NULL) + { + padHandler->terminate(kIOServiceRequired | kIOServiceSynchronous); + padHandler->release(); + padHandler = NULL; + } } // Serial peripheral support void Xbox360Peripheral::SerialConnect(void) { - SerialDisconnect(); - serialHandler = new ChatPadKeyboardClass; + SerialDisconnect(); + serialHandler = new ChatPadKeyboardClass; if (serialHandler != NULL) { const OSString *keys[] = { @@ -1046,7 +829,7 @@ void Xbox360Peripheral::SerialConnect(void) if (serialHandler->init(dictionary)) { serialHandler->attach(this); - serialHandler->start(this); + serialHandler->start(this); } else { @@ -1058,21 +841,21 @@ void Xbox360Peripheral::SerialConnect(void) void Xbox360Peripheral::SerialDisconnect(void) { - if (serialHandler != NULL) - { + if (serialHandler != NULL) + { // Hope it's okay to terminate twice... - serialHandler->terminate(kIOServiceRequired | kIOServiceSynchronous); - serialHandler->release(); - serialHandler = NULL; - } + serialHandler->terminate(kIOServiceRequired | kIOServiceSynchronous); + serialHandler->release(); + serialHandler = NULL; + } } void Xbox360Peripheral::SerialMessage(IOBufferMemoryDescriptor *data, size_t length) { - if (serialHandler != NULL) - { - char *buffer = (char*)data->getBytesNoCopy(); - if ((length == 5) && (buffer[0] == 0x00)) - serialHandler->handleReport(data, kIOHIDReportTypeInput); - } + if (serialHandler != NULL) + { + char *buffer = (char*)data->getBytesNoCopy(); + if ((length == 5) && (buffer[0] == 0x00)) + serialHandler->handleReport(data, kIOHIDReportTypeInput); + } } diff --git a/360Controller/_60Controller.h b/360Controller/_60Controller.h index cccf9c11..ea02aad9 100644 --- a/360Controller/_60Controller.h +++ b/360Controller/_60Controller.h @@ -1,32 +1,31 @@ /* - MICE Xbox 360 Controller driver for Mac OS X - Copyright (C) 2006-2013 Colin Munro - - _60Controller.h - declaration of the driver main class - - This file is part of Xbox360Controller. - - Xbox360Controller is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Xbox360Controller is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Foobar; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ + MICE Xbox 360 Controller driver for Mac OS X + Copyright (C) 2006-2013 Colin Munro + + _60Controller.h - declaration of the driver main class + + This file is part of Xbox360Controller. + + Xbox360Controller is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Xbox360Controller is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Foobar; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ #ifndef __XBOX360CONTROLLER_H__ #define __XBOX360CONTROLLER_H__ #include #include #include -#include "ControlStruct.h" class Xbox360ControllerClass; class ChatPadKeyboardClass; @@ -38,117 +37,90 @@ class Xbox360Peripheral : public IOService private: void ReleaseAll(void); bool QueueRead(void); - bool QueueSerialRead(void); + bool QueueSerialRead(void); - static void SerialReadCompleteInternal(void *target,void *parameter,IOReturn status,UInt32 bufferSizeRemaining); + static void SerialReadCompleteInternal(void *target,void *parameter,IOReturn status,UInt32 bufferSizeRemaining); static void ReadCompleteInternal(void *target,void *parameter,IOReturn status,UInt32 bufferSizeRemaining); static void WriteCompleteInternal(void *target,void *parameter,IOReturn status,UInt32 bufferSizeRemaining); - - void SerialReadComplete(void *parameter, IOReturn status, UInt32 bufferSizeRemaining); - + + void SerialReadComplete(void *parameter, IOReturn status, UInt32 bufferSizeRemaining); + + void fiddleReport(IOBufferMemoryDescriptor *buffer); + void readSettings(void); - static void ChatPadTimerActionWrapper(OSObject *owner, IOTimerEventSource *sender); - void ChatPadTimerAction(IOTimerEventSource *sender); - void SendToggle(void); - void SendSpecial(UInt16 value); - void SendInit(UInt16 value, UInt16 index); + static void ChatPadTimerActionWrapper(OSObject *owner, IOTimerEventSource *sender); + void ChatPadTimerAction(IOTimerEventSource *sender); + void SendToggle(void); + void SendSpecial(UInt16 value); + void SendInit(UInt16 value, UInt16 index); bool SendSwitch(bool sendOut); - - void PadConnect(void); - void PadDisconnect(void); - - void SerialConnect(void); - void SerialDisconnect(void); - void SerialMessage(IOBufferMemoryDescriptor *data, size_t length); - - void MakeSettingsChanges(void); + + void PadConnect(void); + void PadDisconnect(void); + + void SerialConnect(void); + void SerialDisconnect(void); + void SerialMessage(IOBufferMemoryDescriptor *data, size_t length); protected: - typedef enum TIMER_STATE { - tsToggle, - tsReset1, - tsReset2, - tsMiniToggle, - tsSet1, - tsSet2, - tsSet3, - } TIMER_STATE; - - typedef enum CONTROLLER_TYPE { - Xbox360 = 0, - XboxOriginal = 1, - XboxOne = 2, - XboxOnePretend360 = 3, - Xbox360Pretend360 = 4, - } CONTROLLER_TYPE; - + typedef enum { + tsToggle, + tsReset1, + tsReset2, + tsMiniToggle, + tsSet1, + tsSet2, + tsSet3, + } TIMER_STATE; + IOUSBDevice *device; IOLock *mainLock; - - // Joypad + + // Joypad IOUSBInterface *interface; IOUSBPipe *inPipe,*outPipe; IOBufferMemoryDescriptor *inBuffer; - - // Keyboard - IOUSBInterface *serialIn; - IOUSBPipe *serialInPipe; + + // Keyboard + IOUSBInterface *serialIn; + IOUSBPipe *serialInPipe; IOBufferMemoryDescriptor *serialInBuffer; - IOTimerEventSource *serialTimer; - bool serialToggle, serialHeard, serialActive; - int serialResetCount; - TIMER_STATE serialTimerState; - ChatPadKeyboardClass *serialHandler; - Xbox360ControllerClass *padHandler; + IOTimerEventSource *serialTimer; + bool serialToggle, serialHeard, serialActive; + int serialResetCount; + TIMER_STATE serialTimerState; + ChatPadKeyboardClass *serialHandler; + Xbox360ControllerClass *padHandler; UInt8 chatpadInit[2]; - CONTROLLER_TYPE controllerType; // Settings bool invertLeftX,invertLeftY; bool invertRightX,invertRightY; short deadzoneLeft,deadzoneRight; bool relativeLeft,relativeRight; - bool deadOffLeft, deadOffRight; - - void normalizeAxis(SInt16& axis, short deadzone); public: - // Controller specific - UInt8 rumbleType; - - bool swapSticks; - UInt8 mapping[15]; - bool noMapping = true; - bool pretend360; // Change VID and PID to MS 360 Controller - UInt8 outCounter = 6; - // this is from the IORegistryEntry - no provider yet virtual bool init(OSDictionary *propTable); virtual void free(void); - bool start(IOService *provider); - bool willTerminate(IOService *provider, IOOptionBits options); - void stop(IOService *provider); - + bool start(IOService *provider); + void stop(IOService *provider); + // IOKit methods. These methods are defines in virtual IOReturn setProperties(OSObject *properties); virtual IOReturn message(UInt32 type, IOService *provider, void *argument); - - virtual bool didTerminate(IOService *provider, IOOptionBits options, bool *defer); - - // Hooks + + // Hooks virtual void ReadComplete(void *parameter,IOReturn status,UInt32 bufferSizeRemaining); virtual void WriteComplete(void *parameter,IOReturn status,UInt32 bufferSizeRemaining); bool QueueWrite(const void *bytes,UInt32 length); - void fiddleReport(XBOX360_HAT& left, XBOX360_HAT& right); - - IOHIDDevice* getController(int index); - - + + IOHIDDevice* getController(int index); }; #endif /* __XBOX360CONTROLLER_H__ */ diff --git a/360Controller/chatpadhid.h b/360Controller/chatpadhid.h old mode 100644 new mode 100755 index 642141a7..a7d3c1eb --- a/360Controller/chatpadhid.h +++ b/360Controller/chatpadhid.h @@ -1,57 +1,58 @@ -/* - MICE Xbox 360 Controller driver for Mac OS X - Copyright (C) 2006-2013 Colin Munro - - chatpadhid.h - a HID descriptor for the Microsoft ChatPad accessory - - This file is part of Xbox360Controller. - - Xbox360Controller is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Xbox360Controller is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Foobar; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -// F:\Documents and Settings\Desktop\hid\ChatPad_Keyboard.h - - -static const unsigned char ReportDescriptor[] = { - 0x05, 0x01, // USAGE_PAGE (Generic Desktop) - 0x09, 0x06, // USAGE (Keyboard) - 0xa1, 0x01, // COLLECTION (Application) - 0x25, 0x00, // LOGICAL_MAXIMUM (0) - 0x15, 0x00, // LOGICAL_MINIMUM (0) - 0x75, 0x08, // REPORT_SIZE (8) - 0x95, 0x01, // REPORT_COUNT (1) - 0x81, 0x03, // INPUT (Cnst,Var,Abs) - 0x05, 0x07, // USAGE_PAGE (Keyboard) - 0x09, 0xe1, // USAGE (Keyboard LeftShift) - 0x09, 0xe0, // USAGE (Keyboard LeftControl) - 0x09, 0xe2, // USAGE (Keyboard LeftAlt) - 0x09, 0xe3, // USAGE (Keyboard Left GUI) - 0x15, 0x00, // LOGICAL_MINIMUM (0) - 0x25, 0x01, // LOGICAL_MAXIMUM (1) - 0x75, 0x01, // REPORT_SIZE (1) - 0x95, 0x04, // REPORT_COUNT (4) - 0x81, 0x02, // INPUT (Data,Var,Abs) - 0x75, 0x01, // REPORT_SIZE (1) - 0x95, 0x04, // REPORT_COUNT (4) - 0x81, 0x03, // INPUT (Cnst,Var,Abs) - 0x95, 0x03, // REPORT_COUNT (3) - 0x75, 0x08, // REPORT_SIZE (8) - 0x15, 0x00, // LOGICAL_MINIMUM (0) - 0x26, 0xe7, 0x00, // LOGICAL_MAXIMUM (231) - 0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated)) - 0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI) - 0x81, 0x00, // INPUT (Data,Ary,Abs) - 0xc0 // END_COLLECTION -}; +/* + MICE Xbox 360 Controller driver for Mac OS X + Copyright (C) 2006-2013 Colin Munro + + chatpadhid.h - a HID descriptor for the Microsoft ChatPad accessory + + This file is part of Xbox360Controller. + + Xbox360Controller is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Xbox360Controller is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Foobar; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +// F:\Documents and Settings\Desktop\hid\ChatPad_Keyboard.h + + +char ReportDescriptor[58] = { + 0x05, 0x01, // USAGE_PAGE (Generic Desktop) + 0x09, 0x06, // USAGE (Keyboard) + 0xa1, 0x01, // COLLECTION (Application) + 0x25, 0x00, // LOGICAL_MAXIMUM (0) + 0x15, 0x00, // LOGICAL_MINIMUM (0) + 0x75, 0x08, // REPORT_SIZE (8) + 0x95, 0x01, // REPORT_COUNT (1) + 0x81, 0x03, // INPUT (Cnst,Var,Abs) + 0x05, 0x07, // USAGE_PAGE (Keyboard) + 0x09, 0xe1, // USAGE (Keyboard LeftShift) + 0x09, 0xe0, // USAGE (Keyboard LeftControl) + 0x09, 0xe2, // USAGE (Keyboard LeftAlt) + 0x09, 0xe3, // USAGE (Keyboard Left GUI) + 0x15, 0x00, // LOGICAL_MINIMUM (0) + 0x25, 0x01, // LOGICAL_MAXIMUM (1) + 0x75, 0x01, // REPORT_SIZE (1) + 0x95, 0x04, // REPORT_COUNT (4) + 0x81, 0x02, // INPUT (Data,Var,Abs) + 0x75, 0x01, // REPORT_SIZE (1) + 0x95, 0x04, // REPORT_COUNT (4) + 0x81, 0x03, // INPUT (Cnst,Var,Abs) + 0x95, 0x03, // REPORT_COUNT (3) + 0x75, 0x08, // REPORT_SIZE (8) + 0x15, 0x00, // LOGICAL_MINIMUM (0) + 0x26, 0xe7, 0x00, // LOGICAL_MAXIMUM (231) + 0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated)) + 0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI) + 0x81, 0x00, // INPUT (Data,Ary,Abs) + 0xc0 // END_COLLECTION +}; + diff --git a/360Controller/chatpadkeys.cpp b/360Controller/chatpadkeys.cpp index 9ec2cc04..f97dba06 100644 --- a/360Controller/chatpadkeys.cpp +++ b/360Controller/chatpadkeys.cpp @@ -1,21 +1,21 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + chatpadkeys.cpp - Converts a chatpad scancode to a USB key value - + This file is part of Xbox360Controller. - + Xbox360Controller is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + Xbox360Controller is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -23,7 +23,7 @@ #include "chatpadkeys.h" -#define ROW_SIZE 8 +#define ROW_SIZE 8 typedef struct MAP_DATA { unsigned char row[ROW_SIZE]; @@ -42,11 +42,12 @@ static const MAP_DATA columns[] = { unsigned char ChatPad2USB(unsigned char input) { - unsigned char row = input & 0x0F; - unsigned char column = (input & 0xF0) >> 4; - + unsigned char row, column; + + row = input & 0x0F; if (row >= ROW_SIZE) return 0x00; + column = (input & 0xF0) >> 4; if (column >= (sizeof(columns) / sizeof(columns[0]))) return 0x00; return columns[column].row[row]; diff --git a/360Controller/chatpadkeys.h b/360Controller/chatpadkeys.h index 756989c2..4add680d 100644 --- a/360Controller/chatpadkeys.h +++ b/360Controller/chatpadkeys.h @@ -1,21 +1,21 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + chatpadkeys.h - public functions of the ChatPad key handling - + This file is part of Xbox360Controller. - + Xbox360Controller is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + Xbox360Controller is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/360Controller/version.plist b/360Controller/version.plist new file mode 100644 index 00000000..53bf3a3f --- /dev/null +++ b/360Controller/version.plist @@ -0,0 +1,16 @@ + + + + + BuildVersion + 12 + CFBundleVersion + 1.0 + ProductBuildVersion + 7K571 + ProjectName + DevToolsWizardTemplates + SourceVersion + 3870000 + + diff --git a/360Controller/xbox360hid.h b/360Controller/xbox360hid.h index 5ccc2d8c..ccafb6ec 100644 --- a/360Controller/xbox360hid.h +++ b/360Controller/xbox360hid.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + xbox360hid.h - HID descriptor for the driver - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -28,7 +28,7 @@ * just kept working with this one anyway :) */ -static const unsigned char ReportDescriptor[] = { +char ReportDescriptor[196] = { 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x05, // USAGE (Game Pad) 0xa1, 0x01, // COLLECTION (Application) @@ -122,4 +122,4 @@ static const unsigned char ReportDescriptor[] = { 0xc0, // END_COLLECTION 0xc0, // END_COLLECTION 0xc0 // END_COLLECTION -}; +}; \ No newline at end of file diff --git a/360Controller/zh-Hans.lproj/InfoPlist.strings b/360Controller/zh-Hans.lproj/InfoPlist.strings deleted file mode 100644 index 4a8156e4..00000000 --- a/360Controller/zh-Hans.lproj/InfoPlist.strings +++ /dev/null @@ -1,4 +0,0 @@ -/* Localized versions of Info.plist keys */ - -CFBundleName = "360Controller"; -NSHumanReadableCopyright = "© Colin Munro, 2005-11"; diff --git a/360Daemon/360Daemon.1 b/360Daemon/360Daemon.1 new file mode 100644 index 00000000..b523c0c7 --- /dev/null +++ b/360Daemon/360Daemon.1 @@ -0,0 +1,79 @@ +.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples. +.\"See Also: +.\"man mdoc.samples for a complete listing of options +.\"man mdoc for the short list of editing options +.\"/usr/share/misc/mdoc.template +.Dd 7/8/07 \" DATE +.Dt 360Daemon 1 \" Program name and manual section number +.Os Darwin +.Sh NAME \" Section Header - required - don't modify +.Nm 360Daemon, +.\" The following lines are read in generating the apropos(man -k) database. Use only key +.\" words here as the database is built based on the words here and in the .ND line. +.Nm Other_name_for_same_program(), +.Nm Yet another name for the same program. +.\" Use .Nm macro to designate other names for the documented program. +.Nd This line parsed for whatis database. +.Sh SYNOPSIS \" Section Header - required - don't modify +.Nm +.Op Fl abcd \" [-abcd] +.Op Fl a Ar path \" [-a path] +.Op Ar file \" [file] +.Op Ar \" [file ...] +.Ar arg0 \" Underlined argument - use .Ar anywhere to underline +arg2 ... \" Arguments +.Sh DESCRIPTION \" Section Header - required - don't modify +Use the .Nm macro to refer to your program throughout the man page like such: +.Nm +Underlining is accomplished with the .Ar macro like this: +.Ar underlined text . +.Pp \" Inserts a space +A list of items with descriptions: +.Bl -tag -width -indent \" Begins a tagged list +.It item a \" Each item preceded by .It macro +Description of item a +.It item b +Description of item b +.El \" Ends the list +.Pp +A list of flags and their descriptions: +.Bl -tag -width -indent \" Differs from above in tag removed +.It Fl a \"-a flag as a list item +Description of -a flag +.It Fl b +Description of -b flag +.El \" Ends the list +.Pp +.\" .Sh ENVIRONMENT \" May not be needed +.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1 +.\" .It Ev ENV_VAR_1 +.\" Description of ENV_VAR_1 +.\" .It Ev ENV_VAR_2 +.\" Description of ENV_VAR_2 +.\" .El +.Sh FILES \" File used or created by the topic of the man page +.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact +.It Pa /usr/share/file_name +FILE_1 description +.It Pa /Users/joeuser/Library/really_long_file_name +FILE_2 description +.El \" Ends the list +.\" .Sh DIAGNOSTICS \" May not be needed +.\" .Bl -diag +.\" .It Diagnostic Tag +.\" Diagnostic informtion here. +.\" .It Diagnostic Tag +.\" Diagnostic informtion here. +.\" .El +.Sh SEE ALSO +.\" List links in ascending order by section, alphabetically within a section. +.\" Please do not reference files that do not exist without filing a bug report +.Xr a 1 , +.Xr b 1 , +.Xr c 1 , +.Xr a 2 , +.Xr b 2 , +.Xr a 3 , +.Xr b 3 +.\" .Sh BUGS \" Document known, unremedied bugs +.\" .Sh HISTORY \" Document history if command behaves in a unique manner \ No newline at end of file diff --git a/360Daemon/360Daemon.m b/360Daemon/360Daemon.m index 7b284b43..abbb1d2c 100644 --- a/360Daemon/360Daemon.m +++ b/360Daemon/360Daemon.m @@ -1,65 +1,60 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + 360Daemon.m - main functionality of the support daemon - + This file is part of Xbox360Controller. - + Xbox360Controller is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + Xbox360Controller is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #import -#include -#include -#include -#include +#import +#import +#import +#import #include -#include -#include -#include -#import "ControlPrefs.h" -#import "DaemonLEDs.h" +#import +#include "ControlPrefs.h" #define CHECK_SHOWAGAIN @"Do not show this message again" #define INSTALL_PATH @"/Library/Application Support/MICE/360Daemon" #define RESOURCE_PATH INSTALL_PATH @"/Resources" -static mach_port_t masterPort; -static IONotificationPortRef notifyPort; -static CFRunLoopSourceRef notifySource; -static io_iterator_t onIteratorWired; -static io_iterator_t onIteratorWireless; -static io_iterator_t onIteratorOther; -static io_iterator_t offIteratorWired; -static io_iterator_t offIteratorWireless; -static io_object_t powerNotifier; -static io_connect_t root_power_port; // a reference to the Root Power Domain IOService -static BOOL foundWirelessReceiver; -static DaemonLEDs *leds; - -static CFUserNotificationRef activeAlert = nil; -static CFRunLoopSourceRef activeAlertSource; -static NSInteger activeAlertIndex; +mach_port_t masterPort; +IONotificationPortRef notifyPort; +CFRunLoopSourceRef notifySource; +io_iterator_t onIteratorWired; +io_iterator_t onIteratorWireless; +io_iterator_t onIteratorOther; +io_iterator_t offIteratorWired; +io_iterator_t offIteratorWireless; +BOOL foundWirelessReceiver; +NSString *leds[4]; + +CFUserNotificationRef activeAlert = nil; +CFRunLoopSourceRef activeAlertSource; +int activeAlertIndex; enum { kaPlugNCharge = 0, }; NSString *alertStrings[] = { - @"You have attached a Microsoft Play & Charge cable for your Xbox 360 Wireless Controller. While this cable will allow you to charge your wireless controller, you will require the Microsoft Wireless Gaming Receiver for Windows to use your wireless controller in Mac OS X!", + @"You have attached a Microsoft Play & Charge cable for your XBox 360 Wireless Controller. While this cable will allow you to charge your wireless controller, you will require the Microsoft Wireless Gaming Receiver for Windows to use your wireless controller in Mac OS X!", }; static void releaseAlert(void) @@ -67,28 +62,38 @@ static void releaseAlert(void) CFRunLoopRemoveSource(CFRunLoopGetCurrent(), activeAlertSource, kCFRunLoopCommonModes); CFRelease(activeAlertSource); CFRelease(activeAlert); - activeAlertSource = NULL; - activeAlert = NULL; + activeAlertSource = nil; + activeAlert = nil; } static void callbackAlert(CFUserNotificationRef userNotification, CFOptionFlags responseFlags) { -@autoreleasepool { + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + if (responseFlags & CFUserNotificationCheckBoxChecked(0)) SetAlertDisabled(activeAlertIndex); releaseAlert(); -} + [pool release]; } -static void ShowAlert(NSInteger index) +static void ShowAlert(int index) { SInt32 error; - NSArray *checkBoxes = @[NSLocalizedString(CHECK_SHOWAGAIN, nil)]; - NSDictionary *dictionary = @{(NSString*)kCFUserNotificationAlertHeaderKey: NSLocalizedString(@"Xbox 360 Controller Driver", nil), - (NSString*)kCFUserNotificationAlertMessageKey: NSLocalizedString(alertStrings[index], nil), - (NSString*)kCFUserNotificationCheckBoxTitlesKey: checkBoxes, - (NSString*)kCFUserNotificationIconURLKey: [[NSBundle mainBundle] URLForImageResource:@"Alert"]}; - + NSArray *checkBoxes = [NSArray arrayWithObjects:CHECK_SHOWAGAIN, nil]; + NSArray *dictKeys = [NSArray arrayWithObjects: + (NSString*)kCFUserNotificationAlertHeaderKey, + (NSString*)kCFUserNotificationAlertMessageKey, + (NSString*)kCFUserNotificationCheckBoxTitlesKey, + (NSString*)kCFUserNotificationIconURLKey, + nil]; + NSArray *dictValues = [NSArray arrayWithObjects: + @"XBox 360 Controller Driver", + alertStrings[index], + checkBoxes, + [NSURL fileURLWithPath:RESOURCE_PATH @"/Alert.tif"], + nil]; + NSDictionary *dictionary = [NSDictionary dictionaryWithObjects:dictValues forKeys:dictKeys]; + if (AlertDisabled(index)) return; @@ -99,7 +104,7 @@ static void ShowAlert(NSInteger index) } activeAlertIndex = index; - activeAlert = CFUserNotificationCreate(kCFAllocatorDefault, 0, kCFUserNotificationPlainAlertLevel, &error, (__bridge CFDictionaryRef)dictionary); + activeAlert = CFUserNotificationCreate(kCFAllocatorDefault, 0, kCFUserNotificationPlainAlertLevel, &error, (CFDictionaryRef)dictionary); activeAlertSource = CFUserNotificationCreateRunLoopSource(kCFAllocatorDefault, activeAlert, callbackAlert, 0); CFRunLoopAddSource(CFRunLoopGetCurrent(), activeAlertSource, kCFRunLoopCommonModes); } @@ -110,7 +115,7 @@ static void ConfigureDevice(io_service_t object) IOUSBDeviceInterface **dev; IOReturn err; SInt32 score; - + if ((!IOCreatePlugInInterfaceForService(object, kIOUSBDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &iodev, &score))&&iodev) { err = (*iodev)->QueryInterface(iodev, CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID), (LPVOID)&dev); @@ -120,7 +125,7 @@ static void ConfigureDevice(io_service_t object) if ((*dev)->USBDeviceOpen(dev) == 0) { IOUSBConfigurationDescriptorPtr confDesc; - + if ((*dev)->GetConfigurationDescriptorPtr(dev, 0, &confDesc) == 0) { (*dev)->SetConfiguration(dev, confDesc->bConfigurationValue); @@ -136,44 +141,45 @@ static void ConfigureDevice(io_service_t object) // Supported device - connecting - set settings? static void callbackConnected(void *param,io_iterator_t iterator) { -@autoreleasepool { + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; io_service_t object = 0; - + while ((object = IOIteratorNext(iterator)) != 0) { -#if 0 - CFStringRef bob = IOObjectCopyClass(object); - NSLog(@"Found %p: %@", object, bob); - CFRelease(bob); -#endif + /* + CFStringRef bob = IOObjectCopyClass(object); + NSLog(@"Found %p: %@", object, bob); + CFRelease(bob); + */ if (IOObjectConformsTo(object, "WirelessHIDDevice") || IOObjectConformsTo(object, "Xbox360ControllerClass")) { - FFDeviceObjectReference forceFeedback = 0; - NSString *serialNumber = GetSerialNumber(object); - + FFDeviceObjectReference forceFeedback; + NSString *serialNumber; + + serialNumber = GetSerialNumber(object); // Supported device - load settings ConfigController(object, GetController(serialNumber)); // Set LEDs + forceFeedback = 0; if (FFCreateDevice(object, &forceFeedback) != FF_OK) forceFeedback = 0; if (forceFeedback != 0) { - FFEFFESCAPE escape = {0}; + FFEFFESCAPE escape; unsigned char c; int i; - + c = 0x0a; if (serialNumber != nil) { for (i = 0; i < 4; i++) { - if ([leds serialNumberAtLEDIsBlank:i] || ([[leds serialNumberAtLED:i] caseInsensitiveCompare:serialNumber] == NSOrderedSame)) + if ((leds[i] == nil) || ([leds[i] caseInsensitiveCompare:serialNumber] == NSOrderedSame)) { c = 0x06 + i; - if ([leds serialNumberAtLEDIsBlank:i]) { - [leds setLED:i toSerialNumber:serialNumber]; - // NSLog(@"Added controller with LED %i", i); - } + if (leds[i] == nil) + leds[i] = [serialNumber retain]; +// NSLog(@"Added controller with LED %i", i); break; } } @@ -182,18 +188,20 @@ static void callbackConnected(void *param,io_iterator_t iterator) escape.dwCommand = 0x02; escape.cbInBuffer = sizeof(c); escape.lpvInBuffer = &c; + escape.cbOutBuffer = 0; + escape.lpvOutBuffer = NULL; FFDeviceEscape(forceFeedback, &escape); FFReleaseDevice(forceFeedback); } } else { - NSNumber *vendorID = CFBridgingRelease(IORegistryEntrySearchCFProperty(object,kIOServicePlane,CFSTR("idVendor"),kCFAllocatorDefault,kIORegistryIterateRecursively | kIORegistryIterateParents)); - NSNumber *productID = CFBridgingRelease(IORegistryEntrySearchCFProperty(object,kIOServicePlane,CFSTR("idProduct"),kCFAllocatorDefault,kIORegistryIterateRecursively | kIORegistryIterateParents)); + CFTypeRef vendorID = IORegistryEntrySearchCFProperty(object,kIOServicePlane,CFSTR("idVendor"),kCFAllocatorDefault,kIORegistryIterateRecursively | kIORegistryIterateParents); + CFTypeRef productID = IORegistryEntrySearchCFProperty(object,kIOServicePlane,CFSTR("idProduct"),kCFAllocatorDefault,kIORegistryIterateRecursively | kIORegistryIterateParents); if ((vendorID != NULL) && (productID != NULL)) { - UInt32 idVendor = [vendorID unsignedIntValue]; - UInt32 idProduct = [productID unsignedIntValue]; + UInt32 idVendor = [((NSNumber*)vendorID) unsignedIntValue]; + UInt32 idProduct = [((NSNumber*)productID) unsignedIntValue]; if (idVendor == 0x045e) { // Microsoft @@ -206,95 +214,63 @@ static void callbackConnected(void *param,io_iterator_t iterator) break; case 0x0719: // Microsoft Wireless Gaming Receiver case 0x0291: // Third party Wireless Gaming Receiver - foundWirelessReceiver = YES; + foundWirelessReceiver = TRUE; break; } } } + if (vendorID != NULL) + CFRelease(vendorID); + if (productID != NULL) + CFRelease(productID); } IOObjectRelease(object); } -} + [pool release]; } // Supported device - disconnecting static void callbackDisconnected(void *param, io_iterator_t iterator) { -@autoreleasepool { + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; io_service_t object = 0; NSString *serial; int i; - + while ((object = IOIteratorNext(iterator)) != 0) { -#if 0 - CFStringRef bob = IOObjectCopyClass(object); - NSLog(@"Lost %p: %@", object, bob); - CFRelease(bob); -#endif + /* + CFStringRef bob = IOObjectCopyClass(object); + NSLog(@"Lost %p: %@", object, bob); + CFRelease(bob); + */ serial = GetSerialNumber(object); if (serial != nil) { for (i = 0; i < 4; i++) { - if ([leds serialNumberAtLEDIsBlank:i]) + if (leds[i] == nil) continue; - if ([[leds serialNumberAtLED:i] caseInsensitiveCompare:serial] == NSOrderedSame) + if ([leds[i] caseInsensitiveCompare:serial] == NSOrderedSame) { - [leds clearSerialNumberAtLED:i]; - // NSLog(@"Removed controller with LED %i", i); + [leds[i] release]; + leds[i] = nil; +// NSLog(@"Removed controller with LED %i", i); } } } IOObjectRelease(object); } -} -} - -static void callbackPower(void *refCon, io_service_t service, natural_t messageType, void *messageArgument) -{ - switch (messageType) - { - case kIOMessageCanSystemSleep: - // we will allow idle sleep - IOAllowPowerChange(root_power_port, (long)messageArgument); - break; - - case kIOMessageSystemWillSleep: - IOAllowPowerChange(root_power_port, (long)messageArgument); - break; - - case kIOMessageSystemHasPoweredOn: - //System has finished waking up... - { - io_iterator_t newItr; - IOServiceGetMatchingServices(masterPort, IOServiceMatching(kIOUSBDeviceClassName), &newItr); - callbackConnected(NULL, newItr); - IOObjectRelease(newItr); - // Wired 360 devices - IOServiceGetMatchingServices(masterPort, IOServiceMatching("Xbox360ControllerClass"), &newItr); - callbackConnected(NULL, newItr); - IOObjectRelease(newItr); - // Wireless 360 devices - IOServiceGetMatchingServices(masterPort, IOServiceMatching("WirelessHIDDevice"), &newItr); - callbackConnected(NULL, newItr); - IOObjectRelease(newItr); - } - break; - - default: - break; - } + [pool release]; } // Entry point int main (int argc, const char * argv[]) { -@autoreleasepool { - foundWirelessReceiver = NO; - leds = [[DaemonLEDs alloc] init]; - // notification port allocated by IORegisterForSystemPower - IONotificationPortRef sleepNotifyPort; + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + + foundWirelessReceiver = FALSE; + memset(leds, 0, sizeof(leds)); // Get master port, for accessing I/O Kit IOMasterPort(MACH_PORT_NULL,&masterPort); // Set up notification of USB device addition/removal @@ -302,31 +278,19 @@ int main (int argc, const char * argv[]) notifySource=IONotificationPortGetRunLoopSource(notifyPort); CFRunLoopAddSource(CFRunLoopGetCurrent(),notifySource,kCFRunLoopCommonModes); // Start listening - // USB devices + // USB devices IOServiceAddMatchingNotification(notifyPort, kIOFirstMatchNotification, IOServiceMatching(kIOUSBDeviceClassName), callbackConnected, NULL, &onIteratorOther); callbackConnected(NULL, onIteratorOther); - // Wired 360 devices + // Wired 360 devices IOServiceAddMatchingNotification(notifyPort, kIOFirstMatchNotification, IOServiceMatching("Xbox360ControllerClass"), callbackConnected, NULL, &onIteratorWired); callbackConnected(NULL, onIteratorWired); IOServiceAddMatchingNotification(notifyPort, kIOTerminatedNotification, IOServiceMatching("Xbox360ControllerClass"), callbackDisconnected, NULL, &offIteratorWired); callbackDisconnected(NULL, offIteratorWired); - // Wireless 360 devices + // Wireless 360 devices IOServiceAddMatchingNotification(notifyPort, kIOFirstMatchNotification, IOServiceMatching("WirelessHIDDevice"), callbackConnected, NULL, &onIteratorWireless); callbackConnected(NULL, onIteratorWireless); IOServiceAddMatchingNotification(notifyPort, kIOTerminatedNotification, IOServiceMatching("WirelessHIDDevice"), callbackDisconnected, NULL, &offIteratorWireless); callbackDisconnected(NULL, offIteratorWireless); - // wake/sleep watching - root_power_port = IORegisterForSystemPower(NULL, &sleepNotifyPort, callbackPower, &powerNotifier); - if (root_power_port == 0) - { - printf("IORegisterForSystemPower failed\n"); - } - else - { - CFRunLoopAddSource(CFRunLoopGetCurrent(), - IONotificationPortGetRunLoopSource(sleepNotifyPort), kCFRunLoopCommonModes); - } - // Run loop CFRunLoopRun(); // Stop listening @@ -338,15 +302,7 @@ int main (int argc, const char * argv[]) CFRunLoopRemoveSource(CFRunLoopGetCurrent(), notifySource, kCFRunLoopCommonModes); CFRunLoopSourceInvalidate(notifySource); IONotificationPortDestroy(notifyPort); - if (root_power_port) { - CFRunLoopRemoveSource(CFRunLoopGetCurrent(), - IONotificationPortGetRunLoopSource(sleepNotifyPort), - kCFRunLoopCommonModes); - IODeregisterForSystemPower(&powerNotifier); - IOServiceClose(root_power_port); - IONotificationPortDestroy(sleepNotifyPort); - } // End -} + [pool release]; return 0; } diff --git a/360Daemon/360Daemon.xcodeproj/project.pbxproj b/360Daemon/360Daemon.xcodeproj/project.pbxproj new file mode 100644 index 00000000..c323444c --- /dev/null +++ b/360Daemon/360Daemon.xcodeproj/project.pbxproj @@ -0,0 +1,248 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 3B7905000CE3F6A400ACB699 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B7904FF0CE3F6A400ACB699 /* ForceFeedback.framework */; }; + 3B7A8E2C0CE14E38005BB45B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B7A8E2B0CE14E38005BB45B /* IOKit.framework */; }; + 3B8698090CE2903100283CEC /* ControlPrefs.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B8698080CE2903100283CEC /* ControlPrefs.m */; }; + 8DD76F9A0486AA7600D96B5E /* 360Daemon.m in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* 360Daemon.m */; settings = {ATTRIBUTES = (); }; }; + 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; }; + 8DD76F9F0486AA7600D96B5E /* 360Daemon.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6859EA3029092ED04C91782 /* 360Daemon.1 */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F9E0486AA7600D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + 8DD76F9F0486AA7600D96B5E /* 360Daemon.1 in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 08FB7796FE84155DC02AAC07 /* 360Daemon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = 360Daemon.m; sourceTree = ""; }; + 08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 32A70AAB03705E1F00C91783 /* 360Daemon_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 360Daemon_Prefix.pch; sourceTree = ""; }; + 3B7904D50CE3F13700ACB699 /* Alert.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Alert.tif; sourceTree = ""; }; + 3B7904FF0CE3F6A400ACB699 /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = /System/Library/Frameworks/ForceFeedback.framework; sourceTree = ""; }; + 3B7A8E2B0CE14E38005BB45B /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; + 3B8698070CE2903100283CEC /* ControlPrefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ControlPrefs.h; sourceTree = ""; }; + 3B8698080CE2903100283CEC /* ControlPrefs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ControlPrefs.m; sourceTree = ""; }; + 3BBB7EED16C387C600BC7827 /* com.mice.360Daemon.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.mice.360Daemon.plist; sourceTree = ""; }; + 8DD76FA10486AA7600D96B5E /* 360Daemon */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = 360Daemon; sourceTree = BUILT_PRODUCTS_DIR; }; + C6859EA3029092ED04C91782 /* 360Daemon.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = 360Daemon.1; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F9B0486AA7600D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */, + 3B7A8E2C0CE14E38005BB45B /* IOKit.framework in Frameworks */, + 3B7905000CE3F6A400ACB699 /* ForceFeedback.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* 360Daemon */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + C6859EA2029092E104C91782 /* Documentation */, + 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = 360Daemon; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 3B7904D50CE3F13700ACB699 /* Alert.tif */, + 3B8698070CE2903100283CEC /* ControlPrefs.h */, + 3B8698080CE2903100283CEC /* ControlPrefs.m */, + 32A70AAB03705E1F00C91783 /* 360Daemon_Prefix.pch */, + 08FB7796FE84155DC02AAC07 /* 360Daemon.m */, + 3BBB7EED16C387C600BC7827 /* com.mice.360Daemon.plist */, + ); + name = Source; + sourceTree = ""; + }; + 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 3B7904FF0CE3F6A400ACB699 /* ForceFeedback.framework */, + 3B7A8E2B0CE14E38005BB45B /* IOKit.framework */, + 08FB779EFE84155DC02AAC07 /* Foundation.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76FA10486AA7600D96B5E /* 360Daemon */, + ); + name = Products; + sourceTree = ""; + }; + C6859EA2029092E104C91782 /* Documentation */ = { + isa = PBXGroup; + children = ( + C6859EA3029092ED04C91782 /* 360Daemon.1 */, + ); + name = Documentation; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F960486AA7600D96B5E /* 360Daemon */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB927408733DD40010E9CD /* Build configuration list for PBXNativeTarget "360Daemon" */; + buildPhases = ( + 8DD76F990486AA7600D96B5E /* Sources */, + 8DD76F9B0486AA7600D96B5E /* Frameworks */, + 8DD76F9E0486AA7600D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = 360Daemon; + productInstallPath = "$(HOME)/bin"; + productName = 360Daemon; + productReference = 8DD76FA10486AA7600D96B5E /* 360Daemon */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "360Daemon" */; + compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* 360Daemon */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F960486AA7600D96B5E /* 360Daemon */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F990486AA7600D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8DD76F9A0486AA7600D96B5E /* 360Daemon.m in Sources */, + 3B8698090CE2903100283CEC /* ControlPrefs.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB927508733DD40010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = 360Daemon_Prefix.pch; + INSTALL_PATH = "$(HOME)/bin"; + PRODUCT_NAME = 360Daemon; + SDKROOT = ""; + ZERO_LINK = YES; + }; + name = Debug; + }; + 1DEB927608733DD40010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = 360Daemon_Prefix.pch; + INSTALL_PATH = "$(HOME)/bin"; + PRODUCT_NAME = 360Daemon; + }; + name = Release; + }; + 1DEB927908733DD40010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Debug; + }; + 1DEB927A08733DD40010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB927408733DD40010E9CD /* Build configuration list for PBXNativeTarget "360Daemon" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB927508733DD40010E9CD /* Debug */, + 1DEB927608733DD40010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "360Daemon" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB927908733DD40010E9CD /* Debug */, + 1DEB927A08733DD40010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/360Daemon/360DaemonApp-Info.plist b/360Daemon/360DaemonApp-Info.plist deleted file mode 100644 index 12973fce..00000000 --- a/360Daemon/360DaemonApp-Info.plist +++ /dev/null @@ -1,30 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.mice.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - ${CURRENT_PROJECT_VERSION} - CFBundleSignature - 360D - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - LSMinimumSystemVersion - ${MIN_MACOS_VERSION} - LSUIElement - - NSHumanReadableCopyright - Copyright © 2014 C.W. Betts. All rights reserved. - - diff --git a/360Daemon/360DaemonApp-Prefix.pch b/360Daemon/360Daemon_Prefix.pch similarity index 76% rename from 360Daemon/360DaemonApp-Prefix.pch rename to 360Daemon/360Daemon_Prefix.pch index a992e9b6..d0b6018a 100644 --- a/360Daemon/360DaemonApp-Prefix.pch +++ b/360Daemon/360Daemon_Prefix.pch @@ -3,5 +3,5 @@ // #ifdef __OBJC__ - #import + #import #endif diff --git a/360Daemon/ControlPrefs.h b/360Daemon/ControlPrefs.h index f7929662..d3ec031a 100644 --- a/360Daemon/ControlPrefs.h +++ b/360Daemon/ControlPrefs.h @@ -1,21 +1,21 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + ControlPrefs.h - interface to the preferences functionality - + This file is part of Xbox360Controller. - + Xbox360Controller is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + Xbox360Controller is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -29,8 +29,8 @@ #define D_KNOWNDEV @"KnownDevices" // Daemon's own settings -void SetAlertDisabled(NSInteger index); -BOOL AlertDisabled(NSInteger index); +void SetAlertDisabled(int index); +BOOL AlertDisabled(int index); // Controller settings void SetController(NSString *serial, NSDictionary *data); @@ -38,7 +38,7 @@ NSDictionary* GetController(NSString *serial); // Configuration settings void SetKnownDevices(NSDictionary *devices); -NSDictionary* GetKnownDevices(); +NSDictionary* GetKnownDevices(void); // Utility functions NSString* GetSerialNumber(io_service_t device); diff --git a/360Daemon/ControlPrefs.m b/360Daemon/ControlPrefs.m index a69ed673..fe173308 100644 --- a/360Daemon/ControlPrefs.m +++ b/360Daemon/ControlPrefs.m @@ -1,92 +1,101 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + ControlPrefs.m - code to read and write shared preferences - + This file is part of Xbox360Controller. - + Xbox360Controller is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + Xbox360Controller is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #import "ControlPrefs.h" -void SetAlertDisabled(NSInteger index) +void SetAlertDisabled(int index) { - NSString *prop = [NSString stringWithFormat:@"%@%li", D_SHOWONCE, (long)index]; + NSString *prop; + NSNumber *value; - CFPreferencesSetValue((__bridge CFStringRef)prop, kCFBooleanTrue, DOM_DAEMON, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); - CFPreferencesSynchronize(DOM_DAEMON, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); + prop = [NSString stringWithFormat:@"%@%i", D_SHOWONCE, index]; + value = [NSNumber numberWithBool:TRUE]; + CFPreferencesSetValue((CFStringRef)prop, value, DOM_DAEMON, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); + CFPreferencesSynchronize((CFStringRef)DOM_DAEMON, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); } -BOOL AlertDisabled(NSInteger index) +BOOL AlertDisabled(int index) { - NSString *prop = [NSString stringWithFormat:@"%@%li", D_SHOWONCE, (long)index]; - BOOL result = NO; - CFPropertyListRef value = CFPreferencesCopyValue((__bridge CFStringRef)prop, DOM_DAEMON, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); - + NSString *prop; + BOOL result; + CFPropertyListRef value; + + result = FALSE; + prop = [NSString stringWithFormat:@"%@%i", D_SHOWONCE, index]; + value = CFPreferencesCopyValue((CFStringRef)prop, DOM_DAEMON, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); if (value != NULL) { - result = [CFBridgingRelease(value) boolValue]; + result = [((NSNumber*)value) boolValue]; + CFRelease(value); } return result; } void SetController(NSString *serial, NSDictionary *data) { - CFPreferencesSetValue((__bridge CFStringRef)serial, (__bridge CFPropertyListRef)(data), DOM_CONTROLLERS, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); - CFPreferencesSynchronize(DOM_CONTROLLERS, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); + CFPreferencesSetValue((CFStringRef)serial, data, DOM_CONTROLLERS, kCFPreferencesAnyUser, kCFPreferencesCurrentHost); + CFPreferencesSynchronize(DOM_CONTROLLERS, kCFPreferencesAnyUser, kCFPreferencesCurrentHost); } NSDictionary* GetController(NSString *serial) { CFPropertyListRef value; - CFPreferencesSynchronize(DOM_CONTROLLERS, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); - value = CFPreferencesCopyValue((__bridge CFStringRef)serial, DOM_CONTROLLERS, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); - return CFBridgingRelease(value); + + CFPreferencesSynchronize(DOM_CONTROLLERS, kCFPreferencesAnyUser, kCFPreferencesCurrentHost); + value = CFPreferencesCopyValue((CFStringRef)serial, DOM_CONTROLLERS, kCFPreferencesAnyUser, kCFPreferencesCurrentHost); + return [((NSDictionary*)value) autorelease]; } NSString* GetSerialNumber(io_service_t device) { - CFTypeRef value = IORegistryEntrySearchCFProperty(device, kIOServicePlane, CFSTR("USB Serial Number"), kCFAllocatorDefault, kIORegistryIterateRecursively); - + CFTypeRef value; + + value = IORegistryEntrySearchCFProperty(device, kIOServicePlane, CFSTR("USB Serial Number"), kCFAllocatorDefault, kIORegistryIterateRecursively); if (value == NULL) value = IORegistryEntrySearchCFProperty(device, kIOServicePlane, CFSTR("SerialNumber"), kCFAllocatorDefault, kIORegistryIterateRecursively); - return CFBridgingRelease(value); + return [((NSString*)value) autorelease]; } void ConfigController(io_service_t device, NSDictionary *config) { - IORegistryEntrySetCFProperties(device, (__bridge CFTypeRef)(config)); + IORegistryEntrySetCFProperties(device, config); } void SetKnownDevices(NSDictionary *devices) { // Setting the dictionary should work? NSData *data = [NSKeyedArchiver archivedDataWithRootObject:devices]; - CFPreferencesSetValue((CFStringRef)D_KNOWNDEV, (__bridge CFPropertyListRef)(data), DOM_CONTROLLERS, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); - CFPreferencesSynchronize(DOM_CONTROLLERS, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); + CFPreferencesSetValue((CFStringRef)D_KNOWNDEV, data, DOM_CONTROLLERS, kCFPreferencesAnyUser, kCFPreferencesCurrentHost); + CFPreferencesSynchronize(DOM_CONTROLLERS, kCFPreferencesAnyUser, kCFPreferencesCurrentHost); } NSDictionary* GetKnownDevices(void) { CFPropertyListRef value; NSData *data; - - CFPreferencesSynchronize(DOM_CONTROLLERS, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); - value = CFPreferencesCopyValue((CFStringRef)D_KNOWNDEV, DOM_CONTROLLERS, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost); - data = CFBridgingRelease(value); + + CFPreferencesSynchronize(DOM_CONTROLLERS, kCFPreferencesAnyUser, kCFPreferencesCurrentHost); + value = CFPreferencesCopyValue((CFStringRef)D_KNOWNDEV, DOM_CONTROLLERS, kCFPreferencesAnyUser, kCFPreferencesCurrentHost); + data = [(NSData*)value autorelease]; if (data == nil) return nil; return [NSKeyedUnarchiver unarchiveObjectWithData:data]; diff --git a/360Daemon/DaemonLEDs.h b/360Daemon/DaemonLEDs.h deleted file mode 100644 index 37eea0ef..00000000 --- a/360Daemon/DaemonLEDs.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// DaemonLEDs.h -// 360 Driver -// -// Created by C.W. Betts on 4/25/14. -// Copyright (c) 2014 GitHub. All rights reserved. -// - -#import - -@interface DaemonLEDs : NSObject -- (void)setLED:(int)theLED toSerialNumber:(NSString*)serialNum; -- (NSString *)serialNumberAtLED:(int)theLED; -- (BOOL)serialNumberAtLEDIsBlank:(int)theLED; -- (void)clearSerialNumberAtLED:(int)theLED; -#if 0 -- (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)idx; -- (id)objectAtIndexedSubscript:(NSUInteger)idx; -#endif -@end diff --git a/360Daemon/DaemonLEDs.m b/360Daemon/DaemonLEDs.m deleted file mode 100644 index 01ea829f..00000000 --- a/360Daemon/DaemonLEDs.m +++ /dev/null @@ -1,118 +0,0 @@ -// -// DaemonLEDs.m -// 360 Driver -// -// Created by C.W. Betts on 4/25/14. -// Copyright (c) 2014 GitHub. All rights reserved. -// - -#import "DaemonLEDs.h" - -@interface DaemonLEDs () -@property (copy) NSString *theLED0; -@property (copy) NSString *theLED1; -@property (copy) NSString *theLED2; -@property (copy) NSString *theLED3; -@end - -@implementation DaemonLEDs - -- (void)setLED:(int)theLED toSerialNumber:(NSString*)serialNum -{ - switch (theLED) { - case 0: - self.theLED0 = serialNum; - break; - - case 1: - self.theLED1 = serialNum; - break; - - case 2: - self.theLED2 = serialNum; - break; - - case 3: - self.theLED3 = serialNum; - break; - - default: - break; - } -} - -- (NSString *)serialNumberAtLED:(int)theLED -{ - switch (theLED) { - case 0: - return self.theLED0; - break; - - case 1: - return self.theLED1; - break; - - case 2: - return self.theLED2; - break; - - case 3: - return self.theLED3; - break; - - default: - return @""; - break; - } -} - -- (BOOL)serialNumberAtLEDIsBlank:(int)theLED -{ - switch (theLED) { - case 0: - return self.theLED0 == nil; - break; - - case 1: - return self.theLED1 == nil; - break; - - case 2: - return self.theLED2 == nil; - break; - - case 3: - return self.theLED3 == nil; - break; - - default: - return NO; - break; - } -} - -- (void)clearSerialNumberAtLED:(int)theLED -{ - switch (theLED) { - case 0: - self.theLED0 = nil; - break; - - case 1: - self.theLED1 = nil; - break; - - case 2: - self.theLED2 = nil; - break; - - case 3: - self.theLED3 = nil; - break; - - default: - break; - } -} - -@end diff --git a/360Daemon/FoundationTool.pbproj/project.pbxproj b/360Daemon/FoundationTool.pbproj/project.pbxproj new file mode 100644 index 00000000..728d4247 --- /dev/null +++ b/360Daemon/FoundationTool.pbproj/project.pbxproj @@ -0,0 +1,259 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 39; + objects = { + 014CEA4F0018CE4811CA2923 = { + buildRules = ( + ); + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + ZERO_LINK = YES; + }; + isa = PBXBuildStyle; + name = Development; + }; + 014CEA500018CE4811CA2923 = { + buildRules = ( + ); + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + ZERO_LINK = NO; + }; + isa = PBXBuildStyle; + name = Deployment; + }; +//010 +//011 +//012 +//013 +//014 +//080 +//081 +//082 +//083 +//084 + 08FB7793FE84155DC02AAC07 = { + buildSettings = { + }; + buildStyles = ( + 014CEA4F0018CE4811CA2923, + 014CEA500018CE4811CA2923, + ); + hasScannedForEncodings = 1; + isa = PBXProject; + mainGroup = 08FB7794FE84155DC02AAC07; + projectDirPath = ""; + targets = ( + 8DD76F960486AA7600D96B5E, + ); + }; + 08FB7794FE84155DC02AAC07 = { + children = ( + 08FB7795FE84155DC02AAC07, + C6859EA2029092E104C91782, + 08FB779DFE84155DC02AAC07, + 1AB674ADFE9D54B511CA2CBB, + ); + isa = PBXGroup; + name = "«PROJECTNAME»"; + refType = 4; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 = { + children = ( + 32A70AAB03705E1F00C91783, + 08FB7796FE84155DC02AAC07, + ); + isa = PBXGroup; + name = Source; + refType = 4; + sourceTree = ""; + }; + 08FB7796FE84155DC02AAC07 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = "«PROJECTNAME».m"; + refType = 4; + sourceTree = ""; + }; + 08FB779DFE84155DC02AAC07 = { + children = ( + 08FB779EFE84155DC02AAC07, + ); + isa = PBXGroup; + name = "External Frameworks and Libraries"; + refType = 4; + sourceTree = ""; + }; + 08FB779EFE84155DC02AAC07 = { + fallbackIsa = PBXFileReference; + isa = PBXFrameworkReference; + lastKnownFileType = wrapper.framework; + name = Foundation.framework; + path = /System/Library/Frameworks/Foundation.framework; + refType = 0; + sourceTree = ""; + }; +//080 +//081 +//082 +//083 +//084 +//1A0 +//1A1 +//1A2 +//1A3 +//1A4 + 1AB674ADFE9D54B511CA2CBB = { + children = ( + 8DD76FA10486AA7600D96B5E, + ); + isa = PBXGroup; + name = Products; + refType = 4; + sourceTree = ""; + }; +//1A0 +//1A1 +//1A2 +//1A3 +//1A4 +//320 +//321 +//322 +//323 +//324 + 32A70AAB03705E1F00C91783 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = file; + path = "«PROJECTNAME»_Prefix.pch"; + refType = 4; + sourceTree = ""; + }; +//320 +//321 +//322 +//323 +//324 +//8D0 +//8D1 +//8D2 +//8D3 +//8D4 + 8DD76F960486AA7600D96B5E = { + buildPhases = ( + 8DD76F990486AA7600D96B5E, + 8DD76F9B0486AA7600D96B5E, + 8DD76F9E0486AA7600D96B5E, + ); + buildRules = ( + ); + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "«PROJECTNAME»_Prefix.pch"; + INSTALL_PATH = "$(HOME)/bin"; + PRODUCT_NAME = "«PROJECTNAME»"; + }; + dependencies = ( + ); + isa = PBXNativeTarget; + name = "«PROJECTNAME»"; + productInstallPath = "$(HOME)/bin"; + productName = "«PROJECTNAME»"; + productReference = 8DD76FA10486AA7600D96B5E; + productType = "com.apple.product-type.tool"; + }; + 8DD76F990486AA7600D96B5E = { + buildActionMask = 2147483647; + files = ( + 8DD76F9A0486AA7600D96B5E, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 8DD76F9A0486AA7600D96B5E = { + fileRef = 08FB7796FE84155DC02AAC07; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + ); + }; + }; + 8DD76F9B0486AA7600D96B5E = { + buildActionMask = 2147483647; + files = ( + 8DD76F9C0486AA7600D96B5E, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 8DD76F9C0486AA7600D96B5E = { + fileRef = 08FB779EFE84155DC02AAC07; + isa = PBXBuildFile; + settings = { + }; + }; + 8DD76F9E0486AA7600D96B5E = { + buildActionMask = 8; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + 8DD76F9F0486AA7600D96B5E, + ); + isa = PBXCopyFilesBuildPhase; + runOnlyForDeploymentPostprocessing = 1; + }; + 8DD76F9F0486AA7600D96B5E = { + fileRef = C6859EA3029092ED04C91782; + isa = PBXBuildFile; + settings = { + }; + }; + 8DD76FA10486AA7600D96B5E = { + explicitFileType = "compiled.mach-o.executable"; + includeInIndex = 0; + isa = PBXFileReference; + path = "«PROJECTNAME»"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; +//8D0 +//8D1 +//8D2 +//8D3 +//8D4 +//C60 +//C61 +//C62 +//C63 +//C64 + C6859EA2029092E104C91782 = { + children = ( + C6859EA3029092ED04C91782, + ); + isa = PBXGroup; + name = Documentation; + refType = 4; + sourceTree = ""; + }; + C6859EA3029092ED04C91782 = { + isa = PBXFileReference; + lastKnownFileType = file; + path = "«PROJECTNAME».1"; + refType = 4; + sourceTree = ""; + }; + }; + rootObject = 08FB7793FE84155DC02AAC07; +} diff --git a/360Daemon/Images.xcassets/360Control.appiconset/360-1024.png b/360Daemon/Images.xcassets/360Control.appiconset/360-1024.png deleted file mode 100644 index 208a61c7..00000000 Binary files a/360Daemon/Images.xcassets/360Control.appiconset/360-1024.png and /dev/null differ diff --git a/360Daemon/Images.xcassets/360Control.appiconset/360-128.png b/360Daemon/Images.xcassets/360Control.appiconset/360-128.png deleted file mode 100644 index 926cff69..00000000 Binary files a/360Daemon/Images.xcassets/360Control.appiconset/360-128.png and /dev/null differ diff --git a/360Daemon/Images.xcassets/360Control.appiconset/360-16.png b/360Daemon/Images.xcassets/360Control.appiconset/360-16.png deleted file mode 100644 index 73b7da3a..00000000 Binary files a/360Daemon/Images.xcassets/360Control.appiconset/360-16.png and /dev/null differ diff --git a/360Daemon/Images.xcassets/360Control.appiconset/360-256.png b/360Daemon/Images.xcassets/360Control.appiconset/360-256.png deleted file mode 100644 index 4d357a72..00000000 Binary files a/360Daemon/Images.xcassets/360Control.appiconset/360-256.png and /dev/null differ diff --git a/360Daemon/Images.xcassets/360Control.appiconset/360-32.png b/360Daemon/Images.xcassets/360Control.appiconset/360-32.png deleted file mode 100644 index c7315e89..00000000 Binary files a/360Daemon/Images.xcassets/360Control.appiconset/360-32.png and /dev/null differ diff --git a/360Daemon/Images.xcassets/360Control.appiconset/360-512.png b/360Daemon/Images.xcassets/360Control.appiconset/360-512.png deleted file mode 100644 index ff59c24d..00000000 Binary files a/360Daemon/Images.xcassets/360Control.appiconset/360-512.png and /dev/null differ diff --git a/360Daemon/Images.xcassets/360Control.appiconset/360-64.png b/360Daemon/Images.xcassets/360Control.appiconset/360-64.png deleted file mode 100644 index d61a2f02..00000000 Binary files a/360Daemon/Images.xcassets/360Control.appiconset/360-64.png and /dev/null differ diff --git a/360Daemon/Images.xcassets/360Control.appiconset/Contents.json b/360Daemon/Images.xcassets/360Control.appiconset/Contents.json deleted file mode 100644 index 9e67b1e5..00000000 --- a/360Daemon/Images.xcassets/360Control.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "360-16.png", - "scale" : "1x" - }, - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "360-32.png", - "scale" : "2x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "360-32.png", - "scale" : "1x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "360-64.png", - "scale" : "2x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "360-128.png", - "scale" : "1x" - }, - { - "idiom" : "mac", - "size" : "128x128", - "filename" : "360-256.png", - "scale" : "2x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "360-256.png", - "scale" : "1x" - }, - { - "idiom" : "mac", - "size" : "256x256", - "filename" : "360-512.png", - "scale" : "2x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "360-512.png", - "scale" : "1x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "360-1024.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/360Daemon/com.mice.360Daemon.plist b/360Daemon/com.mice.360Daemon.plist index 386f271a..a0f3a82f 100644 --- a/360Daemon/com.mice.360Daemon.plist +++ b/360Daemon/com.mice.360Daemon.plist @@ -6,7 +6,7 @@ ProgramArguments - /Library/Application Support/MICE/360Daemon.app/Contents/MacOS/360Daemon + /Library/Application Support/MICE/360Daemon/360Daemon KeepAlive diff --git a/360Daemon/en.lproj/InfoPlist.strings b/360Daemon/en.lproj/InfoPlist.strings deleted file mode 100644 index b92732c7..00000000 --- a/360Daemon/en.lproj/InfoPlist.strings +++ /dev/null @@ -1 +0,0 @@ -/* Localized versions of Info.plist keys */ diff --git a/360Daemon/en.lproj/Localizable.strings b/360Daemon/en.lproj/Localizable.strings deleted file mode 100644 index bdfcc203..00000000 --- a/360Daemon/en.lproj/Localizable.strings +++ /dev/null @@ -1,11 +0,0 @@ -/* - Localizable.strings - 360 Driver - - Created by C.W. Betts on 2/28/14. - Copyright (c) 2014 GitHub. All rights reserved. -*/ - -"Do not show this message again" = "Do not show this message again"; -"You have attached a Microsoft Play & Charge cable for your Xbox 360 Wireless Controller. While this cable will allow you to charge your wireless controller, you will require the Microsoft Wireless Gaming Receiver for Windows to use your wireless controller in Mac OS X!" = "You have attached a Microsoft Play & Charge cable for your Xbox 360 Wireless Controller. While this cable will allow you to charge your wireless controller, you will require the Microsoft Wireless Gaming Receiver for Windows to use your wireless controller in Mac OS X!"; -"Xbox 360 Controller Driver" = "Xbox 360 Controller Driver"; diff --git a/360Daemon/zh-Hans.lproj/InfoPlist.strings b/360Daemon/zh-Hans.lproj/InfoPlist.strings deleted file mode 100644 index b92732c7..00000000 --- a/360Daemon/zh-Hans.lproj/InfoPlist.strings +++ /dev/null @@ -1 +0,0 @@ -/* Localized versions of Info.plist keys */ diff --git a/360Daemon/zh-Hans.lproj/Localizable.strings b/360Daemon/zh-Hans.lproj/Localizable.strings deleted file mode 100644 index 52f25b7a..00000000 --- a/360Daemon/zh-Hans.lproj/Localizable.strings +++ /dev/null @@ -1,11 +0,0 @@ -/* - Localizable.strings - 360 Driver - - Created by C.W. Betts on 2/28/14. - Copyright (c) 2014 GitHub. All rights reserved. -*/ - -"Do not show this message again" = "不要再显示此消息"; -"You have attached a Microsoft Play & Charge cable for your Xbox 360 Wireless Controller. While this cable will allow you to charge your wireless controller, you will require the Microsoft Wireless Gaming Receiver for Windows to use your wireless controller in Mac OS X!" = "您已为Xbox 360无线控制器连接了Microsoft Play&Charge电缆。虽然此电缆允许您为无线控制器充电,但您需要Microsoft无线游戏接收器才能在Mac OS X中使用您的无线控制器!"; -"Xbox 360 Controller Driver" = "Xbox 360 控制器驱动"; diff --git a/360Driver.xcworkspace/contents.xcworkspacedata b/360Driver.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index be6e1ae0..00000000 --- a/360Driver.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/DriverTool/DriverTool.1 b/DriverTool/DriverTool.1 new file mode 100644 index 00000000..f5b4c86f --- /dev/null +++ b/DriverTool/DriverTool.1 @@ -0,0 +1,79 @@ +.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples. +.\"See Also: +.\"man mdoc.samples for a complete listing of options +.\"man mdoc for the short list of editing options +.\"/usr/share/misc/mdoc.template +.Dd 8/05/2011 \" DATE +.Dt DriverTool 1 \" Program name and manual section number +.Os Darwin +.Sh NAME \" Section Header - required - don't modify +.Nm DriverTool, +.\" The following lines are read in generating the apropos(man -k) database. Use only key +.\" words here as the database is built based on the words here and in the .ND line. +.Nm Other_name_for_same_program(), +.Nm Yet another name for the same program. +.\" Use .Nm macro to designate other names for the documented program. +.Nd This line parsed for whatis database. +.Sh SYNOPSIS \" Section Header - required - don't modify +.Nm +.Op Fl abcd \" [-abcd] +.Op Fl a Ar path \" [-a path] +.Op Ar file \" [file] +.Op Ar \" [file ...] +.Ar arg0 \" Underlined argument - use .Ar anywhere to underline +arg2 ... \" Arguments +.Sh DESCRIPTION \" Section Header - required - don't modify +Use the .Nm macro to refer to your program throughout the man page like such: +.Nm +Underlining is accomplished with the .Ar macro like this: +.Ar underlined text . +.Pp \" Inserts a space +A list of items with descriptions: +.Bl -tag -width -indent \" Begins a tagged list +.It item a \" Each item preceded by .It macro +Description of item a +.It item b +Description of item b +.El \" Ends the list +.Pp +A list of flags and their descriptions: +.Bl -tag -width -indent \" Differs from above in tag removed +.It Fl a \"-a flag as a list item +Description of -a flag +.It Fl b +Description of -b flag +.El \" Ends the list +.Pp +.\" .Sh ENVIRONMENT \" May not be needed +.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1 +.\" .It Ev ENV_VAR_1 +.\" Description of ENV_VAR_1 +.\" .It Ev ENV_VAR_2 +.\" Description of ENV_VAR_2 +.\" .El +.Sh FILES \" File used or created by the topic of the man page +.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact +.It Pa /usr/share/file_name +FILE_1 description +.It Pa /Users/joeuser/Library/really_long_file_name +FILE_2 description +.El \" Ends the list +.\" .Sh DIAGNOSTICS \" May not be needed +.\" .Bl -diag +.\" .It Diagnostic Tag +.\" Diagnostic informtion here. +.\" .It Diagnostic Tag +.\" Diagnostic informtion here. +.\" .El +.Sh SEE ALSO +.\" List links in ascending order by section, alphabetically within a section. +.\" Please do not reference files that do not exist without filing a bug report +.Xr a 1 , +.Xr b 1 , +.Xr c 1 , +.Xr a 2 , +.Xr b 2 , +.Xr a 3 , +.Xr b 3 +.\" .Sh BUGS \" Document known, unremedied bugs +.\" .Sh HISTORY \" Document history if command behaves in a unique manner \ No newline at end of file diff --git a/DriverTool/DriverTool.m b/DriverTool/DriverTool.m index 9d721c1f..6dc6a29f 100644 --- a/DriverTool/DriverTool.m +++ b/DriverTool/DriverTool.m @@ -1,87 +1,98 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + DriverTool.m - implementation of driver info tweaking tool - + This file is part of Xbox360Controller. - + Xbox360Controller is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + Xbox360Controller is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #import -#define DRIVER_NAME @"360Controller.kext" +#define DRIVER_NAME @"360Controller.kext" static NSDictionary *infoPlistAttributes = nil; -static inline NSString* GetDriverDirectory(void) +static NSString* GetDriverDirectory(void) { NSArray *data = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSSystemDomainMask, YES); - return [data[0] stringByAppendingPathComponent:@"Extensions"]; + return [[data objectAtIndex:0] stringByAppendingPathComponent:@"Extensions"]; } static NSString* GetDriverConfigPath(NSString *driver) { NSString *root = GetDriverDirectory(); - NSArray *pathComp = [root pathComponents]; - pathComp = [pathComp arrayByAddingObjectsFromArray:@[driver, @"Contents", @"Info.plist"]]; - return [NSString pathWithComponents:pathComp]; + NSString *driverPath = [root stringByAppendingPathComponent:driver]; + NSString *contents = [driverPath stringByAppendingPathComponent:@"Contents"]; + return [contents stringByAppendingPathComponent:@"Info.plist"]; } -static NSDictionary *ReadDriverConfig(NSString *driver) +static id ReadDriverConfig(NSString *driver) { - NSString *filename = GetDriverConfigPath(driver); - NSError *error; + NSString *filename; + NSError *error = nil; NSData *data; - - infoPlistAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:filename error:&error]; + NSDictionary *config; + + filename = GetDriverConfigPath(driver); + infoPlistAttributes = [[[NSFileManager defaultManager] attributesOfItemAtPath:filename error:&error] retain]; if (infoPlistAttributes == nil) { NSLog(@"Warning: Failed to read attributes of '%@': %@", filename, error); } data = [NSData dataWithContentsOfFile:filename]; - return [NSPropertyListSerialization propertyListFromData:data mutabilityOption:0 format:NULL errorDescription:NULL]; + config = [NSPropertyListSerialization propertyListFromData:data mutabilityOption:0 format:NULL errorDescription:NULL]; + return config; } static void WriteDriverConfig(NSString *driver, id config) { - NSString *filename = GetDriverConfigPath(driver); - NSError *error; - NSData *data = [NSPropertyListSerialization dataWithPropertyList:config format:NSPropertyListXMLFormat_v1_0 options:0 error:&error]; - + NSString *filename; + NSString *errorString; + NSData *data; + + filename = GetDriverConfigPath(driver); + errorString = nil; + data = [NSPropertyListSerialization dataFromPropertyList:config format:NSPropertyListXMLFormat_v1_0 errorDescription:&errorString]; if (data == nil) - NSLog(@"Error writing config for driver: %@", error); - + NSLog(@"Error writing config for driver: %@", errorString); + [errorString release]; if (![data writeToFile:filename atomically:NO]) NSLog(@"Failed to write file!"); - - if (infoPlistAttributes != nil) { - if (![[NSFileManager defaultManager] setAttributes:infoPlistAttributes ofItemAtPath:filename error:&error]) { - NSLog(@"Error setting attributes on '%@': %@", filename, error); + if (infoPlistAttributes != nil) + { + NSError *error = nil; + if (![[NSFileManager defaultManager] setAttributes:infoPlistAttributes ofItemAtPath:filename error:&error]) + { + NSLog(@"Error setting attributes on '%@': %@", + filename, error); } } } static void ScrubDevices(NSMutableDictionary *devices) { - NSMutableArray *deviceKeys = [[NSMutableArray alloc] initWithCapacity:10]; - - for (NSString *key in devices) { - NSDictionary *device = devices[key]; - if ([(NSString*)device[@"IOClass"] compare:@"Xbox360Peripheral"] == NSOrderedSame) + NSMutableArray *deviceKeys; + + deviceKeys = [NSMutableArray arrayWithCapacity:10]; + for (NSString *key in [devices allKeys]) + { + NSDictionary *device = [devices objectForKey:key]; + if ([(NSString*)[device objectForKey:@"IOClass"] compare:@"Xbox360Peripheral"] == NSOrderedSame) [deviceKeys addObject:key]; } [devices removeObjectsForKeys:deviceKeys]; @@ -89,36 +100,50 @@ static void ScrubDevices(NSMutableDictionary *devices) static id MakeMutableCopy(id object) { - return CFBridgingRelease(CFPropertyListCreateDeepCopy(kCFAllocatorDefault, - (CFTypeRef)object, - kCFPropertyListMutableContainers)); + return [(id)CFPropertyListCreateDeepCopy( + kCFAllocatorDefault, + (CFTypeRef)object, + kCFPropertyListMutableContainers) autorelease]; } static void AddDevice(NSMutableDictionary *personalities, NSString *name, int vendor, int product) { - NSMutableDictionary *controller = [[NSMutableDictionary alloc] initWithCapacity:10]; - - // Standard - controller[@"CFBundleIdentifier"] = @"com.mice.driver.Xbox360Controller"; - controller[@"IOCFPlugInTypes"] = @{@"F4545CE5-BF5B-11D6-A4BB-0003933E3E3E": @"360Controller.kext/Contents/PlugIns/Feedback360.plugin"}; - controller[@"IOClass"] = @"Xbox360Peripheral"; - controller[@"IOProviderClass"] = @"IOUSBDevice"; - controller[@"IOKitDebug"] = @65535; - + NSMutableDictionary *controller; + + controller = [NSMutableDictionary dictionaryWithCapacity:10]; + + // Standard + [controller setObject:@"com.mice.driver.Xbox360Controller" + forKey:@"CFBundleIdentifier"]; + [controller setObject:[NSDictionary dictionaryWithObject:@"360Controller.kext/Contents/PlugIns/Feedback360.plugin" + forKey:@"F4545CE5-BF5B-11D6-A4BB-0003933E3E3E"] + forKey:@"IOCFPlugInTypes"]; + [controller setObject:@"Xbox360Peripheral" + forKey:@"IOClass"]; + [controller setObject:@"IOUSBDevice" + forKey:@"IOProviderClass"]; + [controller setObject:[NSNumber numberWithInt:65535] + forKey:@"IOKitDebug"]; + // Device-specific - controller[@"idVendor"] = @(vendor); - controller[@"idProduct"] = @(product); - + [controller setObject:[NSNumber numberWithInt:vendor] + forKey:@"idVendor"]; + [controller setObject:[NSNumber numberWithInt:product] + forKey:@"idProduct"]; + // Add it to the tree - personalities[name] = controller; + [personalities setObject:controller + forKey:name]; } static void AddDevices(NSMutableDictionary *personalities, int argc, const char *argv[]) { - int i, count = (argc - 2) / 3; + int i, count; + + count = (argc - 2) / 3; for (i = 0; i < count; i++) { - NSString *name = @(argv[(i * 3) + 2]); + NSString *name = [NSString stringWithCString:argv[(i * 3) + 2] encoding:NSUTF8StringEncoding]; int vendor = atoi(argv[(i * 3) + 3]); int product = atoi(argv[(i * 3) + 4]); AddDevice(personalities, name, vendor, product); @@ -126,28 +151,35 @@ static void AddDevices(NSMutableDictionary *personalities, int argc, const char } int main (int argc, const char * argv[]) { -@autoreleasepool { + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + NSDictionary *config = ReadDriverConfig(DRIVER_NAME); if (argc == 1) { // Print out current types - NSDictionary *types = config[@"IOKitPersonalities"]; - - for (NSString *key in types) { - NSDictionary *device = types[key]; - if ([(NSString*)device[@"IOClass"] compare:@"Xbox360Peripheral"] != NSOrderedSame) + NSDictionary *types; + NSArray *keys; + + types = [config objectForKey:@"IOKitPersonalities"]; + keys = [types allKeys]; + for (NSString *key in keys) + { + NSDictionary *device = [types objectForKey:key]; + if ([(NSString*)[device objectForKey:@"IOClass"] compare:@"Xbox360Peripheral"] != NSOrderedSame) continue; fprintf(stdout, "%s,%i,%i\n", [key UTF8String], - [device[@"idVendor"] intValue], - [device[@"idProduct"] intValue]); + [[device objectForKey:@"idVendor"] intValue], + [[device objectForKey:@"idProduct"] intValue]); } - } else if ((argc > 1) && (strcmp(argv[1], "edit") == 0) && (((argc - 2) % 3) == 0)) { + } + else if ((argc > 1) && (strcmp(argv[1], "edit") == 0) && (((argc - 2) % 3) == 0)) + { NSMutableDictionary *saving; NSMutableDictionary *devices; - + saving = MakeMutableCopy(config); - devices = saving[@"IOKitPersonalities"]; + devices = [saving objectForKey:@"IOKitPersonalities"]; ScrubDevices(devices); AddDevices(devices, argc, argv); WriteDriverConfig(DRIVER_NAME, saving); @@ -156,7 +188,7 @@ int main (int argc, const char * argv[]) { } else NSLog(@"Invalid number of parameters (%i)", argc); - + + [pool drain]; return 0; } -} diff --git a/DriverTool/DriverTool.xcodeproj/project.pbxproj b/DriverTool/DriverTool.xcodeproj/project.pbxproj new file mode 100644 index 00000000..c5c59f00 --- /dev/null +++ b/DriverTool/DriverTool.xcodeproj/project.pbxproj @@ -0,0 +1,235 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 8DD76F9A0486AA7600D96B5E /* DriverTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* DriverTool.m */; settings = {ATTRIBUTES = (); }; }; + 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; }; + 8DD76F9F0486AA7600D96B5E /* DriverTool.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6859EA3029092ED04C91782 /* DriverTool.1 */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F9E0486AA7600D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + 8DD76F9F0486AA7600D96B5E /* DriverTool.1 in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 08FB7796FE84155DC02AAC07 /* DriverTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DriverTool.m; sourceTree = ""; }; + 08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 32A70AAB03705E1F00C91783 /* DriverTool_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DriverTool_Prefix.pch; sourceTree = ""; }; + 8DD76FA10486AA7600D96B5E /* DriverTool */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = DriverTool; sourceTree = BUILT_PRODUCTS_DIR; }; + C6859EA3029092ED04C91782 /* DriverTool.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = DriverTool.1; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F9B0486AA7600D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* DriverTool */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + C6859EA2029092E104C91782 /* Documentation */, + 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = DriverTool; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 32A70AAB03705E1F00C91783 /* DriverTool_Prefix.pch */, + 08FB7796FE84155DC02AAC07 /* DriverTool.m */, + ); + name = Source; + sourceTree = ""; + }; + 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 08FB779EFE84155DC02AAC07 /* Foundation.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76FA10486AA7600D96B5E /* DriverTool */, + ); + name = Products; + sourceTree = ""; + }; + C6859EA2029092E104C91782 /* Documentation */ = { + isa = PBXGroup; + children = ( + C6859EA3029092ED04C91782 /* DriverTool.1 */, + ); + name = Documentation; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F960486AA7600D96B5E /* DriverTool */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB927408733DD40010E9CD /* Build configuration list for PBXNativeTarget "DriverTool" */; + buildPhases = ( + 8DD76F990486AA7600D96B5E /* Sources */, + 8DD76F9B0486AA7600D96B5E /* Frameworks */, + 8DD76F9E0486AA7600D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DriverTool; + productInstallPath = "$(HOME)/bin"; + productName = DriverTool; + productReference = 8DD76FA10486AA7600D96B5E /* DriverTool */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "DriverTool" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* DriverTool */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F960486AA7600D96B5E /* DriverTool */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F990486AA7600D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8DD76F9A0486AA7600D96B5E /* DriverTool.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB927508733DD40010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = DriverTool_Prefix.pch; + INSTALL_PATH = /usr/local/bin; + PRODUCT_NAME = DriverTool; + }; + name = Debug; + }; + 1DEB927608733DD40010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = DriverTool_Prefix.pch; + INSTALL_PATH = /usr/local/bin; + PRODUCT_NAME = DriverTool; + SDKROOT = ""; + }; + name = Release; + }; + 1DEB927908733DD40010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = YES; + PREBINDING = NO; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Debug; + }; + 1DEB927A08733DD40010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB927408733DD40010E9CD /* Build configuration list for PBXNativeTarget "DriverTool" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB927508733DD40010E9CD /* Debug */, + 1DEB927608733DD40010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "DriverTool" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB927908733DD40010E9CD /* Debug */, + 1DEB927A08733DD40010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/DriverTool/Info.plist b/DriverTool/Info.plist deleted file mode 100644 index 31834f80..00000000 --- a/DriverTool/Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleName - ${PRODUCT_NAME} - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - CFBundleIdentifier - com.mice.${PRODUCT_NAME:rfc1034identifier} - CFBundleShortVersionString - ${CURRENT_PROJECT_VERSION} - LSMinimumSystemVersion - ${MIN_MACOS_VERSION} - CFBundleInfoDictionaryVersion - 6.0 - - diff --git a/Feedback360/English.lproj/InfoPlist.strings b/Feedback360/English.lproj/InfoPlist.strings index 0d04b229..aa95ec38 100644 --- a/Feedback360/English.lproj/InfoPlist.strings +++ b/Feedback360/English.lproj/InfoPlist.strings @@ -1,4 +1,4 @@ /* Localized versions of Info.plist keys */ CFBundleName = "Feedback360"; -NSHumanReadableCopyright = "© Colin Munro, 2005-2011"; +NSHumanReadableCopyright = "© Colin Munro, 2005-2011"; \ No newline at end of file diff --git a/Feedback360/Feedback360.cpp b/Feedback360/Feedback360.cpp deleted file mode 100644 index 32efbf28..00000000 --- a/Feedback360/Feedback360.cpp +++ /dev/null @@ -1,760 +0,0 @@ -/* - MICE Xbox 360 Controller driver for Mac OS X - Force Feedback module - Copyright (C) 2013 David Ryskalczyk - based on xi, Copyright (C) 2011 Masahiko Morii - - Feedback360.cpp - Main code for the FF plugin - - This file is part of Xbox360Controller. - - Xbox360Controller is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Xbox360Controller is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Xbox360Controller; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "Feedback360.h" -#include -#include -using std::max; -using std::min; - -#define LoopGranularity 10000 // Microseconds - -double CurrentTimeUsingMach() -{ - static mach_timebase_info_data_t info = {0}; - if (!info.denom) - { - if (mach_timebase_info(&info) != KERN_SUCCESS) - { - //Generally it can't fail here. Look at XNU sources //FIXME - info.denom = 0; - return -1.0; - } - } - - uint64_t start = mach_absolute_time(); - - uint64_t nanos = start * info.numer / info.denom; - return (double)nanos / NSEC_PER_SEC; -} - -static IOCFPlugInInterface functionMap360_IOCFPlugInInterface = { - // Padding required for COM - NULL, - // IUnknown - &Feedback360::sQueryInterface, - &Feedback360::sAddRef, - &Feedback360::sRelease, - // IOCFPlugInInterface - 1,0, // Version - &Feedback360::sProbe, - &Feedback360::sStart, - &Feedback360::sStop -}; - -static IOForceFeedbackDeviceInterface functionMap360_IOForceFeedbackDeviceInterface = { - // Padding required for COM - NULL, - // IUnknown - &Feedback360::sQueryInterface, - &Feedback360::sAddRef, - &Feedback360::sRelease, - // IOForceFeedbackDevice - &Feedback360::sGetVersion, - &Feedback360::sInitializeTerminate, - &Feedback360::sDestroyEffect, - &Feedback360::sDownloadEffect, - &Feedback360::sEscape, - &Feedback360::sGetEffectStatus, - &Feedback360::sGetForceFeedbackCapabilities, - &Feedback360::sGetForceFeedbackState, - &Feedback360::sSendForceFeedbackCommand, - &Feedback360::sSetProperty, - &Feedback360::sStartEffect, - &Feedback360::sStopEffect -}; - -Feedback360::Feedback360() : fRefCount(1), EffectIndex(1), Stopped(true), -Paused(false), PausedTime(0), LastTime(0), Gain(10000), PrvLeftLevel(0), -PrvRightLevel(0), Actuator(true), Manual(false) -{ - EffectList = Feedback360EffectVector(); - - iIOCFPlugInInterface.pseudoVTable = (IUnknownVTbl *) &functionMap360_IOCFPlugInInterface; - iIOCFPlugInInterface.obj = this; - - iIOForceFeedbackDeviceInterface.pseudoVTable = (IUnknownVTbl *) &functionMap360_IOForceFeedbackDeviceInterface; - iIOForceFeedbackDeviceInterface.obj = this; - - FactoryID = kFeedback360Uuid; - CFRetain(FactoryID); - CFPlugInAddInstanceForFactory(FactoryID); -} - -Feedback360::~Feedback360() -{ - CFPlugInRemoveInstanceForFactory(FactoryID); - CFRelease(FactoryID); -} - -HRESULT Feedback360::QueryInterface(REFIID iid, LPVOID *ppv) -{ - CFUUIDRef interface = CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault, iid); - - if(CFEqual(interface, kIOForceFeedbackDeviceInterfaceID)) - *ppv = &this->iIOForceFeedbackDeviceInterface; - // IUnknown || IOCFPlugInInterface - else if(CFEqual(interface, IUnknownUUID) || CFEqual(interface, kIOCFPlugInInterfaceID)) - *ppv = &this->iIOCFPlugInInterface; - else - *ppv = NULL; - - // Done - CFRelease(interface); - if ((*ppv) == NULL) return E_NOINTERFACE; - else { - this->iIOCFPlugInInterface.pseudoVTable->AddRef(*ppv); - } - return FF_OK; -} - -ULONG Feedback360::AddRef() -{ - return ++fRefCount; -} - -ULONG Feedback360::Release() -{ - ULONG returnValue = fRefCount - 1; - if(returnValue > 0) { - fRefCount = returnValue; - } else if(returnValue == 0) { - fRefCount = returnValue; - delete this; - } else { - returnValue = 0; - } - return returnValue; -} - -IOCFPlugInInterface** Feedback360::Alloc(void) -{ - Feedback360 *me = new Feedback360(); - if (!me) { - return NULL; - } - return (IOCFPlugInInterface **)(&me->iIOCFPlugInInterface.pseudoVTable); -} - -IOReturn Feedback360::Probe(CFDictionaryRef propertyTable, io_service_t service, SInt32 *order) -{ - if ((service==0) - || ((!IOObjectConformsTo(service,"Xbox360ControllerClass")) - && (!IOObjectConformsTo(service,"Wireless360Controller")))) return kIOReturnBadArgument; - return FF_OK; -} - -IOReturn Feedback360::Start(CFDictionaryRef propertyTable,io_service_t service) -{ - return FF_OK; -} - -IOReturn Feedback360::Stop(void) -{ - return FF_OK; -} - -HRESULT Feedback360::SetProperty(FFProperty property, void *value) -{ - if(property != FFPROP_FFGAIN) { - return FFERR_UNSUPPORTED; - } - - UInt32 NewGain = *((UInt32*)value); - __block HRESULT Result = FF_OK; - - dispatch_sync(Queue, ^{ - if (1 <= NewGain && NewGain <= 10000) - { - Gain = NewGain; - } else { - Gain = max((UInt32)1, min(NewGain, (UInt32)10000)); - Result = FF_TRUNCATED; - } - }); - - return Result; -} - -HRESULT Feedback360::StartEffect(FFEffectDownloadID EffectHandle, FFEffectStartFlag Mode, UInt32 Count) -{ - dispatch_sync(Queue, ^{ - for (Feedback360EffectIterator effectIterator = EffectList.begin() ; effectIterator != EffectList.end(); ++effectIterator) - { - if (effectIterator->Handle == EffectHandle) - { - effectIterator->Status = FFEGES_PLAYING; - effectIterator->PlayCount = Count; - effectIterator->StartTime = CurrentTimeUsingMach(); - Stopped = false; - } else { - if (Mode & FFES_SOLO) { - effectIterator->Status = NULL; - } - } - } - }); - return FF_OK; -} - -HRESULT Feedback360::StopEffect(UInt32 EffectHandle) -{ - dispatch_sync(Queue, ^{ - for (Feedback360EffectIterator effectIterator = EffectList.begin() ; effectIterator != EffectList.end(); ++effectIterator) - { - if (effectIterator->Handle == EffectHandle) - { - effectIterator->Status = NULL; - break; - } - } - }); - return FF_OK; -} - -HRESULT Feedback360::DownloadEffect(CFUUIDRef EffectType, FFEffectDownloadID *EffectHandle, FFEFFECT *DiEffect, FFEffectParameterFlag Flags) -{ - __block HRESULT Result = FF_OK; - - if (Flags & FFEP_NODOWNLOAD) - { - return FF_OK; - } - - dispatch_sync(Queue, ^{ - Feedback360Effect *Effect = NULL; - if (*EffectHandle == 0) { - EffectList.push_back(Feedback360Effect(EffectIndex++)); - Effect = &(EffectList.back()); - *EffectHandle = Effect->Handle; - } else { - for (LONG Index = 0; Index < EffectList.size(); Index++) { - if (EffectList[Index].Handle == *EffectHandle) { - Effect = &(EffectList[Index]); - break; - } - } - } - - if (Effect == NULL || Result == -1) { - Result = FFERR_INTERNAL; - } - else { - Effect->Type = EffectType; - Effect->DiEffect.dwFlags = DiEffect->dwFlags; - - if( Flags & FFEP_DURATION ) - { - Effect->DiEffect.dwDuration = DiEffect->dwDuration; - } - - if( Flags & FFEP_SAMPLEPERIOD ) - { - Effect->DiEffect.dwSamplePeriod = DiEffect->dwSamplePeriod; - } - - if( Flags & FFEP_GAIN ) - { - Effect->DiEffect.dwGain = DiEffect->dwGain; - } - - if( Flags & FFEP_TRIGGERBUTTON ) - { - Effect->DiEffect.dwTriggerButton = DiEffect->dwTriggerButton; - } - - if( Flags & FFEP_TRIGGERREPEATINTERVAL ) - { - Effect->DiEffect.dwTriggerRepeatInterval = DiEffect->dwTriggerRepeatInterval; - } - - if( Flags & FFEP_AXES ) - { - Effect->DiEffect.cAxes = DiEffect->cAxes; - Effect->DiEffect.rgdwAxes = NULL; - } - - if( Flags & FFEP_DIRECTION ) - { - Effect->DiEffect.cAxes = DiEffect->cAxes; - Effect->DiEffect.rglDirection = NULL; - } - - if( ( Flags & FFEP_ENVELOPE ) && DiEffect->lpEnvelope != NULL ) - { - memcpy( &Effect->DiEnvelope, DiEffect->lpEnvelope, sizeof( FFENVELOPE ) ); - if( Effect->DiEffect.dwDuration - Effect->DiEnvelope.dwFadeTime - < Effect->DiEnvelope.dwAttackTime ) - { - Effect->DiEnvelope.dwFadeTime = Effect->DiEnvelope.dwAttackTime; - } - Effect->DiEffect.lpEnvelope = &Effect->DiEnvelope; - } - - Effect->DiEffect.cbTypeSpecificParams = DiEffect->cbTypeSpecificParams; - - if( Flags & FFEP_TYPESPECIFICPARAMS ) - { - if(CFEqual(EffectType, kFFEffectType_CustomForce_ID)) { - memcpy( - &Effect->DiCustomForce - ,DiEffect->lpvTypeSpecificParams - ,DiEffect->cbTypeSpecificParams ); - Effect->DiEffect.lpvTypeSpecificParams = &Effect->DiCustomForce; - } - - else if(CFEqual(EffectType, kFFEffectType_ConstantForce_ID)) { - memcpy( - &Effect->DiConstantForce - ,DiEffect->lpvTypeSpecificParams - ,DiEffect->cbTypeSpecificParams ); - Effect->DiEffect.lpvTypeSpecificParams = &Effect->DiConstantForce; - } - else if(CFEqual(EffectType, kFFEffectType_Square_ID) || CFEqual(EffectType, kFFEffectType_Sine_ID) || CFEqual(EffectType, kFFEffectType_Triangle_ID) || CFEqual(EffectType, kFFEffectType_SawtoothUp_ID) || CFEqual(EffectType, kFFEffectType_SawtoothDown_ID) ) { - memcpy( - &Effect->DiPeriodic - ,DiEffect->lpvTypeSpecificParams - ,DiEffect->cbTypeSpecificParams ); - Effect->DiEffect.lpvTypeSpecificParams = &Effect->DiPeriodic; - } - else if(CFEqual(EffectType, kFFEffectType_RampForce_ID)) { - memcpy( - &Effect->DiRampforce - ,DiEffect->lpvTypeSpecificParams - ,DiEffect->cbTypeSpecificParams ); - Effect->DiEffect.lpvTypeSpecificParams = &Effect->DiRampforce; - } - } - - if( Flags & FFEP_STARTDELAY ) - { - Effect->DiEffect.dwStartDelay = DiEffect->dwStartDelay; - } - - if( Flags & FFEP_START ) - { - Effect->Status = FFEGES_PLAYING; - Effect->PlayCount = 1; - Effect->StartTime = CurrentTimeUsingMach(); - } - - if( Flags & FFEP_NORESTART ) - { - ; - } - Result = FF_OK; - } - }); - return Result; -} - -HRESULT Feedback360::GetForceFeedbackState(ForceFeedbackDeviceState *DeviceState) -{ - if (DeviceState->dwSize != sizeof(FFDEVICESTATE)) - { - return FFERR_INVALIDPARAM; - } - - dispatch_sync(Queue, ^{ - DeviceState->dwState = NULL; - if( EffectList.size() == 0 ) - { - DeviceState->dwState |= FFGFFS_EMPTY; - } - if( Stopped == true ) - { - DeviceState->dwState |= FFGFFS_STOPPED; - } - if( Paused == true ) - { - DeviceState->dwState |= FFGFFS_PAUSED; - } - if (Actuator == true) - { - DeviceState->dwState |= FFGFFS_ACTUATORSON; - } else { - DeviceState->dwState |= FFGFFS_ACTUATORSOFF; - } - DeviceState->dwState |= FFGFFS_POWERON; - DeviceState->dwState |= FFGFFS_SAFETYSWITCHOFF; - DeviceState->dwState |= FFGFFS_USERFFSWITCHON; - - DeviceState->dwLoad = 0; - }); - - return FF_OK; -} - -HRESULT Feedback360::GetForceFeedbackCapabilities(FFCAPABILITIES *capabilities) -{ - capabilities->ffSpecVer.majorRev=kFFPlugInAPIMajorRev; - capabilities->ffSpecVer.minorAndBugRev=kFFPlugInAPIMinorAndBugRev; - capabilities->ffSpecVer.stage=kFFPlugInAPIStage; - capabilities->ffSpecVer.nonRelRev=kFFPlugInAPINonRelRev; - capabilities->supportedEffects=FFCAP_ET_CUSTOMFORCE|FFCAP_ET_CONSTANTFORCE|FFCAP_ET_RAMPFORCE|FFCAP_ET_SQUARE|FFCAP_ET_SINE|FFCAP_ET_TRIANGLE|FFCAP_ET_SAWTOOTHUP|FFCAP_ET_SAWTOOTHDOWN; - capabilities->emulatedEffects=0; - capabilities->subType=FFCAP_ST_VIBRATION; - capabilities->numFfAxes=2; - capabilities->ffAxes[0]=FFJOFS_X; - capabilities->ffAxes[1]=FFJOFS_Y; - capabilities->storageCapacity=256; - capabilities->playbackCapacity=1; - capabilities->driverVer.majorRev=FeedbackDriverVersionMajor; - capabilities->driverVer.minorAndBugRev=FeedbackDriverVersionMinor; - capabilities->driverVer.stage=FeedbackDriverVersionStage; - capabilities->driverVer.nonRelRev=FeedbackDriverVersionNonRelRev; - capabilities->firmwareVer.majorRev=1; - capabilities->firmwareVer.minorAndBugRev=0; - capabilities->firmwareVer.stage=developStage; - capabilities->firmwareVer.nonRelRev=0; - capabilities->hardwareVer.majorRev=1; - capabilities->hardwareVer.minorAndBugRev=0; - capabilities->hardwareVer.stage=developStage; - capabilities->hardwareVer.nonRelRev=0; - return FF_OK; -} - -HRESULT Feedback360::SendForceFeedbackCommand(FFCommandFlag state) -{ - __block HRESULT Result = FF_OK; - - dispatch_sync(Queue, ^{ - switch (state) { - case FFSFFC_RESET: - EffectList.clear(); - Stopped = true; - Paused = false; - break; - - case FFSFFC_STOPALL: - for (Feedback360EffectIterator effectIterator = EffectList.begin() ; effectIterator != EffectList.end(); ++effectIterator) - { - effectIterator->Status = NULL; - } - Stopped = true; - Paused = false; - break; - - case FFSFFC_PAUSE: - Paused = true; - PausedTime = CurrentTimeUsingMach(); - break; - - case FFSFFC_CONTINUE: - for (Feedback360EffectIterator effectIterator = EffectList.begin() ; effectIterator != EffectList.end(); ++effectIterator) - { - effectIterator->StartTime += ( CurrentTimeUsingMach() - PausedTime ); - } - Paused = false; - break; - - case FFSFFC_SETACTUATORSON: - Actuator = true; - break; - - case FFSFFC_SETACTUATORSOFF: - Actuator = false; - break; - - default: - Result = FFERR_INVALIDPARAM; - break; - } - }); - //return Result; - return FF_OK; -} - -HRESULT Feedback360::InitializeTerminate(NumVersion APIversion, io_object_t hidDevice, boolean_t begin) -{ - if(begin) { - if (APIversion.majorRev != kFFPlugInAPIMajorRev) - { - // fprintf(stderr,"Feedback: Invalid version\n"); - return FFERR_INVALIDPARAM; - } - // From probe - if( (hidDevice==0) - || ((!IOObjectConformsTo(hidDevice,"Xbox360ControllerClass")) - && (!IOObjectConformsTo(hidDevice,"Wireless360Controller"))) ) - { - // fprintf(stderr,"Feedback: Invalid device\n"); - return FFERR_INVALIDPARAM; - } - if(!Device_Initialise(&this->device, hidDevice)) { - // fprintf(stderr,"Feedback: Failed to initialise\n"); - return FFERR_NOINTERFACE; - } - Queue = dispatch_queue_create("com.mice.driver.Feedback360", NULL); - Timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, Queue); - dispatch_source_set_timer(Timer, dispatch_walltime(NULL, 0), LoopGranularity*1000, 10); - dispatch_set_context(Timer, this); - dispatch_source_set_event_handler_f(Timer, EffectProc); - dispatch_resume(Timer); - } - else { - dispatch_sync(Queue, ^{ - dispatch_source_cancel(Timer); - SetForce(0, 0); - Device_Finalise(&this->device); - }); - - } - return FF_OK; -} - -HRESULT Feedback360::DestroyEffect(FFEffectDownloadID EffectHandle) -{ - __block HRESULT Result = FF_OK; - dispatch_sync(Queue, ^{ - for (Feedback360EffectIterator effectIterator = EffectList.begin() ; effectIterator != EffectList.end(); ++effectIterator) - { - if (effectIterator->Handle == EffectHandle) - { - EffectList.erase(effectIterator); - break; - } - } - }); - return Result; -} - -HRESULT Feedback360::Escape(FFEffectDownloadID downloadID, FFEFFESCAPE *escape) -{ - if (downloadID!=0) return FFERR_UNSUPPORTED; - if (escape->dwSize < sizeof(FFEFFESCAPE)) return FFERR_INVALIDPARAM; - escape->cbOutBuffer=0; - switch (escape->dwCommand) { - case 0x00: // Control motors - if(escape->cbInBuffer!=1) return FFERR_INVALIDPARAM; - dispatch_sync(Queue, ^{ - Manual=((unsigned char*)escape->lpvInBuffer)[0]!=0x00; - }); - break; - - case 0x01: // Set motors - if (escape->cbInBuffer!=2) return FFERR_INVALIDPARAM; - dispatch_sync(Queue, ^{ - if(Manual) { - unsigned char *data=(unsigned char *)escape->lpvInBuffer; - unsigned char buf[]={0x00,0x04,data[0],data[1]}; - Device_Send(&this->device,buf,sizeof(buf)); - } - }); - break; - - case 0x02: // Set LED - if (escape->cbInBuffer!=1) return FFERR_INVALIDPARAM; - { - dispatch_sync(Queue, ^{ - unsigned char *data=(unsigned char *)escape->lpvInBuffer; - unsigned char buf[]={0x01,0x03,data[0]}; - Device_Send(&this->device,buf,sizeof(buf)); - }); - } - break; - - case 0x03: // Power off - { - dispatch_sync(Queue, ^{ - unsigned char buf[] = {0x02, 0x02}; - Device_Send(&this->device, buf, sizeof(buf)); - }); - } - break; - - default: - fprintf(stderr, "Xbox360Controller FF plugin: Unknown escape (%i)\n", (int)escape->dwCommand); - return FFERR_UNSUPPORTED; - } - return FF_OK; -} - -void Feedback360::SetForce(LONG LeftLevel, LONG RightLevel) -{ - //fprintf(stderr, "LS: %d; RS: %d\n", (unsigned char)MIN( 255, LeftLevel * Gain / 10000 ), (unsigned char)MIN( 255, RightLevel * Gain / 10000 )); - unsigned char buf[] = {0x00, 0x04, (unsigned char)min(SCALE_MAX, LeftLevel * (LONG)Gain / 10000 ), (unsigned char)min(SCALE_MAX, RightLevel * (LONG)Gain / 10000 )}; - if (!Manual) Device_Send(&device, buf, sizeof(buf)); -} - -void Feedback360::EffectProc( void *params ) -{ - Feedback360 *cThis = (Feedback360 *)params; - - LONG LeftLevel = 0; - LONG RightLevel = 0; - LONG Gain = cThis->Gain; - LONG CalcResult = 0; - - if (cThis->Actuator == true) - { - for (Feedback360EffectIterator effectIterator = cThis->EffectList.begin(); effectIterator != cThis->EffectList.end(); ++effectIterator) - { - if(((CurrentTimeUsingMach() - cThis->LastTime)*1000*1000) >= effectIterator->DiEffect.dwSamplePeriod) { - CalcResult = effectIterator->Calc(&LeftLevel, &RightLevel); - } - } - } - - if ((cThis->PrvLeftLevel != LeftLevel || cThis->PrvRightLevel != RightLevel) && (CalcResult != -1)) - { - //fprintf(stderr, "PL: %d, PR: %d; L: %d, R: %d; \n", cThis->PrvLeftLevel, cThis->PrvRightLevel, LeftLevel, RightLevel); - cThis->SetForce((unsigned char)min(SCALE_MAX, LeftLevel * Gain / 10000),(unsigned char)min(SCALE_MAX, RightLevel * Gain / 10000 )); - - cThis->PrvLeftLevel = LeftLevel; - cThis->PrvRightLevel = RightLevel; - } -} - -HRESULT Feedback360::GetEffectStatus(FFEffectDownloadID EffectHandle, FFEffectStatusFlag *Status) -{ - dispatch_sync(Queue, ^{ - for (Feedback360EffectIterator effectIterator = EffectList.begin() ; effectIterator != EffectList.end(); ++effectIterator) - { - if (effectIterator->Handle == EffectHandle) - { - *Status = effectIterator->Status; - break; - } - } - }); - return FF_OK; -} - -HRESULT Feedback360::GetVersion(ForceFeedbackVersion *version) -{ - version->apiVersion.majorRev = kFFPlugInAPIMajorRev; - version->apiVersion.minorAndBugRev = kFFPlugInAPIMinorAndBugRev; - version->apiVersion.stage = kFFPlugInAPIStage; - version->apiVersion.nonRelRev = kFFPlugInAPINonRelRev; - version->plugInVersion.majorRev = FeedbackDriverVersionMajor; - version->plugInVersion.minorAndBugRev = FeedbackDriverVersionMinor; - version->plugInVersion.stage = FeedbackDriverVersionStage; - version->plugInVersion.nonRelRev = FeedbackDriverVersionNonRelRev; - return FF_OK; -} - -// static c->c++ glue functions -HRESULT Feedback360::sQueryInterface(void *self, REFIID iid, LPVOID *ppv) -{ - Feedback360 *obj = ((Xbox360InterfaceMap *)self)->obj; - return obj->QueryInterface(iid, ppv); -} - -ULONG Feedback360::sAddRef(void *self) -{ - Feedback360 *obj = ( (Xbox360InterfaceMap *) self)->obj; - return obj->AddRef(); -} - -ULONG Feedback360::sRelease(void *self) -{ - Feedback360 *obj = ( (Xbox360InterfaceMap *) self)->obj; - return obj->Release(); -} - -IOReturn Feedback360::sProbe(void *self, CFDictionaryRef propertyTable, io_service_t service, SInt32 *order) -{ - return getThis(self)->Probe(propertyTable, service, order); -} - -IOReturn Feedback360::sStart(void *self, CFDictionaryRef propertyTable, io_service_t service) -{ - return getThis(self)->Start(propertyTable, service); -} - -IOReturn Feedback360::sStop(void *self) -{ - return getThis(self)->Stop(); -} - -HRESULT Feedback360::sGetVersion(void * self, ForceFeedbackVersion * version) -{ - return Feedback360::getThis(self)->GetVersion(version); -} - -HRESULT Feedback360::sInitializeTerminate(void * self, NumVersion forceFeedbackAPIVersion, io_object_t hidDevice, boolean_t begin) -{ - return Feedback360::getThis(self)->InitializeTerminate(forceFeedbackAPIVersion, hidDevice, begin); -} - -HRESULT Feedback360::sDestroyEffect(void * self, FFEffectDownloadID downloadID) -{ - return Feedback360::getThis(self)->DestroyEffect(downloadID); -} - -HRESULT Feedback360::sDownloadEffect(void * self, CFUUIDRef effectType, FFEffectDownloadID *pDownloadID, FFEFFECT * pEffect, FFEffectParameterFlag flags) -{ - return Feedback360::getThis(self)->DownloadEffect(effectType, pDownloadID, pEffect, flags); -} - -HRESULT Feedback360::sEscape(void * self, FFEffectDownloadID downloadID, FFEFFESCAPE * pEscape) -{ - return Feedback360::getThis(self)->Escape(downloadID, pEscape); -} - -HRESULT Feedback360::sGetEffectStatus(void * self, FFEffectDownloadID downloadID, FFEffectStatusFlag * pStatusCode) -{ - return Feedback360::getThis(self)->GetEffectStatus(downloadID, pStatusCode); -} - -HRESULT Feedback360::sGetForceFeedbackState(void * self, ForceFeedbackDeviceState * pDeviceState) -{ - return Feedback360::getThis(self)->GetForceFeedbackState(pDeviceState); -} - -HRESULT Feedback360::sGetForceFeedbackCapabilities(void * self, FFCAPABILITIES * capabilities) -{ - return Feedback360::getThis(self)->GetForceFeedbackCapabilities(capabilities); -} - -HRESULT Feedback360::sSendForceFeedbackCommand(void * self, FFCommandFlag state) -{ - return Feedback360::getThis(self)->SendForceFeedbackCommand(state); -} - -HRESULT Feedback360::sSetProperty(void * self, FFProperty property, void * pValue) -{ - return Feedback360::getThis(self)->SetProperty(property, pValue); -} - -HRESULT Feedback360::sStartEffect(void * self, FFEffectDownloadID downloadID, FFEffectStartFlag mode, UInt32 iterations) -{ - return Feedback360::getThis(self)->StartEffect(downloadID, mode, iterations); -} - -HRESULT Feedback360::sStopEffect(void * self, UInt32 downloadID) -{ - return Feedback360::getThis(self)->StopEffect(downloadID); -} - -// External factory function -void* Control360Factory(CFAllocatorRef allocator, CFUUIDRef typeID) -{ - void* result = NULL; - if (CFEqual(typeID, kIOForceFeedbackLibTypeID)) - result = (void*)Feedback360::Alloc(); - return result; -} diff --git a/Feedback360/Feedback360.exp b/Feedback360/Feedback360.exp deleted file mode 100644 index 7684653b..00000000 --- a/Feedback360/Feedback360.exp +++ /dev/null @@ -1,7 +0,0 @@ -# Feedback360.exp -# 360 Driver -# -# Created by C.W. Betts on 3/3/14. -# Copyright (c) 2014 GitHub. All rights reserved. - -_Control360Factory diff --git a/Feedback360/Feedback360.h b/Feedback360/Feedback360.h deleted file mode 100644 index 3320c776..00000000 --- a/Feedback360/Feedback360.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - MICE Xbox 360 Controller driver for Mac OS X - Force Feedback module - Copyright (C) 2013 David Ryskalczyk - based on xi, Copyright (C) 2011 Masahiko Morii - - Feedback360.h - defines the structure used for the driver (COM object and emulator) - - This file is part of Xbox360Controller. - - Xbox360Controller is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Xbox360Controller is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Xbox360Controller; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef Feedback360_Feedback360_h -#define Feedback360_Feedback360_h - -#include -#include -#include - -#include "devlink.h" -#include "Feedback360Effect.h" - -#define FeedbackDriverVersionMajor 1 -#define FeedbackDriverVersionMinor 0 -#define FeedbackDriverVersionStage developStage -#define FeedbackDriverVersionNonRelRev 0 - -class Feedback360 : IUnknown -{ -public: - // constructor/destructor - Feedback360(void); - virtual ~Feedback360(void); - -private: - //disable copy constructor - Feedback360(Feedback360 &src); - void operator = (Feedback360 &src); - - UInt32 fRefCount; - - typedef struct _Xbox360InterfaceMap - { - IUnknownVTbl *pseudoVTable; - Feedback360 *obj; - } Xbox360InterfaceMap; - - // IOCFPlugin interfacing variables and functions -public: - static IOCFPlugInInterface** Alloc(void); - - // static functions called by the ForceFeedback API - static HRESULT sQueryInterface(void *self, REFIID iid, LPVOID *ppv); - static ULONG sAddRef(void *self); - static ULONG sRelease(void *self); - - static IOReturn sProbe ( void * self, CFDictionaryRef propertyTable, io_service_t service, SInt32 * order ); - static IOReturn sStart ( void * self, CFDictionaryRef propertyTable, io_service_t service ); - static IOReturn sStop ( void * self ); - - static HRESULT sGetVersion(void * interface, ForceFeedbackVersion * version); - static HRESULT sInitializeTerminate(void * interface, NumVersion forceFeedbackAPIVersion, io_object_t hidDevice, boolean_t begin ); - static HRESULT sDestroyEffect(void * interface, FFEffectDownloadID downloadID ); - static HRESULT sDownloadEffect( void * interface, CFUUIDRef effectType, FFEffectDownloadID *pDownloadID, FFEFFECT * pEffect, FFEffectParameterFlag flags ); - static HRESULT sEscape( void * interface, FFEffectDownloadID downloadID, FFEFFESCAPE * pEscape ); - static HRESULT sGetEffectStatus( void * interface, FFEffectDownloadID downloadID, FFEffectStatusFlag * pStatusCode ); - static HRESULT sGetForceFeedbackState( void * interface, ForceFeedbackDeviceState * pDeviceState ); - static HRESULT sGetForceFeedbackCapabilities( void * interface, FFCAPABILITIES *capabilities ); - static HRESULT sSendForceFeedbackCommand( void * interface, FFCommandFlag state ); - static HRESULT sSetProperty( void * interface, FFProperty property, void * pValue ); - static HRESULT sStartEffect( void * interface, FFEffectDownloadID downloadID, FFEffectStartFlag mode, UInt32 iterations ); - static HRESULT sStopEffect( void * interface, UInt32 downloadID ); - - virtual HRESULT QueryInterface(REFIID iid, LPVOID* ppv); - virtual ULONG AddRef(void); - virtual ULONG Release(void); - -private: - typedef std::vector Feedback360EffectVector; - typedef Feedback360EffectVector::iterator Feedback360EffectIterator; - // helper function - static inline Feedback360 *getThis (void *self) { return (Feedback360 *) ((Xbox360InterfaceMap *) self)->obj; } - - // interfacing - Xbox360InterfaceMap iIOCFPlugInInterface; - Xbox360InterfaceMap iIOForceFeedbackDeviceInterface; - DeviceLink device; - - // GCD queue and timer - dispatch_queue_t Queue; - dispatch_source_t Timer; - - // effects handling - Feedback360EffectVector EffectList; - UInt32 EffectIndex; - - DWORD Gain; - bool Actuator; - - LONG PrvLeftLevel, PrvRightLevel; - bool Stopped; - bool Paused; - bool Manual; - double LastTime; - double PausedTime; - CFUUIDRef FactoryID; - - void SetForce(LONG LeftLevel, LONG RightLevel); - - // event loop func - static void EffectProc( void *params ); - - // actual member functions ultimately called by the FF API (through the static functions) - virtual IOReturn Probe ( CFDictionaryRef propertyTable, io_service_t service, SInt32 * order ); - virtual IOReturn Start ( CFDictionaryRef propertyTable, io_service_t service ); - virtual IOReturn Stop ( void ); - - virtual HRESULT GetVersion(ForceFeedbackVersion * version); - virtual HRESULT InitializeTerminate(NumVersion forceFeedbackAPIVersion, io_object_t hidDevice, boolean_t begin); - virtual HRESULT DestroyEffect(FFEffectDownloadID downloadID); - virtual HRESULT DownloadEffect(CFUUIDRef effectType, FFEffectDownloadID *pDownloadID, FFEFFECT * pEffect, FFEffectParameterFlag flags); - virtual HRESULT Escape(FFEffectDownloadID downloadID, FFEFFESCAPE * pEscape); - virtual HRESULT GetEffectStatus(FFEffectDownloadID downloadID, FFEffectStatusFlag * pStatusCode); - virtual HRESULT GetForceFeedbackState(ForceFeedbackDeviceState * pDeviceState); - virtual HRESULT GetForceFeedbackCapabilities(FFCAPABILITIES *capabilities); - virtual HRESULT SendForceFeedbackCommand(FFCommandFlag state); - virtual HRESULT SetProperty(FFProperty property, void * pValue); - virtual HRESULT StartEffect(FFEffectDownloadID downloadID, FFEffectStartFlag mode, UInt32 iterations); - virtual HRESULT StopEffect(UInt32 downloadID); -}; - -// B8ED278F-EC8A-4E8E-B4CF-13E2A9D68E83 -#define kFeedback360Uuid CFUUIDGetConstantUUIDWithBytes(kCFAllocatorSystemDefault, \ -0xB8, 0xED, 0x27, 0x8F, 0xEC, 0x8A, 0x4E, 0x8E, \ -0xB4, 0xCF, 0x13, 0xE2, 0xA9, 0xD6, 0x8E, 0x83) - -// Factory function -extern "C" { - void* Control360Factory(CFAllocatorRef allocator, CFUUIDRef uuid); -} - -#endif diff --git a/Feedback360/Feedback360.xcodeproj/colin.mode1 b/Feedback360/Feedback360.xcodeproj/colin.mode1 new file mode 100644 index 00000000..10ad1c5f --- /dev/null +++ b/Feedback360/Feedback360.xcodeproj/colin.mode1 @@ -0,0 +1,1326 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXRunSessionModule + Name + Run Log + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1 + FavBarConfig + + PBXProjectModuleGUID + 3B2EF59109661AF5007BFB7B + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1 + MajorVersion + 31 + MinorVersion + 1 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-target-popup + active-buildstyle-popup + action + NSToolbarFlexibleSpaceItem + buildOrClean + build-and-runOrDebug + com.apple.ide.PBXToolbarStopButton + get-info + toggle-editor + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 08FB77AFFE84173DC02AAC07 + 089C167CFE841241C02AAC07 + 3B2EF5470965B8E3007BFB7B + 089C1671FE841209C02AAC07 + 3B2EF54B0965C358007BFB7B + 0AA1909FFE8422F4C02AAC07 + 19C28FB6FE9D52B211CA2CBB + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 338}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 356}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 308 400 690 397 0 0 1280 1002 + + Module + PBXSmartGroupTreeModule + Proportion + 203pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + MyNewFile14.java + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + MyNewFile14.java + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {482, 0}} + RubberWindowFrame + 308 400 690 397 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 5}, {482, 351}} + RubberWindowFrame + 308 400 690 397 0 0 1280 1002 + + Module + XCDetailModule + Proportion + 351pt + + + Proportion + 482pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + 3BCC40840BDA915400B1619B + 1CE0B1FE06471DED0097A5F4 + 3BCC40850BDA915400B1619B + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.short + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 1 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + 3B2EF5820965C4A5007BFB7B + /Users/colin/Projects2/OSX/360 Controller/Feedback360/Feedback360.xcodeproj + + WindowString + 308 400 690 397 0 0 1280 1002 + WindowTools + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {500, 218}} + RubberWindowFrame + 691 470 500 500 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + ContentConfiguration + + PBXBuildLogShowsTranscriptDefaultKey + {{0, 5}, {500, 231}} + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 223}, {500, 236}} + RubberWindowFrame + 691 470 500 500 0 0 1280 1002 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 459pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + 3B2EF5820965C4A5007BFB7B + 3BCC40880BDA916800B1619B + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.build + WindowString + 691 470 500 500 0 0 1280 1002 + WindowToolGUID + 3B2EF5820965C4A5007BFB7B + WindowToolIsVisible + + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debug + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.find + IsVertical + + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + IOHIDLib.h + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {781, 212}} + RubberWindowFrame + 31 477 781 470 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 212pt + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{0, 217}, {781, 212}} + RubberWindowFrame + 31 477 781 470 0 0 1280 1002 + + Module + PBXProjectFindModule + Proportion + 212pt + + + Proportion + 429pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + + TableOfContents + + 1C530D57069F1CE1000CFCEE + 3BCF4DD2097DA7030049C083 + 3BCF4DD3097DA7030049C083 + 1CDD528C0622207200134675 + 1CD0528E0623707200166675 + + WindowString + 31 477 781 470 0 0 1280 1002 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + + + + Identifier + MENUSEPARATOR + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {440, 358}} + RubberWindowFrame + 650 41 440 400 0 0 1280 1002 + + Module + PBXDebugCLIModule + Proportion + 358pt + + + Proportion + 358pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAAD065D492600B07095 + 1C78EAAE065D492600B07095 + 1C78EAAC065D492600B07095 + + WindowString + 650 41 440 400 0 0 1280 1002 + + + Identifier + windowTool.run + Layout + + + Dock + + + ContentConfiguration + + LauncherConfigVersion + 3 + PBXProjectModuleGUID + 1CD0528B0623707200166675 + PBXProjectModuleLabel + Run + Runner + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {493, 167}} + {{0, 176}, {493, 267}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {405, 443}} + {{414, 0}, {514, 443}} + + + + + GeometryConfiguration + + Frame + {{0, 0}, {460, 159}} + RubberWindowFrame + 316 696 459 200 0 0 1280 1002 + + Module + PBXRunSessionModule + Proportion + 159pt + + + Proportion + 159pt + + + Name + Run Log + ServiceClasses + + PBXRunSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C0AD2B3069F1EA900FABCE6 + 1C0AD2B4069F1EA900FABCE6 + 1CD0528B0623707200166675 + 1C0AD2B5069F1EA900FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.run + WindowString + 316 696 459 200 0 0 1280 1002 + WindowToolGUID + 1C0AD2B3069F1EA900FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.09500122070312 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + + Layout + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 2 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpoints + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + + ToolbarConfiguration + xcode.toolbar.config.debugAnimator + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + + diff --git a/Feedback360/Feedback360.xcodeproj/project.pbxproj b/Feedback360/Feedback360.xcodeproj/project.pbxproj new file mode 100644 index 00000000..c0138293 --- /dev/null +++ b/Feedback360/Feedback360.xcodeproj/project.pbxproj @@ -0,0 +1,285 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 3B2EF54C0965C358007BFB7B /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B2EF54B0965C358007BFB7B /* ForceFeedback.framework */; }; + 3BBA037D09697D80008A46C9 /* emulator.c in Sources */ = {isa = PBXBuildFile; fileRef = 3BBA037C09697D80008A46C9 /* emulator.c */; }; + 3BBA03D0096A22F5008A46C9 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BBA03CF096A22F5008A46C9 /* IOKit.framework */; }; + 3BBA03E3096A29B5008A46C9 /* devlink.c in Sources */ = {isa = PBXBuildFile; fileRef = 3BBA03E2096A29B5008A46C9 /* devlink.c */; }; + 8D576312048677EA00EA77CD /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 08FB77B6FE84183AC02AAC07 /* main.c */; settings = {ATTRIBUTES = (); }; }; + 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; }; + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 08FB77B6FE84183AC02AAC07 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; + 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; + 3B2EF5440965B3C7007BFB7B /* main.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = main.h; sourceTree = ""; }; + 3B2EF54B0965C358007BFB7B /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = /System/Library/Frameworks/ForceFeedback.framework; sourceTree = ""; }; + 3BBA037B09697D80008A46C9 /* emulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = emulator.h; sourceTree = ""; }; + 3BBA037C09697D80008A46C9 /* emulator.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = emulator.c; sourceTree = ""; }; + 3BBA03CF096A22F5008A46C9 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; + 3BBA03E1096A29B5008A46C9 /* devlink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = devlink.h; sourceTree = ""; }; + 3BBA03E2096A29B5008A46C9 /* devlink.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = devlink.c; sourceTree = ""; }; + 8D576316048677EA00EA77CD /* Feedback360.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Feedback360.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D576313048677EA00EA77CD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */, + 3B2EF54C0965C358007BFB7B /* ForceFeedback.framework in Frameworks */, + 3BBA03D0096A22F5008A46C9 /* IOKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* Feedback360 */ = { + isa = PBXGroup; + children = ( + 08FB77AFFE84173DC02AAC07 /* Source */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB6FE9D52B211CA2CBB /* Products */, + ); + name = Feedback360; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 3BBA03CF096A22F5008A46C9 /* IOKit.framework */, + 3B2EF54B0965C358007BFB7B /* ForceFeedback.framework */, + 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 3B2EF5470965B8E3007BFB7B /* New Group */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77AFFE84173DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 3B2EF5440965B3C7007BFB7B /* main.h */, + 08FB77B6FE84183AC02AAC07 /* main.c */, + 3BBA037B09697D80008A46C9 /* emulator.h */, + 3BBA037C09697D80008A46C9 /* emulator.c */, + 3BBA03E1096A29B5008A46C9 /* devlink.h */, + 3BBA03E2096A29B5008A46C9 /* devlink.c */, + ); + name = Source; + sourceTree = ""; + }; + 19C28FB6FE9D52B211CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D576316048677EA00EA77CD /* Feedback360.bundle */, + ); + name = Products; + sourceTree = ""; + }; + 3B2EF5470965B8E3007BFB7B /* New Group */ = { + isa = PBXGroup; + children = ( + 8D576317048677EA00EA77CD /* Info.plist */, + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, + ); + name = "New Group"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D57630D048677EA00EA77CD /* Feedback360 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3BBDC69309793BF60023AAD8 /* Build configuration list for PBXNativeTarget "Feedback360" */; + buildPhases = ( + 8D57630F048677EA00EA77CD /* Resources */, + 8D576311048677EA00EA77CD /* Sources */, + 8D576313048677EA00EA77CD /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Feedback360; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = Feedback360; + productReference = 8D576316048677EA00EA77CD /* Feedback360.bundle */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 3BBDC69709793BF60023AAD8 /* Build configuration list for PBXProject "Feedback360" */; + compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 089C166AFE841209C02AAC07 /* Feedback360 */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D57630D048677EA00EA77CD /* Feedback360 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D57630F048677EA00EA77CD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D576311048677EA00EA77CD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D576312048677EA00EA77CD /* main.c in Sources */, + 3BBA037D09697D80008A46C9 /* emulator.c in Sources */, + 3BBA03E3096A29B5008A46C9 /* devlink.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3BBDC69409793BF60023AAD8 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + PRODUCT_NAME = Feedback360; + WRAPPER_EXTENSION = bundle; + ZERO_LINK = YES; + }; + name = Development; + }; + 3BBDC69509793BF60023AAD8 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + PRODUCT_NAME = Feedback360; + WRAPPER_EXTENSION = bundle; + ZERO_LINK = NO; + }; + name = Deployment; + }; + 3BBDC69609793BF60023AAD8 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + PRODUCT_NAME = Feedback360; + WRAPPER_EXTENSION = bundle; + }; + name = Default; + }; + 3BBDC69809793BF60023AAD8 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Development; + }; + 3BBDC69909793BF60023AAD8 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Deployment; + }; + 3BBDC69A09793BF60023AAD8 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Default; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3BBDC69309793BF60023AAD8 /* Build configuration list for PBXNativeTarget "Feedback360" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3BBDC69409793BF60023AAD8 /* Development */, + 3BBDC69509793BF60023AAD8 /* Deployment */, + 3BBDC69609793BF60023AAD8 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + 3BBDC69709793BF60023AAD8 /* Build configuration list for PBXProject "Feedback360" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3BBDC69809793BF60023AAD8 /* Development */, + 3BBDC69909793BF60023AAD8 /* Deployment */, + 3BBDC69A09793BF60023AAD8 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/Feedback360/Feedback360Effect.cpp b/Feedback360/Feedback360Effect.cpp deleted file mode 100644 index a10fe538..00000000 --- a/Feedback360/Feedback360Effect.cpp +++ /dev/null @@ -1,277 +0,0 @@ -/* - MICE Xbox 360 Controller driver for Mac OS X - Force Feedback module - Copyright (C) 2013 David Ryskalczyk - Based on xi, Copyright (C) 2011 Masahiko Morii - - Feedback360Effect.cpp - Main code for the FF plugin - - This file is part of Xbox360Controller. - - Xbox360Controller is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Xbox360Controller is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Xbox360Controller; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#include "Feedback360Effect.h" -using std::max; -using std::min; - -//---------------------------------------------------------------------------------------------- -// CEffect -//---------------------------------------------------------------------------------------------- -Feedback360Effect::Feedback360Effect() : Type(NULL), Status(0), PlayCount(0), -StartTime(0), Index(0), LastTime(0), Handle(0), DiEffect({0}), DiEnvelope({0}), -DiCustomForce({0}), DiConstantForce({0}), DiPeriodic({0}), DiRampforce({0}) -{ - -} - -Feedback360Effect::Feedback360Effect(FFEffectDownloadID theHand) : Feedback360Effect() -{ - Handle = theHand; -} - -Feedback360Effect::Feedback360Effect(const Feedback360Effect &src) : Type(src.Type), -Handle(src.Handle), Status(src.Status), PlayCount(src.PlayCount), -StartTime(src.StartTime), Index(src.Index), LastTime(src.LastTime) -{ - memcpy(&DiEffect, &src.DiEffect, sizeof(FFEFFECT)); - memcpy(&DiEnvelope, &src.DiEnvelope, sizeof(FFENVELOPE)); - memcpy(&DiCustomForce, &src.DiCustomForce, sizeof(FFCUSTOMFORCE)); - memcpy(&DiConstantForce, &src.DiConstantForce, sizeof(FFCONSTANTFORCE)); - memcpy(&DiPeriodic, &src.DiPeriodic, sizeof(FFPERIODIC)); - memcpy(&DiRampforce, &src.DiRampforce, sizeof(FFRAMPFORCE)); -} - -//---------------------------------------------------------------------------------------------- -// Calc -//---------------------------------------------------------------------------------------------- -LONG Feedback360Effect::Calc(LONG *LeftLevel, LONG *RightLevel) -{ - CFTimeInterval Duration = 0; - if(DiEffect.dwDuration != FF_INFINITE) { - Duration = max(1., DiEffect.dwDuration / 1000.) / 1000.; - } else { - Duration = DBL_MAX; - } - double BeginTime = StartTime + ( DiEffect.dwStartDelay / 1000. / 1000.); - double EndTime = DBL_MAX; - if (PlayCount != -1) - { - EndTime = BeginTime + Duration * PlayCount; - } - double CurrentTime = CurrentTimeUsingMach(); - - if (Status == FFEGES_PLAYING && BeginTime <= CurrentTime && CurrentTime <= EndTime) - { - // Used for force calculation - LONG NormalLevel; - LONG WorkLeftLevel; - LONG WorkRightLevel; - - // Used for envelope calculation - LONG NormalRate; - LONG AttackLevel; - LONG FadeLevel; - - CalcEnvelope((ULONG)(Duration*1000) - ,(ULONG)(fmod(CurrentTime - BeginTime, Duration)*1000) - ,&NormalRate - ,&AttackLevel - ,&FadeLevel); - - // CustomForce allows setting each channel separately - if(CFEqual(Type, kFFEffectType_CustomForce_ID)) { - if((CurrentTimeUsingMach() - LastTime)*1000*1000 < DiCustomForce.dwSamplePeriod) { - return -1; - } - else { - WorkLeftLevel = ((DiCustomForce.rglForceData[2*Index] * NormalRate + AttackLevel + FadeLevel) / 100) * DiEffect.dwGain / 10000; - WorkRightLevel = ((DiCustomForce.rglForceData[2*Index + 1] * NormalRate + AttackLevel + FadeLevel) / 100) * DiEffect.dwGain / 10000; - //fprintf(stderr, "L:%d; R:%d\n", WorkLeftLevel, WorkRightLevel); - Index = (Index + 1) % (DiCustomForce.cSamples/2); - LastTime = CurrentTimeUsingMach(); - } - } - // Regular commands treat controller as a single output (both channels are together as one) - else { - CalcForce( - (ULONG)(Duration*1000) - ,(ULONG)(fmod(CurrentTime - BeginTime, Duration)*1000) - ,NormalRate - ,AttackLevel - ,FadeLevel - ,&NormalLevel ); - //fprintf(stderr, "DeltaT %f\n", CurrentTime - BeginTime); - //fprintf(stderr, "Duration %f; NormalRate: %d; AttackLevel: %d; FadeLevel: %d\n", Duration, NormalRate, AttackLevel, FadeLevel); - - WorkLeftLevel = (NormalLevel > 0) ? NormalLevel : -NormalLevel; - WorkRightLevel = (NormalLevel > 0) ? NormalLevel : -NormalLevel; - } - WorkLeftLevel = min( SCALE_MAX, WorkLeftLevel * SCALE_MAX / 10000 ); - WorkRightLevel = min( SCALE_MAX, WorkRightLevel * SCALE_MAX / 10000 ); - - *LeftLevel = *LeftLevel + WorkLeftLevel; - *RightLevel = *RightLevel + WorkRightLevel; - } - return 0; -} - -//---------------------------------------------------------------------------------------------- -// CalcEnvelope -//---------------------------------------------------------------------------------------------- -void Feedback360Effect::CalcEnvelope(ULONG Duration, ULONG CurrentPos, LONG *NormalRate, LONG *AttackLevel, LONG *FadeLevel) -{ - if( ( DiEffect.dwFlags & FFEP_ENVELOPE ) && DiEffect.lpEnvelope != NULL ) - { - // Calculate attack factor - LONG AttackRate = 0; - ULONG AttackTime = max( (DWORD)1, DiEnvelope.dwAttackTime / 1000 ); - if (CurrentPos < AttackTime) - { - AttackRate = ( AttackTime - CurrentPos ) * 100 / AttackTime; - } - - // Calculate fade factor - LONG FadeRate = 0; - ULONG FadeTime = max( (DWORD)1, DiEnvelope.dwFadeTime / 1000 ); - ULONG FadePos = Duration - FadeTime; - if (FadePos < CurrentPos) - { - FadeRate = ( CurrentPos - FadePos ) * 100 / FadeTime; - } - - *NormalRate = 100 - AttackRate - FadeRate; - *AttackLevel = DiEnvelope.dwAttackLevel * AttackRate; - *FadeLevel = DiEnvelope.dwFadeLevel * FadeRate; - } else { - *NormalRate = 100; - *AttackLevel = 0; - *FadeLevel = 0; - } -} - -void Feedback360Effect::CalcForce(ULONG Duration, ULONG CurrentPos, LONG NormalRate, LONG AttackLevel, LONG FadeLevel, LONG * NormalLevel) -{ - LONG Magnitude = 0; - LONG Period; - LONG R; - LONG Rate; - - if (CFEqual(Type, kFFEffectType_ConstantForce_ID)) { - Magnitude = DiConstantForce.lMagnitude; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - } - else if (CFEqual(Type, kFFEffectType_Square_ID)) { - Period = max( (DWORD)1, ( DiPeriodic.dwPeriod / 1000 ) ); - R = ( CurrentPos%Period) * 360 / Period; - R = ( R + ( DiPeriodic.dwPhase / 100 ) ) % 360; - - Magnitude = DiPeriodic.dwMagnitude; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - - if (180 <= R) - { - Magnitude = Magnitude * -1; - } - - Magnitude = Magnitude + DiPeriodic.lOffset; - } - else if (CFEqual(Type, kFFEffectType_Sine_ID)) { - Period = max( (DWORD)1, ( DiPeriodic.dwPeriod / 1000 ) ); - R = (CurrentPos%Period) * 360 / Period; - R = ( R + ( DiPeriodic.dwPhase / 100 ) ) % 360; - - Magnitude = DiPeriodic.dwMagnitude; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - - Magnitude = ( int)( Magnitude * sin( R * M_PI / 180.0 ) ); - - Magnitude = Magnitude + DiPeriodic.lOffset; - } - else if (CFEqual(Type, kFFEffectType_Triangle_ID)) { - Period = max( (DWORD)1, ( DiPeriodic.dwPeriod / 1000 ) ); - R = (CurrentPos%Period) * 360 / Period; - R = ( R + ( DiPeriodic.dwPhase / 100 ) ) % 360; - - Magnitude = DiPeriodic.dwMagnitude; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - - if (0 <= R && R < 90) - { - Magnitude = -Magnitude * ( 90 - R ) / 90; - } - if (90 <= R && R < 180) - { - Magnitude = Magnitude * ( R - 90 ) / 90; - } - if (180 <= R && R < 270) - { - Magnitude = Magnitude * ( 90 - ( R - 180 ) ) / 90; - } - if (270 <= R && R < 360) - { - Magnitude = -Magnitude * ( R - 270 ) / 90; - } - - Magnitude = Magnitude + DiPeriodic.lOffset; - } - else if(CFEqual(Type, kFFEffectType_SawtoothUp_ID)) { - Period = max( (DWORD)1, ( DiPeriodic.dwPeriod / 1000 ) ); - R = (CurrentPos%Period) * 360 / Period; - R = ( R + ( DiPeriodic.dwPhase / 100 ) ) % 360; - - Magnitude = DiPeriodic.dwMagnitude; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - - if (0 <= R && R < 180) - { - Magnitude = -Magnitude * ( 180 - R ) / 180; - } - if (180 <= R && R < 360) - { - Magnitude = Magnitude * ( R - 180 ) / 180; - } - - Magnitude = Magnitude + DiPeriodic.lOffset; - } - else if (CFEqual(Type, kFFEffectType_SawtoothDown_ID)) { - Period = max( (DWORD)1, ( DiPeriodic.dwPeriod / 1000 ) ); - R = (CurrentPos%Period) * 360 / Period; - R = ( R + ( DiPeriodic.dwPhase / 100 ) ) % 360; - - Magnitude = DiPeriodic.dwMagnitude; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - if( 0 <= R && R < 180 ) - { - Magnitude = Magnitude * ( 180 - R ) / 180; - } - if( 180 <= R && R < 360 ) - { - Magnitude = -Magnitude * ( R - 180 ) / 180; - } - - Magnitude = Magnitude + DiPeriodic.lOffset; - } - else if (CFEqual(Type, kFFEffectType_RampForce_ID)) { - Rate = ( Duration - CurrentPos ) * 100 - / Duration;//MAX( 1, DiEffect.dwDuration / 1000 ); - - Magnitude = ( DiRampforce.lStart * Rate - + DiRampforce.lEnd * ( 100 - Rate ) ) / 100; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - } - - *NormalLevel = Magnitude * (LONG)DiEffect.dwGain / 10000; -} diff --git a/Feedback360/Feedback360Effect.h b/Feedback360/Feedback360Effect.h deleted file mode 100644 index 254965e8..00000000 --- a/Feedback360/Feedback360Effect.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - MICE Xbox 360 Controller driver for Mac OS X - Force Feedback module - Copyright (C) 2013 David Ryskalczyk - based on xi, Copyright (C) 2011 Masahiko Morii - - Feedback360Effect.cpp - Main code for the FF plugin - - This file is part of Xbox360Controller. - - Xbox360Controller is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Xbox360Controller is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Xbox360Controller; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -// Force Feedback Driver for XInput - -#ifndef Feedback360_Feedback360Effect_h -#define Feedback360_Feedback360Effect_h - -#include -#include -#include -#include -#include - -//---------------------------------------------------------------------------------------------- -// Effects -//---------------------------------------------------------------------------------------------- - -#define CONSTANT_FORCE 0x00 -#define RAMP_FORCE 0x01 -#define SQUARE 0x02 -#define SINE 0x03 -#define TRIANGLE 0x04 -#define SAWTOOTH_UP 0x05 -#define SAWTOOTH_DOWN 0x06 -#define SPRING 0x07 -#define DAMPER 0x08 -#define INERTIA 0x09 -#define FRICTION 0x0A -#define CUSTOM_FORCE 0x0B - -#define SCALE_MAX (LONG)255 - -double CurrentTimeUsingMach(); - -class Feedback360Effect -{ -public: - Feedback360Effect(FFEffectDownloadID theHand); - Feedback360Effect(const Feedback360Effect &src); - - LONG Calc(LONG *LeftLevel, LONG *RightLevel); - - CFUUIDRef Type; - FFEffectDownloadID Handle; - - FFEFFECT DiEffect; - FFENVELOPE DiEnvelope; - FFCONSTANTFORCE DiConstantForce; - FFCUSTOMFORCE DiCustomForce; - FFPERIODIC DiPeriodic; - FFRAMPFORCE DiRampforce; - - DWORD Status; - DWORD PlayCount; - double StartTime; - - double LastTime; - DWORD Index; - -private: - Feedback360Effect(); - void CalcEnvelope(ULONG Duration, ULONG CurrentPos, LONG *NormalRate, LONG *AttackLevel, LONG *FadeLevel); - void CalcForce(ULONG Duration, ULONG CurrentPos, LONG NormalRate, LONG AttackLevel, LONG FadeLevel, LONG * NormalLevel); -}; - -#endif diff --git a/Feedback360/Info.plist b/Feedback360/Info.plist index 02d7ba5f..0d8f5c19 100644 --- a/Feedback360/Info.plist +++ b/Feedback360/Info.plist @@ -6,22 +6,18 @@ English CFBundleExecutable ${EXECUTABLE_NAME} + CFBundleIconFile + CFBundleIdentifier com.mice.Xbox360ControllerForceFeedback CFBundleInfoDictionaryVersion 6.0 - CFBundleName - ${PRODUCT_NAME} CFBundlePackageType BNDL - CFBundleShortVersionString - $(CURRENT_PROJECT_VERSION) CFBundleSignature ???? CFBundleVersion - ${CURRENT_PROJECT_VERSION} - LSMinimumSystemVersion - ${MIN_MACOS_VERSION} + 1.0 CFPlugInDynamicRegistration NO CFPlugInFactories @@ -36,6 +32,8 @@ B8ED278F-EC8A-4E8E-B4CF-13E2A9D68E83 + CFBundleName + ${PRODUCT_NAME} NSHumanReadableCopyright Copyright © 2013 MICE Software. All rights reserved. diff --git a/Feedback360/devlink.cpp b/Feedback360/devlink.c similarity index 59% rename from Feedback360/devlink.cpp rename to Feedback360/devlink.c index 85869ed5..d6a1e9d3 100644 --- a/Feedback360/devlink.cpp +++ b/Feedback360/devlink.c @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + devlink.c - code to speak to the driver itself - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -20,23 +20,25 @@ along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -#include +#include #include "devlink.h" // Initialise the link bool Device_Initialise(DeviceLink *link,io_object_t device) { - IOCFPlugInInterface **plugInInterface = NULL; - SInt32 score = 0; - IOReturn ret = IOCreatePlugInInterfaceForService(device, kIOHIDDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &plugInInterface, &score); - - if (ret!=kIOReturnSuccess) return false; - ret=(*plugInInterface)->QueryInterface(plugInInterface, CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID121), (LPVOID*)(&link->interface)); + IOCFPlugInInterface **plugInInterface; + SInt32 score; + IOReturn ret; + + plugInInterface=NULL; + score=0; + ret=IOCreatePlugInInterfaceForService(device,kIOHIDDeviceUserClientTypeID,kIOCFPlugInInterfaceID,&plugInInterface,&score); + if(ret!=kIOReturnSuccess) return FALSE; + ret=(*plugInInterface)->QueryInterface(plugInInterface,CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID121),(LPVOID)&link->interface); (*plugInInterface)->Release(plugInInterface); - if (ret!=kIOReturnSuccess) return false; - (*link->interface)->open(link->interface, 0); - return true; + if(ret!=kIOReturnSuccess) return FALSE; + (*link->interface)->open(link->interface,0); + return TRUE; } // Finish the link @@ -44,21 +46,17 @@ void Device_Finalise(DeviceLink *link) { (*link->interface)->close(link->interface); (*link->interface)->Release(link->interface); - link->interface = NULL; + link->interface=NULL; } // Send a report via the link bool Device_Send(DeviceLink *link,void *data,int length) { - if(link->interface==NULL) { - fprintf(stderr, "Attempting to send to a closed link!\n"); - return false; - } + if(link->interface==NULL) return FALSE; else { - //fprintf(stderr, "Attempting to send: %d %d %d %d\n",((unsigned char*)data)[0], ((unsigned char*)data)[1], ((unsigned char*)data)[2], ((unsigned char*)data)[3]); IOReturn res=(*link->interface)->setReport(link->interface,kIOHIDReportTypeOutput,0,data,length,10000,NULL,NULL,NULL); - if (res != kIOReturnSuccess) - fprintf(stderr, "Device_Send failed: 0x%.8x\n", res); - return res == kIOReturnSuccess; + if (res != kIOReturnSuccess) + fprintf(stderr, "Device_Send failed: 0x%.8x\n", res); + return res==kIOReturnSuccess; } } diff --git a/Feedback360/devlink.h b/Feedback360/devlink.h index ef4f06e6..fadaf901 100644 --- a/Feedback360/devlink.h +++ b/Feedback360/devlink.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + devlink.h - Interface to the device link - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -20,10 +20,7 @@ along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef Feedback360_devlink_h -#define Feedback360_devlink_h - -#include +#include #include typedef struct { @@ -34,5 +31,3 @@ bool Device_Initialise(DeviceLink *link,io_object_t device); void Device_Finalise(DeviceLink *link); bool Device_Send(DeviceLink *link,void *data,int length); - -#endif diff --git a/Feedback360/emulator.c b/Feedback360/emulator.c new file mode 100644 index 00000000..5d676754 --- /dev/null +++ b/Feedback360/emulator.c @@ -0,0 +1,343 @@ +/* + MICE Xbox 360 Controller driver for Mac OS X + Copyright (C) 2006-2013 Colin Munro + + emulator.c - simulate a force feedback device + + This file is part of Xbox360Controller. + + Xbox360Controller is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Xbox360Controller is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Foobar; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include "emulator.h" + +/* + * This code could do with being improved. For example, the two motors could + * allow for a "left" and "right" rumble in a car game. + * + * For debugging, you may use fprintf(stderr,...). The output will appear on + * the console of whatever game is using the Apple Force Feedback Framework. + */ + +#define LoopGranularity 500 // Microseconds +#define LoopTimerDelay (LoopGranularity*0.000001f) // In seconds + +static void Emulate_Timer(CFRunLoopTimerRef timer,void *context); + +// Initialise the emulation of a force feedback device +void Emulate_Initialise(ForceEmulator *emulator,int effectCount,void (*SetForce)(void*,unsigned char,unsigned char),void *context) +{ + int i; + CFRunLoopTimerContext callbackData; + + // Set callback + emulator->SetForce=SetForce; + emulator->context=context; + // Create effects memory + emulator->effects=(ForceEffect*)malloc(sizeof(ForceEffect)*effectCount); + emulator->effectCount=effectCount; + // Defaults + emulator->enable=TRUE; + emulator->pause=FALSE; + emulator->gain=4; + emulator->maxGain=4; + emulator->activeEffect=-1; + // Reset + for(i=0;ieffects[i].inUse=FALSE; + // Launch timer + callbackData.version=0; + callbackData.info=emulator; + callbackData.retain=NULL; + callbackData.release=NULL; + callbackData.copyDescription=NULL; + emulator->timer=CFRunLoopTimerCreate(NULL,LoopTimerDelay,LoopTimerDelay,0,0,Emulate_Timer,&callbackData); + CFRunLoopAddTimer(CFRunLoopGetCurrent(),emulator->timer,kCFRunLoopCommonModes); +} + +// Close down the force feedback stuff +void Emulate_Finalise(ForceEmulator *emulator) +{ + CFRunLoopTimerInvalidate(emulator->timer); + CFRelease(emulator->timer); + free(emulator->effects); + emulator->SetForce(emulator->context,0,0); +} + +// Call the callback, if output is enabled +void Emulate_Callback(ForceEmulator *emulator,unsigned char large,unsigned char small) +{ + emulator->oldLarge=large; + emulator->oldSmall=small; + if(emulator->enable) emulator->SetForce(emulator->context,large,small); +} + +// Create an effect - for the FF API +int Emulate_CreateEffect(ForceEmulator *emulator,const ForceParams *params) +{ + int i; + + for(i=0;ieffectCount;i++) { + if(!emulator->effects[i].inUse) { + emulator->effects[i].inUse=TRUE; + if(!Emulate_ChangeEffect(emulator,i+1,params)) { + emulator->effects[i].inUse=FALSE; + return 0; + } + return i+1; + } + } + return 0; +} + +// Change an effect - for the FF API +bool Emulate_ChangeEffect(ForceEmulator *emulator,int index,const ForceParams *params) +{ + ForceEffect *effect=emulator->effects+index-1; + effect->gain=params->gain; + effect->maxLevel=params->maxLevel; + effect->startCount=params->startDelay/LoopGranularity; + effect->attackLevel=params->attackLevel; + effect->attackCount=params->attackTime/LoopGranularity; + effect->sustainLevel=params->sustainLevel; + effect->sustainCount=params->sustainTime/LoopGranularity; + effect->fadeLevel=params->fadeLevel; + effect->fadeCount=params->fadeTime/LoopGranularity; + return TRUE; +} + +// Destroy an effect - for the FF API +void Emulate_DestroyEffect(ForceEmulator *emulator,int index) +{ + emulator->effects[index-1].inUse=FALSE; + if(emulator->activeEffect==(index-1)) emulator->activeEffect=-1; +} + +// Returns true if the effect index is in use +bool Emulate_IsValidEffect(ForceEmulator *emulator,int index) +{ + if((index<1)||(index>emulator->effectCount)) return FALSE; + return emulator->effects[index-1].inUse; +} + +// Returns true if the effect index is playing +bool Emulate_IsPlaying(ForceEmulator *emulator,int index) +{ + return emulator->activeEffect==(index-1); +} + +// Returns true if the device has no effects +bool Emulate_IsEmpty(ForceEmulator *emulator) +{ + int i; + + for(i=0;ieffectCount;i++) + if(emulator->effects[i].inUse) + return FALSE; + return TRUE; +} + +// Resets the device +void Emulate_Reset(ForceEmulator *emulator) +{ + int i; + + for(i=0;ieffectCount;i++) emulator->effects[i].inUse=FALSE; + Emulate_Callback(emulator,0,0); +} + +// Starts an effect for the specified number of loops +void Emulate_Start(ForceEmulator *emulator,int index,int iterations) +{ + ForceEffect *effect; + +// fprintf(stderr,"Emulate_Start(%p,%i,%i)\n",emulator,index,iterations); + effect=emulator->effects+index-1; + effect->countStart=effect->startCount; + effect->countAttack=effect->attackCount; + effect->countSustain=effect->sustainCount; + effect->countFade=effect->fadeCount; + effect->countLoop=iterations; + emulator->activeEffect=index-1; +} + +// Stops an effect +void Emulate_Stop(ForceEmulator *emulator,int index) +{ +// fprintf(stderr,"Emulate_Stop(%p,%i)\n",emulator,index); + if((index-1)==emulator->activeEffect) { + emulator->activeEffect=-1; + Emulate_Callback(emulator,0,0); + } +} + +// Returns true if no effects are running +bool Emulate_IsStopped(ForceEmulator *emulator) +{ + return emulator->activeEffect==-1; +} + +// Returns the number of used effects +UInt32 Emulate_Effects_Used(ForceEmulator *emulator) +{ + int i,j; + + for(i=j=0;ieffectCount;i++) + if(emulator->effects[i].inUse) + j++; + return j; +} + +// Returns the number of possible effects +UInt32 Emulate_Effects_Total(ForceEmulator *emulator) +{ + return emulator->effectCount; +} + +// Enables or disables the force feedback +void Emulate_SetEnable(ForceEmulator *emulator,bool enable) +{ + bool old=emulator->enable; + // Stop motors in case they were running + if(old&&(!enable)) Emulate_Callback(emulator,0,0); + emulator->enable=enable; + // Resume motors at last computed value, as we'll have + // been computing new values for them even if disabled + if((!old)&&enable) Emulate_Callback(emulator,emulator->oldLarge,emulator->oldSmall); +} + +// Returns true if enabled +bool Emulate_IsEnabled(ForceEmulator *emulator) +{ + return emulator->enable; +} + +// Pauses the device +void Emulate_SetPaused(ForceEmulator *emulator,bool enable) +{ + bool old=emulator->pause; + // Stop motors in case they were running + if((!old)&&enable) Emulate_Callback(emulator,0,0); + emulator->pause=enable; + // Resume motors at last computed value, as we'll be + // resuming feedback effects where we left off. + if(old&&(!enable)) Emulate_Callback(emulator,emulator->oldLarge,emulator->oldSmall); +} + +// Returns true if paused +bool Emulate_IsPaused(ForceEmulator *emulator) +{ + return emulator->pause; +} + +// Sets the gain for the device +void Emulate_SetGain(ForceEmulator *emulator,int gain,int gainMax) +{ + if((emulator->gain<=0)||(emulator->maxGain<=0)) return; + emulator->gain=gain; + emulator->maxGain=gainMax; + while(emulator->maxGain<4) { + emulator->gain*=2; + emulator->maxGain*=2; + } +} + +// Utility - scales a value +static inline int Emulate_Scale(int from,int to,int max,int val) +{ + int upper=max-1; + return from+(((to-from)*(upper-val))/upper); +} + +// Utility - computes the values for the large and small motors from the effect +static void Emulate_Force(ForceEmulator *emulator,int force,int maxGain) +{ + int adjusted; + int bling; + int small,large; + +// fprintf(stderr,"Emulate_Force(%p,%i)\n",emulator,force); + adjusted=(force*emulator->gain)/emulator->maxGain; + bling=maxGain/4; + if(adjustedactiveEffect; + if((i==-1)||emulator->pause) return; + effect=emulator->effects+emulator->activeEffect; + // Process each counter on the effect, to see what's happening + if(effect->countStart>0) { + // In the start (pre-effect) stage + level=effect->attackLevel; + effect->countStart--; + } else { + if(effect->countAttack>0) { + // In the attack stage + level=Emulate_Scale(effect->attackLevel,effect->sustainLevel,effect->attackCount,effect->countAttack); + effect->countAttack--; + } else { + if(effect->countSustain>0) { + // In the sustain stage + level=effect->sustainLevel; + effect->countSustain--; + } else { + if(effect->countFade>0) { + // In the fade stage + level=Emulate_Scale(effect->sustainLevel,effect->fadeLevel,effect->fadeCount,effect->countFade); + effect->countFade--; + } else { + // Work out if we need to do it again + effect->countLoop--; + if(effect->countLoop>0) { + // Prepare for next loop + level=effect->attackLevel; + effect->countStart=effect->startCount; + effect->countAttack=effect->attackCount; + effect->countSustain=effect->sustainCount; + effect->countFade=effect->fadeCount; + } else { + // Effect finished + level=0; + emulator->activeEffect=-1; + } + } + } + } + } + // Actually calculate what to do for the effect + Emulate_Force(emulator,(level*effect->gain)/effect->maxLevel,effect->maxLevel); +} diff --git a/Feedback360/emulator.h b/Feedback360/emulator.h new file mode 100644 index 00000000..5c209989 --- /dev/null +++ b/Feedback360/emulator.h @@ -0,0 +1,112 @@ +/* + MICE Xbox 360 Controller driver for Mac OS X + Copyright (C) 2006-2013 Colin Munro + + emulator.h - Interface to fake FF API effects using rumble motors + + This file is part of Xbox360Controller. + + Xbox360Controller is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Xbox360Controller is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Foobar; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include + +typedef enum { + fsStop, + fsPlay, +} ForceState; + +typedef struct { + bool inUse; + ForceState state; + // Information + int gain; + int maxLevel; + int startCount; + int attackLevel; + int attackCount; + int sustainLevel; + int sustainCount; + int fadeLevel; + int fadeCount; + // Runtime + int countStart; + int countAttack; + int countSustain; + int countFade; + int countLoop; +} ForceEffect; + +typedef struct { + // Settings + int gain; // 0-maxLevel + int maxLevel; + int startDelay; // Microseconds + // Envelope for effect + int attackLevel; // 0-maxLevel + int attackTime; // Microseconds + int sustainLevel; // 0-maxLevel + int sustainTime; // Microseconds + int fadeLevel; // 0-maxLevel + int fadeTime; // Microseconds +} ForceParams; + +typedef struct { + // Callback + void (*SetForce)(void *context,unsigned char large,unsigned char small); + void *context; + // Options + int gain,maxGain; + bool enable,pause; + // Effect entries + ForceEffect *effects; + int effectCount; + // Runtime + CFRunLoopTimerRef timer; + unsigned char oldLarge,oldSmall; + int activeEffect; +} ForceEmulator; + +// Constructor/destructor +void Emulate_Initialise(ForceEmulator *emulator,int effectCount,void (*SetForce)(void*,unsigned char,unsigned char),void *context); +void Emulate_Finalise(ForceEmulator *emulator); + +// Options +void Emulate_SetGain(ForceEmulator *emulator,int gain,int gainMax); +void Emulate_SetEnable(ForceEmulator *emulator,bool enable); +bool Emulate_IsEnabled(ForceEmulator *emulator); +void Emulate_SetPaused(ForceEmulator *emulator,bool enable); +bool Emulate_IsPaused(ForceEmulator *emulator); + +// Using effects +int Emulate_CreateEffect(ForceEmulator *emulator,const ForceParams *params); +bool Emulate_ChangeEffect(ForceEmulator *emulator,int index,const ForceParams *params); +void Emulate_DestroyEffect(ForceEmulator *emulator,int index); + +bool Emulate_IsValidEffect(ForceEmulator *emulator,int index); +bool Emulate_IsPlaying(ForceEmulator *emulator,int index); + +bool Emulate_IsEmpty(ForceEmulator *emulator); + +void Emulate_Reset(ForceEmulator *emulator); + +void Emulate_Start(ForceEmulator *emulator,int index,int iterations); +void Emulate_Stop(ForceEmulator *emulator,int index); +bool Emulate_IsStopped(ForceEmulator *emulator); + +UInt32 Emulate_Effects_Used(ForceEmulator *emulator); +UInt32 Emulate_Effects_Total(ForceEmulator *emulator); + +// Callbacks +void Emulate_Callback(ForceEmulator *emulator,unsigned char large,unsigned char small); diff --git a/Feedback360/main.c b/Feedback360/main.c new file mode 100644 index 00000000..b4917c1a --- /dev/null +++ b/Feedback360/main.c @@ -0,0 +1,447 @@ +/* + MICE Xbox 360 Controller driver for Mac OS X + Copyright (C) 2006-2013 Colin Munro + + main.c - Main code for the FF plugin + + This file is part of Xbox360Controller. + + Xbox360Controller is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Xbox360Controller is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Foobar; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include +#include "main.h" + +static void dealloc360Feedback(Xbox360ForceFeedback *this); + +// IUnknown + +static HRESULT Feedback360QueryInterface(void *that,REFIID iid,LPVOID *ppv) +{ + Xbox360ForceFeedback *this=FFThis(that); + CFUUIDRef interface; + + interface=CFUUIDCreateFromUUIDBytes(NULL,iid); + // IOForceFeedbackDevice + if(CFEqual(interface,kIOForceFeedbackDeviceInterfaceID)) + *ppv=&this->iIOForceFeedbackDeviceInterface; + // IUnknown || IOCFPlugInInterface + else if(CFEqual(interface,IUnknownUUID)||CFEqual(interface,kIOCFPlugInInterfaceID)) + *ppv=&this->iIOCFPlugInInterface; + else + *ppv=NULL; + // Done + CFRelease(interface); + if((*ppv)==NULL) return E_NOINTERFACE; + else { + this->iIOCFPlugInInterface.pseudoVTable->AddRef(*ppv); + return S_OK; + } +} + +static ULONG Feedback360AddRef(void *that) +{ + Xbox360ForceFeedback *this=FFThis(that); + this->refCount++; + return this->refCount; +} + +static ULONG Feedback360Release(void *that) +{ + Xbox360ForceFeedback *this=FFThis(that); + this->refCount--; + if(this->refCount==0) { + dealloc360Feedback(this); + return 0; + } else return this->refCount; +} + +// IOCFPlugInInterface + +static IOReturn Feedback360Probe(void *that,CFDictionaryRef propertyTable,io_service_t service,SInt32 *order) +{ + if ((service==0) + || ((!IOObjectConformsTo(service,"Xbox360ControllerClass")) + && (!IOObjectConformsTo(service,"Wireless360Controller")))) return kIOReturnBadArgument; + return S_OK; +} + +static IOReturn Feedback360Start(void *that,CFDictionaryRef propertyTable,io_service_t service) +{ + return S_OK; +} + +static IOReturn Feedback360Stop(void *that) +{ + return S_OK; +} + +// IOForceFeedbackDevice + +static HRESULT Feedback360GetVersion(void *this,ForceFeedbackVersion *version) +{ + if((this==NULL)||(version==NULL)) return FFERR_INVALIDPARAM; + version->apiVersion.majorRev=kFFPlugInAPIMajorRev; + version->apiVersion.minorAndBugRev=kFFPlugInAPIMinorAndBugRev; + version->apiVersion.stage=kFFPlugInAPIStage; + version->apiVersion.nonRelRev=kFFPlugInAPINonRelRev; + version->plugInVersion.majorRev=FeedbackDriverVersionMajor; + version->plugInVersion.minorAndBugRev=FeedbackDriverVersionMinor; + version->plugInVersion.stage=FeedbackDriverVersionStage; + version->plugInVersion.nonRelRev=FeedbackDriverVersionNonRelRev; + return S_OK; +} + +static void Feedback360_Callback(void *that,unsigned char large,unsigned char small) +{ + Xbox360ForceFeedback *this=(Xbox360ForceFeedback*)that; + char buf[]={0x00,0x04,large,small}; + if(!this->manual) Device_Send(&this->device,buf,sizeof(buf)); +} + +static HRESULT Feedback360InitializeTerminate(void *that,NumVersion APIversion,io_object_t hidDevice,boolean_t begin) +{ + Xbox360ForceFeedback *this=FFThis(that); +// fprintf(stderr,"Feedback360InitializeTerminate(%p,[%i.%i.%i.%i],%p,%s)\n",this,APIversion.majorRev,APIversion.minorAndBugRev,APIversion.stage,APIversion.nonRelRev,hidDevice,begin?"true":"false"); + if(this==NULL) return FFERR_INVALIDPARAM; + if(begin) { +// fprintf(stderr,"Feedback: Initialising...\n"); + // Initialize + if(APIversion.majorRev!=kFFPlugInAPIMajorRev) + { +// fprintf(stderr,"Feedback: Invalid version\n"); + return FFERR_INVALIDPARAM; + } + // From probe + if( (hidDevice==0) + || ((!IOObjectConformsTo(hidDevice,"Xbox360ControllerClass")) + && (!IOObjectConformsTo(hidDevice,"Wireless360Controller"))) ) + { +// fprintf(stderr,"Feedback: Invalid device\n"); + return FFERR_INVALIDPARAM; + } + Emulate_Initialise(&this->emulator,10,Feedback360_Callback,this); + if(!Device_Initialise(&this->device,hidDevice)) { +// fprintf(stderr,"Feedback: Failed to initialise\n"); + Emulate_Finalise(&this->emulator); + return FFERR_NOINTERFACE; + } + this->manual=FALSE; + } else { +// fprintf(stderr,"Feedback: Terminating\n"); + // Terminate + Emulate_Finalise(&this->emulator); + Device_Finalise(&this->device); + } + return FF_OK; +} + +static HRESULT Feedback360DestroyEffect(void *that,FFEffectDownloadID downloadID) +{ + Xbox360ForceFeedback *this=FFThis(that); + Emulate_DestroyEffect(&this->emulator,downloadID); + return FF_OK; +} + +static bool Feedback360SupportedEffect(CFUUIDRef effect) +{ + if(CFEqual(effect,kFFEffectType_SawtoothDown_ID)) return TRUE; + if(CFEqual(effect,kFFEffectType_SawtoothUp_ID)) return TRUE; + if(CFEqual(effect,kFFEffectType_Sine_ID)) return TRUE; + if(CFEqual(effect,kFFEffectType_Spring_ID)) return TRUE; + if(CFEqual(effect,kFFEffectType_Square_ID)) return TRUE; + if(CFEqual(effect,kFFEffectType_Triangle_ID)) return TRUE; + return FALSE; +} + +static bool Feedback360ConvertEffect(const FFEFFECT *effect,ForceParams *params) +{ + if((effect->cbTypeSpecificParams!=sizeof(FFPERIODIC))||(effect->lpvTypeSpecificParams==NULL)) return FALSE; + // Settings + params->startDelay=effect->dwStartDelay; + params->gain=effect->dwGain; + params->maxLevel=10000; + // Envelope + params->sustainLevel=((FFPERIODIC*)effect->lpvTypeSpecificParams)->dwMagnitude; + // Documentation was a bit confusing here as to which value was right, compared to what a game actually used +// params->sustainTime=effect->dwDuration; + params->sustainTime=((FFPERIODIC*)effect->lpvTypeSpecificParams)->dwPeriod; + if(effect->lpEnvelope==NULL) { + params->attackLevel=params->sustainLevel; + params->attackTime=0; + params->fadeLevel=params->sustainLevel; + params->fadeTime=0; + } else { + if(effect->lpEnvelope->dwSizeattackLevel=effect->lpEnvelope->dwAttackLevel; + params->attackTime=effect->lpEnvelope->dwAttackTime; + params->fadeLevel=effect->lpEnvelope->dwFadeLevel; + params->fadeTime=effect->lpEnvelope->dwFadeTime; + } + // Done + return TRUE; +} + +static HRESULT Feedback360DownloadEffect(void *that,CFUUIDRef effectType,FFEffectDownloadID *downloadID,FFEFFECT *effect,FFEffectParameterFlag flags) +{ + ForceParams params; + Xbox360ForceFeedback *this=FFThis(that); + + if(!Feedback360SupportedEffect(effectType)) return FFERR_UNSUPPORTED; + if(!(effect->dwFlags&FFEFF_SPHERICAL)) return FFERR_UNSUPPORTED; + if(effect->dwTriggerButton!=FFEB_NOTRIGGER) return FFERR_UNSUPPORTED; + if(!Feedback360ConvertEffect(effect,¶ms)) return FFERR_UNSUPPORTED; + if(Emulate_IsPaused(&this->emulator)) return FFERR_DEVICEPAUSED; + if(flags&FFEP_NODOWNLOAD) return FF_OK; + if((*downloadID)==0) { + *downloadID=Emulate_CreateEffect(&this->emulator,¶ms); + if((*downloadID)==0) return FFERR_DEVICEFULL; + } else { + if(!Emulate_IsValidEffect(&this->emulator,*downloadID)) return FFERR_INVALIDDOWNLOADID; + if(!Emulate_ChangeEffect(&this->emulator,*downloadID,¶ms)) return FFERR_EFFECTTYPEMISMATCH; + } + if(flags&FFEP_START) { + // Restart + } + return FF_OK; +} + +static HRESULT Feedback360Escape(void *that,FFEffectDownloadID downloadID,FFEFFESCAPE *escape) +{ + Xbox360ForceFeedback *this=FFThis(that); + + if(this==NULL) return FFERR_INVALIDPARAM; + if(downloadID!=0) return FFERR_UNSUPPORTED; + if(escape->dwSizecbOutBuffer=0; + switch(escape->dwCommand) { + case 0x00: // Control motors + if(escape->cbInBuffer!=1) return FFERR_INVALIDPARAM; + this->manual=((unsigned char*)escape->lpvInBuffer)[0]!=0x00; + break; + case 0x01: // Set motors + if(escape->cbInBuffer!=2) return FFERR_INVALIDPARAM; + if(this->manual) { + unsigned char *data=escape->lpvInBuffer; + unsigned char buf[]={0x00,0x04,data[0],data[1]}; + Device_Send(&this->device,buf,sizeof(buf)); + } + break; + case 0x02: // Set LED + if(escape->cbInBuffer!=1) return FFERR_INVALIDPARAM; + { + unsigned char *data=escape->lpvInBuffer; + unsigned char buf[]={0x01,0x03,data[0]}; + Device_Send(&this->device,buf,sizeof(buf)); + } + break; + case 0x03: // Power off + { + unsigned char buf[] = {0x02, 0x02}; + Device_Send(&this->device, buf, sizeof(buf)); + } + break; + default: + fprintf(stderr, "Xbox360Controller FF plugin: Unknown escape (%i)\n", (int)escape->dwCommand); + return FFERR_UNSUPPORTED; + } + return FF_OK; +} + +static HRESULT Feedback360GetEffectStatus(void *that,FFEffectDownloadID downloadID,FFEffectStatusFlag *statusCode) +{ + Xbox360ForceFeedback *this=FFThis(that); + + if(!Emulate_IsValidEffect(&this->emulator,downloadID)) return FFERR_INVALIDDOWNLOADID; + *statusCode=Emulate_IsPlaying(&this->emulator,downloadID)?FFEGES_PLAYING:FFEGES_NOTPLAYING; + return FF_OK; +} + +static HRESULT Feedback360GetForceFeedbackCapabilities(void *this,FFCAPABILITIES *capabilities) +{ + capabilities->ffSpecVer.majorRev=kFFPlugInAPIMajorRev; + capabilities->ffSpecVer.minorAndBugRev=kFFPlugInAPIMinorAndBugRev; + capabilities->ffSpecVer.stage=kFFPlugInAPIStage; + capabilities->ffSpecVer.nonRelRev=kFFPlugInAPINonRelRev; + capabilities->supportedEffects=FFCAP_ET_SQUARE|FFCAP_ET_SINE|FFCAP_ET_TRIANGLE|FFCAP_ET_SAWTOOTHUP|FFCAP_ET_SAWTOOTHDOWN; + capabilities->emulatedEffects=0; + capabilities->subType=FFCAP_ST_VIBRATION; + capabilities->numFfAxes=1; + capabilities->ffAxes[0]=FFJOFS_X; + capabilities->storageCapacity=256; + capabilities->playbackCapacity=1; + capabilities->driverVer.majorRev=FeedbackDriverVersionMajor; + capabilities->driverVer.minorAndBugRev=FeedbackDriverVersionMinor; + capabilities->driverVer.stage=FeedbackDriverVersionStage; + capabilities->driverVer.nonRelRev=FeedbackDriverVersionNonRelRev; + capabilities->firmwareVer.majorRev=1; + capabilities->firmwareVer.minorAndBugRev=0; + capabilities->firmwareVer.stage=developStage; + capabilities->firmwareVer.nonRelRev=0; + capabilities->hardwareVer.majorRev=1; + capabilities->hardwareVer.minorAndBugRev=0; + capabilities->hardwareVer.stage=developStage; + capabilities->hardwareVer.nonRelRev=0; + return S_OK; +} + +static HRESULT Feedback360GetForceFeedbackState(void *that,ForceFeedbackDeviceState *deviceState) +{ + Xbox360ForceFeedback *this=FFThis(that); + + if(deviceState->dwSizedwSize=sizeof(ForceFeedbackDeviceState); + deviceState->dwState + = Emulate_IsEmpty(&this->emulator)?FFGFFS_EMPTY:0 + | Emulate_IsStopped(&this->emulator)?FFGFFS_STOPPED:0 + | Emulate_IsPaused(&this->emulator)?FFGFFS_PAUSED:0 + | Emulate_IsEnabled(&this->emulator)?FFGFFS_ACTUATORSON:FFGFFS_ACTUATORSOFF; + deviceState->dwLoad=(Emulate_Effects_Used(&this->emulator)*100)/Emulate_Effects_Total(&this->emulator); + return S_OK; +} + +static HRESULT Feedback360SendForceFeedbackCommand(void *that,FFCommandFlag state) +{ + Xbox360ForceFeedback *this=FFThis(that); + + switch(state) { + case FFSFFC_RESET: + Emulate_Reset(&this->emulator); + return S_OK; + case FFSFFC_STOPALL: + Emulate_Stop(&this->emulator,0); // 0 == all effects + return S_OK; + case FFSFFC_PAUSE: + case FFSFFC_CONTINUE: + Emulate_SetPaused(&this->emulator,state==FFSFFC_PAUSE); + return S_OK; + case FFSFFC_SETACTUATORSON: + case FFSFFC_SETACTUATORSOFF: + Emulate_SetEnable(&this->emulator,state==FFSFFC_SETACTUATORSON); + return S_OK; + default: + return FFERR_UNSUPPORTED; + } +} + +static HRESULT Feedback360SetProperty(void *that,FFProperty property,void *value) +{ + Xbox360ForceFeedback *this=FFThis(that); + + switch(property) { + case FFPROP_FFGAIN: + { + UInt32 uValue = *((UInt32*)value); + if (uValue > 10000) + return FFERR_INVALIDPARAM; + Emulate_SetGain(&this->emulator, uValue, 10000); + } + return FF_OK; + default: + return FFERR_UNSUPPORTED; + } +} + +static HRESULT Feedback360StartEffect(void *that,FFEffectDownloadID downloadID,FFEffectStartFlag mode,UInt32 iterations) +{ + Xbox360ForceFeedback *this=FFThis(that); + + if(mode&FFES_SOLO) Feedback360SendForceFeedbackCommand(that,FFSFFC_RESET); + Emulate_Start(&this->emulator,downloadID,iterations); + return S_OK; +} + +static HRESULT Feedback360StopEffect(void *that,FFEffectDownloadID downloadID) +{ + Xbox360ForceFeedback *this=FFThis(that); + + if(!Emulate_IsValidEffect(&this->emulator,downloadID)) return FFERR_INVALIDDOWNLOADID; + Emulate_Stop(&this->emulator,downloadID); + return S_OK; +} + +// Function table + +static IOCFPlugInInterface functionMap360_IOCFPlugInInterface={ + // Padding required for COM + NULL, + // IUnknown + Feedback360QueryInterface, + Feedback360AddRef, + Feedback360Release, + // IOCFPlugInInterface + 1,0, // Version + Feedback360Probe, + Feedback360Start, + Feedback360Stop +}; + +static IOForceFeedbackDeviceInterface functionMap360_IOForceFeedbackDeviceInterface={ + // Padding required for COM + NULL, + // IUnknown + Feedback360QueryInterface, + Feedback360AddRef, + Feedback360Release, + // IOForceFeedbackDevice + Feedback360GetVersion, + Feedback360InitializeTerminate, + Feedback360DestroyEffect, + Feedback360DownloadEffect, + Feedback360Escape, + Feedback360GetEffectStatus, + Feedback360GetForceFeedbackCapabilities, + Feedback360GetForceFeedbackState, + Feedback360SendForceFeedbackCommand, + Feedback360SetProperty, + Feedback360StartEffect, + Feedback360StopEffect +}; + +// Constructor and destructor + +static IOCFPlugInInterface** alloc360Feedback(CFUUIDRef uuid) +{ + Xbox360ForceFeedback *item; + + item=(Xbox360ForceFeedback*)malloc(sizeof(Xbox360ForceFeedback)); + item->iIOCFPlugInInterface.pseudoVTable=(IUnknownVTbl*)&functionMap360_IOCFPlugInInterface; + item->iIOCFPlugInInterface.obj=item; + item->iIOForceFeedbackDeviceInterface.pseudoVTable=(IUnknownVTbl*)&functionMap360_IOForceFeedbackDeviceInterface; + item->iIOForceFeedbackDeviceInterface.obj=item; + item->factoryID=CFRetain(uuid); + CFPlugInAddInstanceForFactory(uuid); + item->refCount=1; + return (IOCFPlugInInterface**)&item->iIOCFPlugInInterface.pseudoVTable; +} + +static void dealloc360Feedback(Xbox360ForceFeedback *this) +{ + CFUUIDRef uuid; + + uuid=this->factoryID; + free(this); + if(uuid) { + CFPlugInRemoveInstanceForFactory(uuid); + CFRelease(uuid); + } +} + +// External factory function + +void* Control360Factory(CFAllocatorRef allocator,CFUUIDRef uuid) +{ + if(CFEqual(uuid,kIOForceFeedbackLibTypeID)) return (void*)alloc360Feedback(uuid); + else return NULL; +} diff --git a/Feedback360/main.h b/Feedback360/main.h new file mode 100644 index 00000000..7da07086 --- /dev/null +++ b/Feedback360/main.h @@ -0,0 +1,58 @@ +/* + MICE Xbox 360 Controller driver for Mac OS X + Copyright (C) 2006-2013 Colin Munro + + main.h - defines the structure used for the plugin COM object + + This file is part of Xbox360Controller. + + Xbox360Controller is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Xbox360Controller is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Foobar; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include +#include +#include "emulator.h" +#include "devlink.h" + +struct _Xbox360ForceFeedback; + +typedef struct _Xbox360InterfaceMap { + IUnknownVTbl *pseudoVTable; + struct _Xbox360ForceFeedback *obj; +} Xbox360InterfaceMap; + +typedef struct _Xbox360ForceFeedback { + Xbox360InterfaceMap iIOCFPlugInInterface; + Xbox360InterfaceMap iIOForceFeedbackDeviceInterface; + CFUUIDRef factoryID; + UInt32 refCount; + ForceEmulator emulator; + DeviceLink device; + bool manual; +} Xbox360ForceFeedback; + +#define FFThis(interface) (((interface)==NULL)?NULL:(((Xbox360InterfaceMap*)(interface))->obj)) + +#define FeedbackDriverVersionMajor 1 +#define FeedbackDriverVersionMinor 0 +#define FeedbackDriverVersionStage developStage +#define FeedbackDriverVersionNonRelRev 0 + +// B8ED278F-EC8A-4E8E-B4CF-13E2A9D68E83 +#define FeedbackDriverUuid CFUUIDGetConstantUUIDWithBytes(NULL, \ + 0xB8, 0xED, 0x27, 0x8F, 0xEC, 0x8A, 0x4E, 0x8E, \ + 0xB4, 0xCF, 0x13, 0xE2, 0xA9, 0xD6, 0x8E, 0x83) + +// Factory function +void* Control360Factory(CFAllocatorRef allocator,CFUUIDRef uuid); diff --git a/Feedback360/testhaptic.c b/Feedback360/testhaptic.c deleted file mode 100644 index 44b1541a..00000000 --- a/Feedback360/testhaptic.c +++ /dev/null @@ -1,374 +0,0 @@ -/* - Copyright (C) 1997-2013 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely. -*/ -/* -Copyright (c) 2008, Edgar Simo Serra -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of the Simple Directmedia Layer (SDL) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * includes - */ -#include -#include /* strstr */ -#include /* isdigit */ - -#include "SDL2/SDL.h" - -#ifndef SDL_HAPTIC_DISABLED - -#include "SDL2/SDL_haptic.h" - -static SDL_Haptic *haptic; - - -/* - * prototypes - */ -static void abort_execution(void); -static void HapticPrintSupported(SDL_Haptic * haptic); - - -/** - * @brief The entry point of this force feedback demo. - * @param[in] argc Number of arguments. - * @param[in] argv Array of argc arguments. - */ -int -main(int argc, char **argv) -{ - int i; - char *name; - int index; - SDL_HapticEffect efx[5]; - int id[5]; - int nefx; - unsigned int supported; - - /* Enable standard application logging */ - SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); - - name = NULL; - index = -1; - if (argc > 1) { - name = argv[1]; - if ((strcmp(name, "--help") == 0) || (strcmp(name, "-h") == 0)) { - SDL_Log("USAGE: %s [device]\n" - "If device is a two-digit number it'll use it as an index, otherwise\n" - "it'll use it as if it were part of the device's name.\n", - argv[0]); - return 0; - } - - i = (int)strlen(name); - if ((i < 3) && isdigit(name[0]) && ((i == 1) || isdigit(name[1]))) { - index = atoi(name); - name = NULL; - } - } - - /* Initialize the force feedbackness */ - SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_JOYSTICK | - SDL_INIT_HAPTIC); - SDL_Log("%d Haptic devices detected.\n", SDL_NumHaptics()); - if (SDL_NumHaptics() > 0) { - /* We'll just use index or the first force feedback device found */ - if (name == NULL) { - i = (index != -1) ? index : 0; - } - /* Try to find matching device */ - else { - for (i = 0; i < SDL_NumHaptics(); i++) { - if (strstr(SDL_HapticName(i), name) != NULL) - break; - } - - if (i >= SDL_NumHaptics()) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to find device matching '%s', aborting.\n", - name); - return 1; - } - } - - haptic = SDL_HapticOpen(i); - if (haptic == NULL) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create the haptic device: %s\n", - SDL_GetError()); - return 1; - } - SDL_Log("Device: %s\n", SDL_HapticName(i)); - HapticPrintSupported(haptic); - } else { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No Haptic devices found!\n"); - return 1; - } - - /* We only want force feedback errors. */ - SDL_ClearError(); - - /* Create effects. */ - memset(&efx, 0, sizeof(efx)); - nefx = 0; - supported = SDL_HapticQuery(haptic); - - SDL_Log("\nUploading effects\n"); -#if 0 - /* Left motor */ - if(supported & SDL_HAPTIC_LEFTRIGHT) { - SDL_Log(" effect %d: Left Motor\n", nefx); - efx[nefx].type = SDL_HAPTIC_LEFTRIGHT; - efx[nefx].periodic.magnitude = 0x4000; - efx[nefx].periodic.length = 5000; - efx[nefx].leftright.large_magnitude = 1000; - efx[nefx].leftright.small_magnitude = 0; - id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); - if (id[nefx] < 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); - abort_execution(); - } - nefx++; - } - - /* Right motor */ - if(supported & SDL_HAPTIC_LEFTRIGHT) { - SDL_Log(" effect %d: Left Motor\n", nefx); - efx[nefx].type = SDL_HAPTIC_LEFTRIGHT; - efx[nefx].periodic.magnitude = 0x4000; - efx[nefx].periodic.length = 5000; - efx[nefx].leftright.large_magnitude = 0; - efx[nefx].leftright.small_magnitude = 1000; - id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); - if (id[nefx] < 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); - abort_execution(); - } - nefx++; - } - - /* First we'll try a SINE effect. */ - if (supported & SDL_HAPTIC_SINE) { - SDL_Log(" effect %d: Sine Wave\n", nefx); - efx[nefx].type = SDL_HAPTIC_SINE; - efx[nefx].periodic.period = 1000; - efx[nefx].periodic.magnitude = 32767; - efx[nefx].periodic.length = 5000; - //efx[nefx].periodic.attack_length = 1000; - //efx[nefx].periodic.fade_length = 1000; - efx[nefx].periodic.phase = 0; - id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); - if (id[nefx] < 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); - abort_execution(); - } - nefx++; - } - /* Now we'll try a SAWTOOTHUP */ - if (supported & SDL_HAPTIC_SAWTOOTHUP) { - SDL_Log(" effect %d: Sawtooth Up\n", nefx); - efx[nefx].type = SDL_HAPTIC_SAWTOOTHUP; - efx[nefx].periodic.period = 500; - efx[nefx].periodic.magnitude = 0x5000; - efx[nefx].periodic.length = 5000; - efx[nefx].periodic.attack_length = 1000; - efx[nefx].periodic.fade_length = 1000; - id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); - if (id[nefx] < 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); - abort_execution(); - } - nefx++; - } - /* Now the classical constant effect. */ - if (supported & SDL_HAPTIC_CONSTANT) { - SDL_Log(" effect %d: Constant Force\n", nefx); - efx[nefx].type = SDL_HAPTIC_CONSTANT; - efx[nefx].constant.direction.type = SDL_HAPTIC_POLAR; - efx[nefx].constant.direction.dir[0] = 20000; /* Force comes from the south-west. */ - efx[nefx].constant.length = 5000; - efx[nefx].constant.level = 0x6000; - efx[nefx].constant.attack_length = 1000; - efx[nefx].constant.fade_length = 1000; - id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); - if (id[nefx] < 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); - abort_execution(); - } - nefx++; - } - /* The cute spring effect. */ - if (supported & SDL_HAPTIC_SPRING) { - SDL_Log(" effect %d: Condition Spring\n", nefx); - efx[nefx].type = SDL_HAPTIC_SPRING; - efx[nefx].condition.length = 5000; - for (i = 0; i < SDL_HapticNumAxes(haptic); i++) { - efx[nefx].condition.right_sat[i] = 0x7FFF; - efx[nefx].condition.left_sat[i] = 0x7FFF; - efx[nefx].condition.right_coeff[i] = 0x2000; - efx[nefx].condition.left_coeff[i] = 0x2000; - efx[nefx].condition.center[i] = 0x1000; /* Displace the center for it to move. */ - } - id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); - if (id[nefx] < 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); - abort_execution(); - } - nefx++; - } - /* The pretty awesome inertia effect. */ - if (supported & SDL_HAPTIC_INERTIA) { - SDL_Log(" effect %d: Condition Inertia\n", nefx); - efx[nefx].type = SDL_HAPTIC_SPRING; - efx[nefx].condition.length = 5000; - for (i = 0; i < SDL_HapticNumAxes(haptic); i++) { - efx[nefx].condition.right_sat[i] = 0x7FFF; - efx[nefx].condition.left_sat[i] = 0x7FFF; - efx[nefx].condition.right_coeff[i] = 0x2000; - efx[nefx].condition.left_coeff[i] = 0x2000; - } - id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); - if (id[nefx] < 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); - abort_execution(); - } - nefx++; - } - - /* Finally we'll try a left/right effect. */ - if (supported & SDL_HAPTIC_LEFTRIGHT) { - SDL_Log(" effect %d: Left/Right\n", nefx); - efx[nefx].type = SDL_HAPTIC_LEFTRIGHT; - efx[nefx].leftright.length = 5000; - efx[nefx].leftright.large_magnitude = 0x3000; - efx[nefx].leftright.small_magnitude = 0xFFFF; - id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); - if (id[nefx] < 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); - abort_execution(); - } - nefx++; - } -#endif - - /* Finally we'll try a custom effect. */ - if (supported & SDL_HAPTIC_CUSTOM) { - Uint16 data[] = {0, 32767, 0, 32767/2, 0, 32767/4, 32767, 0, 32767/2, 0, 32767/4, 0}; - SDL_Log(" effect %d: Custom\n", nefx); - efx[nefx].type = SDL_HAPTIC_CUSTOM; - efx[nefx].custom.length = 5000; - efx[nefx].custom.channels = 2; - efx[nefx].custom.samples = 12; - efx[nefx].custom.period = 100; - efx[nefx].custom.data = data; - id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); - if (id[nefx] < 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); - abort_execution(); - } - nefx++; - } - - SDL_Log - ("\nNow playing effects for 5 seconds each with 1 second delay between\n"); - for (i = 0; i < nefx; i++) { - SDL_Log(" Playing effect %d\n", i); - SDL_HapticRunEffect(haptic, id[i], 1); - SDL_Delay(6000); /* Effects only have length 5000 */ - } - - /* Quit */ - if (haptic != NULL) - SDL_HapticClose(haptic); - SDL_Quit(); - - return 0; -} - - -/* - * Cleans up a bit. - */ -static void -abort_execution(void) -{ - SDL_Log("\nAborting program execution.\n"); - - SDL_HapticClose(haptic); - SDL_Quit(); - - exit(1); -} - - -/* - * Displays information about the haptic device. - */ -static void -HapticPrintSupported(SDL_Haptic * haptic) -{ - unsigned int supported; - - supported = SDL_HapticQuery(haptic); - SDL_Log(" Supported effects [%d effects, %d playing]:\n", - SDL_HapticNumEffects(haptic), SDL_HapticNumEffectsPlaying(haptic)); - if (supported & SDL_HAPTIC_CONSTANT) - SDL_Log(" constant\n"); - if (supported & SDL_HAPTIC_SINE) - SDL_Log(" sine\n"); - /* !!! FIXME: put this back when we have more bits in 2.1 */ - /* if (supported & SDL_HAPTIC_SQUARE) - SDL_Log(" square\n"); */ - if (supported & SDL_HAPTIC_TRIANGLE) - SDL_Log(" triangle\n"); - if (supported & SDL_HAPTIC_SAWTOOTHUP) - SDL_Log(" sawtoothup\n"); - if (supported & SDL_HAPTIC_SAWTOOTHDOWN) - SDL_Log(" sawtoothdown\n"); - if (supported & SDL_HAPTIC_RAMP) - SDL_Log(" ramp\n"); - if (supported & SDL_HAPTIC_FRICTION) - SDL_Log(" friction\n"); - if (supported & SDL_HAPTIC_SPRING) - SDL_Log(" spring\n"); - if (supported & SDL_HAPTIC_DAMPER) - SDL_Log(" damper\n"); - if (supported & SDL_HAPTIC_INERTIA) - SDL_Log(" inertia\n"); - if (supported & SDL_HAPTIC_CUSTOM) - SDL_Log(" custom\n"); - if (supported & SDL_HAPTIC_LEFTRIGHT) - SDL_Log(" left/right\n"); - SDL_Log(" Supported capabilities:\n"); - if (supported & SDL_HAPTIC_GAIN) - SDL_Log(" gain\n"); - if (supported & SDL_HAPTIC_AUTOCENTER) - SDL_Log(" autocenter\n"); - if (supported & SDL_HAPTIC_STATUS) - SDL_Log(" status\n"); -} - -#else - -int -main(int argc, char *argv[]) -{ - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL compiled without Haptic support.\n"); - exit(1); -} - -#endif diff --git a/Feedback360/testrumble.c b/Feedback360/testrumble.c deleted file mode 100644 index 12f4ffb4..00000000 --- a/Feedback360/testrumble.c +++ /dev/null @@ -1,154 +0,0 @@ -/* - Copyright (C) 1997-2013 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely. - */ -/* - Copyright (c) 2011, Edgar Simo Serra - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of the Simple Directmedia Layer (SDL) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * includes - */ -#include -#include /* strstr */ -#include /* isdigit */ - -#include - -#ifndef SDL_HAPTIC_DISABLED - -#include - -static SDL_Haptic *haptic; - - -/** - * @brief The entry point of this force feedback demo. - * @param[in] argc Number of arguments. - * @param[in] argv Array of argc arguments. - */ -int -main(int argc, char **argv) -{ - int i; - char *name; - int index; - - /* Enable standard application logging */ - SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); - - name = NULL; - index = -1; - if (argc > 1) { - name = argv[1]; - if ((strcmp(name, "--help") == 0) || (strcmp(name, "-h") == 0)) { - SDL_Log("USAGE: %s [device]\n" - "If device is a two-digit number it'll use it as an index, otherwise\n" - "it'll use it as if it were part of the device's name.\n", - argv[0]); - return 0; - } - - i = strlen(name); - if ((i < 3) && isdigit(name[0]) && ((i == 1) || isdigit(name[1]))) { - index = atoi(name); - name = NULL; - } - } - - /* Initialize the force feedbackness */ - SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_JOYSTICK | - SDL_INIT_HAPTIC); - SDL_Log("%d Haptic devices detected.\n", SDL_NumHaptics()); - if (SDL_NumHaptics() > 0) { - /* We'll just use index or the first force feedback device found */ - if (name == NULL) { - i = (index != -1) ? index : 0; - } - /* Try to find matching device */ - else { - for (i = 0; i < SDL_NumHaptics(); i++) { - if (strstr(SDL_HapticName(i), name) != NULL) - break; - } - - if (i >= SDL_NumHaptics()) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to find device matching '%s', aborting.\n", - name); - return 1; - } - } - - haptic = SDL_HapticOpen(i); - if (haptic == NULL) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create the haptic device: %s\n", - SDL_GetError()); - return 1; - } - SDL_Log("Device: %s\n", SDL_HapticName(i)); - } else { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No Haptic devices found!\n"); - return 1; - } - - /* We only want force feedback errors. */ - SDL_ClearError(); - - if (SDL_HapticRumbleSupported(haptic) == SDL_FALSE) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Rumble not supported!\n"); - return 1; - } - if (SDL_HapticRumbleInit(haptic) != 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to initialize rumble: %s\n", SDL_GetError()); - return 1; - } - SDL_Log("Playing 2 second rumble at 0.5 magnitude.\n"); - if (SDL_HapticRumblePlay(haptic, 1.0, 5000) != 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to play rumble: %s\n", SDL_GetError() ); - return 1; - } - SDL_Delay(2000); - SDL_Log("Stopping rumble.\n"); - SDL_HapticRumbleStop(haptic); - SDL_Delay(2000); - SDL_Log("Playing 2 second rumble at 0.3 magnitude.\n"); - if (SDL_HapticRumblePlay(haptic, 0.3f, 5000) != 0) { - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to play rumble: %s\n", SDL_GetError() ); - return 1; - } - SDL_Delay(2000); - - /* Quit */ - if (haptic != NULL) - SDL_HapticClose(haptic); - SDL_Quit(); - - return 0; -} - -#else - -int -main(int argc, char *argv[]) -{ - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL compiled without Haptic support.\n"); - exit(1); -} - -#endif diff --git a/Feedback360/version.plist b/Feedback360/version.plist new file mode 100644 index 00000000..53bf3a3f --- /dev/null +++ b/Feedback360/version.plist @@ -0,0 +1,16 @@ + + + + + BuildVersion + 12 + CFBundleVersion + 1.0 + ProductBuildVersion + 7K571 + ProjectName + DevToolsWizardTemplates + SourceVersion + 3870000 + + diff --git a/Feedback360/zh-Hans.lproj/InfoPlist.strings b/Feedback360/zh-Hans.lproj/InfoPlist.strings deleted file mode 100644 index 0d04b229..00000000 --- a/Feedback360/zh-Hans.lproj/InfoPlist.strings +++ /dev/null @@ -1,4 +0,0 @@ -/* Localized versions of Info.plist keys */ - -CFBundleName = "Feedback360"; -NSHumanReadableCopyright = "© Colin Munro, 2005-2011"; diff --git a/Install360Controller/Install360Controller.pkgproj b/Install360Controller/Install360Controller.pkgproj old mode 100644 new mode 100755 index 7dc48512..be4569ff --- a/Install360Controller/Install360Controller.pkgproj +++ b/Install360Controller/Install360Controller.pkgproj @@ -5,10 +5,6 @@ PACKAGES - MUST-CLOSE-APPLICATION-ITEMS - - MUST-CLOSE-APPLICATIONS - PACKAGE_FILES DEFAULT_INSTALL_LOCATION @@ -61,17 +57,67 @@ CHILDREN - + + + CHILDREN + + GID + 80 + PATH + ../360Daemon/build/Release/360Daemon + PATH_TYPE + 1 + PERMISSIONS + 493 + TYPE + 3 + UID + 0 + + + CHILDREN + + + CHILDREN + + GID + 80 + PATH + ../360Daemon/Alert.tif + PATH_TYPE + 1 + PERMISSIONS + 420 + TYPE + 3 + UID + 0 + + + GID + 80 + PATH + Resources + PATH_TYPE + 0 + PERMISSIONS + 493 + TYPE + 2 + UID + 0 + + GID 80 PATH - ../build/Release/360Daemon.app + 360Daemon PATH_TYPE - 1 + 0 PERMISSIONS 493 TYPE - 3 + 2 UID 0 @@ -119,39 +165,6 @@ UID 0 - - CHILDREN - - - CHILDREN - - GID - 0 - PATH - ../build/Release/360Controller.kext - PATH_TYPE - 1 - PERMISSIONS - 493 - TYPE - 3 - UID - 0 - - - GID - 0 - PATH - Extensions - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 2 - UID - 0 - CHILDREN @@ -269,24 +282,12 @@ CHILDREN - BUNDLE_CAN_DOWNGRADE - - BUNDLE_POSTINSTALL_PATH - - PATH_TYPE - 0 - - BUNDLE_PREINSTALL_PATH - - PATH_TYPE - 0 - CHILDREN GID 0 PATH - ../build/Release/Pref360Control.prefPane + ../Pref360Control/build/Deployment/Pref360Control.prefPane PATH_TYPE 1 PERMISSIONS @@ -352,7 +353,7 @@ PATH_TYPE 0 PERMISSIONS - 1005 + 493 TYPE 1 UID @@ -454,22 +455,6 @@ UID 0 - - CHILDREN - - GID - 0 - PATH - Automator - PATH_TYPE - 0 - PERMISSIONS - 493 - TYPE - 1 - UID - 0 - GID 0 @@ -492,7 +477,58 @@ CHILDREN - + + + BUNDLE_CAN_DOWNGRADE + + CHILDREN + + GID + 0 + PATH + ../360Controller/build/Deployment/360Controller.kext + PATH_TYPE + 1 + PERMISSIONS + 493 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + ../Wireless360Controller/build/Release/Wireless360Controller.kext + PATH_TYPE + 1 + PERMISSIONS + 493 + TYPE + 3 + UID + 0 + + + CHILDREN + + GID + 0 + PATH + ../WirelessGamingReceiver/build/Release/WirelessGamingReceiver.kext + PATH_TYPE + 1 + PERMISSIONS + 493 + TYPE + 3 + UID + 0 + + GID 0 PATH @@ -583,14 +619,8 @@ PAYLOAD_TYPE 0 - SHOW_INVISIBLE - - SPLIT_FORKS - - TREAT_MISSING_FILES_AS_WARNING - VERSION - 5 + 2 PACKAGE_SCRIPTS @@ -617,29 +647,15 @@ 1 CONCLUSION_ACTION 2 - FOLLOW_SYMBOLIC_LINKS - IDENTIFIER com.mice.pkg.Xbox360controller - LOCATION - 0 NAME Install360Controller OVERWRITE_PERMISSIONS - PAYLOAD_SIZE - -1 - REFERENCE_PATH - - RELOCATABLE - - USE_HFS+_COMPRESSION - VERSION - 0.16.11 + 0.12 - TYPE - 0 UUID 95C3DB03-4C99-4A29-AEC7-C73B3D9F6A04 @@ -658,15 +674,13 @@ ZW50LVN0eWxlLVR5cGUiIGNvbnRlbnQ9InRleHQvY3NzIj4KPHRp dGxlPjwvdGl0bGU+CjxtZXRhIG5hbWU9IkdlbmVyYXRvciIgY29u dGVudD0iQ29jb2EgSFRNTCBXcml0ZXIiPgo8bWV0YSBuYW1lPSJD - b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjEyNjUuMjEiPgo8c3R5bGUg + b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjExODcuMzQiPgo8c3R5bGUg dHlwZT0idGV4dC9jc3MiPgo8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5 Pgo8L2JvZHk+CjwvaHRtbD4K PROJECT_PRESENTATION - BACKGROUND - INSTALLATION TYPE HIERARCHIES @@ -703,8 +717,8 @@ - MODE - 1 + INSTALLATION TYPE + 0 INSTALLATION_STEPS @@ -784,6 +798,8 @@ LICENSE + KEYWORDS + LOCALIZATIONS @@ -811,7 +827,7 @@ VALUE PATH - Text/Readme.rtf + ../Readme.rtf PATH_TYPE 1 @@ -839,40 +855,11 @@ PROJECT_REQUIREMENTS LIST - - - BEHAVIOR - 3 - DICTIONARY - - IC_REQUIREMENT_OS_DISK_TYPE - 1 - IC_REQUIREMENT_OS_DISTRIBUTION_TYPE - 0 - IC_REQUIREMENT_OS_MINIMUM_VERSION - 101100 - - IC_REQUIREMENT_CHECK_TYPE - 0 - IDENTIFIER - fr.whitebox.Packages.requirement.os - MESSAGE - - - LANGUAGE - English - SECONDARY_VALUE - This driver can only be installed on macOS 10.11 or later. - VALUE - Operating System Version Too Low - - - NAME - Operating System - STATE - - - + + POSTINSTALL_PATH + + PREINSTALL_PATH + RESOURCES ROOT_VOLUME_ONLY @@ -880,6 +867,8 @@ PROJECT_SETTINGS + ADVANCED_OPTIONS + BUILD_FORMAT 0 BUILD_PATH @@ -889,6 +878,13 @@ PATH_TYPE 1 + CERTIFICATE + + NAME + Developer ID Installer: Colin Munro + PATH + /Users/colin/Library/Keychains/login.keychain + EXCLUDED_FILES @@ -1059,10 +1055,6 @@ NAME Install360Controller - PAYLOAD_ONLY - - TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING - TYPE diff --git a/Install360Controller/Scripts/finish.sh b/Install360Controller/Scripts/finish.sh index ed1fa640..6f058a87 100644 --- a/Install360Controller/Scripts/finish.sh +++ b/Install360Controller/Scripts/finish.sh @@ -1,11 +1,5 @@ #!/bin/sh -#This is to fix a bug in Yosemite. -/bin/ln -s /Library/Extensions/360Controller.kext /System/Library/Extensions/ - /usr/bin/touch /System/Library/Extensions -/usr/bin/touch /Library/Extensions - -/bin/launchctl load -w /Library/LaunchDaemons/com.mice.360Daemon.plist exit 0 diff --git a/Install360Controller/Scripts/upgrade.sh b/Install360Controller/Scripts/upgrade.sh index f52ff5fc..c0283260 100644 --- a/Install360Controller/Scripts/upgrade.sh +++ b/Install360Controller/Scripts/upgrade.sh @@ -2,28 +2,19 @@ # Clear out daemon -# Startup Items is deprecated, should this be removed? -# the daemon is already been launched using launchctl and this folder doent appear to be created anymore. -# https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/StartupItems.html if [ -d /Library/StartupItems/360ControlDaemon ]; then /bin/rm -r /Library/StartupItems/360ControlDaemon fi if [ -f /Library/LaunchDaemons/com.mice.360Daemon.plist ]; then launchctl stop com.mice.360Daemon - launchctl unload /Library/LaunchDaemons/com.mice.360Daemon.plist /bin/rm /Library/LaunchDaemons/com.mice.360Daemon.plist fi -# this folder doesnt appear to be created in recent versions too if [ -d /Library/Application\ Support/MICE/360Daemon ]; then /bin/rm -r /Library/Application\ Support/MICE/360Daemon fi -if [ -d /Library/Application\ Support/MICE/360Daemon.app ]; then - /bin/rm -r /Library/Application\ Support/MICE/360Daemon.app -fi - # Remove preference pane if [ -d /Library/PreferencePanes/Pref360Control.prefPane ]; then @@ -33,42 +24,15 @@ fi # Remove drivers if [ -d /System/Library/Extensions/360Controller.kext ]; then - kextunload /System/Library/Extensions/360Controller.kext /bin/rm -r /System/Library/Extensions/360Controller.kext fi if [ -d /System/Library/Extensions/Wireless360Controller.kext ]; then - kextunload /System/Library/Extensions/Wireless360Controller.kext /bin/rm -r /System/Library/Extensions/Wireless360Controller.kext fi if [ -d /System/Library/Extensions/WirelessGamingReceiver.kext ]; then - kextunload /System/Library/Extensions/WirelessGamingReceiver.kext /bin/rm -r /System/Library/Extensions/WirelessGamingReceiver.kext fi -# Mavericks and later - -if [ -d /Library/Extensions/360Controller.kext ]; then - kextunload /Library/Extensions/360Controller.kext - /bin/rm -r /Library/Extensions/360Controller.kext -fi - -if [ -d /Library/Extensions/Wireless360Controller.kext ]; then - kextunload /Library/Extensions/Wireless360Controller.kext - /bin/rm -r /Library/Extensions/Wireless360Controller.kext -fi - -if [ -d /Library/Extensions/WirelessGamingReceiver.kext ]; then - kextunload /Library/Extensions/WirelessGamingReceiver.kext - /bin/rm -r /Library/Extensions/WirelessGamingReceiver.kext -fi - -# Remove bluetooth driver - -if [ -d /Library/Extensions/XboxOneBluetooth.kext ]; then - kextunload /Library/Extensions/XboxOneBluetooth.kext - /bin/rm -r /Library/Extensions/XboxOneBluetooth.kext -fi - exit 0 diff --git a/Install360Controller/Text/Readme.rtf b/Install360Controller/Text/Readme.rtf deleted file mode 100644 index 2fe80874..00000000 --- a/Install360Controller/Text/Readme.rtf +++ /dev/null @@ -1,77 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170 -{\fonttbl\f0\fswiss\fcharset0 Helvetica;} -{\colortbl;\red255\green255\blue255;\red0\green0\blue128;\red128\green128\blue128;} -\paperw11905\paperh16837\margl1134\margr567\margb567\margt567\vieww10800\viewh8400\viewkind0 -\deftab720 -\pard\pardeftab720\sb240\sa283 - -\f0\b\fs42 \cf0 Xbox 360 Controller Driver\ -\pard\pardeftab720\sb200\sa120 - -\fs36 \cf0 About\ -\pard\pardeftab720\sa283 - -\b0\fs24 \cf0 This driver supports the -\b Microsoft Xbox 360 controller, Original Xbox Controller, Xbox One Controller -\b0 , and various licensed third party controllers from brands like Hori, MadCatz, Logitech, etc. Including access to rumble motors and LEDs, on the macOS platform. It includes a plugin for the Apple Force Feedback Framework so some games will be able to activate them, along with a Preference Pane with which allows you to test everything is installed correctly. Both wire controllers connected via USB and Bluetooth Xbox One S controllers. Wireless 360 controllers, connected via the Wireless Gaming Receiver for Windows, are NOT supported.\ -This project is a fork of the {\field{\*\fldinst{HYPERLINK "http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller"}}{\fldrslt \cf2 \ul \ulc0 Xbox360Controller project}} originally created by Colin Munro, and includes hard work from {\field{\*\fldinst{HYPERLINK "https://github.com/d235j/"}}{\fldrslt d235j}} (who forked the project and fixed Force Feedback), {\field{\*\fldinst{HYPERLINK "https://github.com/MaddTheSane"}}{\fldrslt C.W. Betts}} (dozens of improvements and fixes!), {\field{\*\fldinst{HYPERLINK "https://github.com/FranticRain"}}{\fldrslt FranticRain}} (Xbox One Controller support and other improvements), {\field{\*\fldinst{HYPERLINK "https://github.com/kasbert"}}{\fldrslt kasbert}} (Original Xbox Controller Support), {\field{\*\fldinst{HYPERLINK "https://github.com/Pyroh"}}{\fldrslt Pyroh}} (User Interface overhaul), {\field{\*\fldinst{HYPERLINK "https://github.com/RodrigoCard"}}{\fldrslt RodrigoCard}} (kext sign and some scripts) and others (please forgive us if we forgot to include someone).\ -\pard\pardeftab720\sb200\sa120 - -\b\fs36 \cf0 Installation\ -\pard\pardeftab720\sa283 - -\b0\fs24 \cf0 See the {\field{\*\fldinst{HYPERLINK "https://github.com/360Controller/360Controller/releases"}}{\fldrslt \cf2 \ul \ulc0 releases page}} for the latest compiled and signed version of the driver. Most users will want to install and run this.\ -If you are interested in installing as a developer please see below.\ -\pard\pardeftab720\sb200\sa120 - -\b\fs36 \cf0 Usage\ -\pard\pardeftab720\sa283 - -\b0\fs24 \cf0 The driver exposes a standard game pad with a number of standard controls, so any game that supports gaming devices should work. In some cases this may need an update from the manufacturer of the game or a patched version. The Preference Pane uses the standard macOS Frameworks for accessing HID devices and accessing Force Feedback capabilities, so should be a good test that the installation is functional.\ -\pard\pardeftab720\sb200\sa120 - -\b\fs36 \cf0 Developer info\ -\pard\pardeftab720\sa283 - -\b0\fs24 \cf0 Anything below this probably doesn't affect end users, so you can stop reading now if you just want to use the driver.\ -\pard\pardeftab720\sb140\sa120 - -\b\fs28 \cf0 Building\cf3 \ -\pard\pardeftab720\sa283 - -\b0\fs24 \cf0 You'll need the full xcode installed via the app store. The command line tools are not enough.\ -From the command line, run: ./build.sh\ -If you'd like to build the .pkg file, there is an installer project for Packages. Download packages at {\field{\*\fldinst{HYPERLINK "http://s.sudre.free.fr/Software/Packages/about.html"}}{\fldrslt \cf2 \ul \ulc0 http://s.sudre.free.fr/Software/Packages/about.html}} and the resulting dmg file will be copied to the build directory.\ -The distribution currently consists of 3 projects - one for the driver (implemented in C++, as an I/O Kit C++ class), one for the force feedback support plugin (implemented in C, as an I/O Kit COM plugin) and one for the Preference Pane (implemented in Objective C as a preference pane plugin). Ideally these 3 targets should be in the same project, but I've not worked on this yet.\ -To build, use the standard Xcode build for Deployment on each of the 3 projects. Build Feedback360 before 360Controller, as the 360Controller project includes a script to copy the Feedback360 bundle to the correct place in the .kext to make it work.\ -To debug the driver, sudo cp -R 360Controller.kext /tmp/ to assign the correct properties - note that the Force Feedback plugin only seems to be found by OSX if the driver is in /System/Library/Extensions so I could only debug it in place.\ -To test the Preference Pane, just double-click the resulting file.\ -\pard\pardeftab720\sb140\sa120 - -\b\fs28 \cf0 Yosemite and signed drivers\ -\pard\pardeftab720\sa283 - -\b0\fs24 \cf0 Since Yosemite (Mac OS X 10.10) all global kexts are required to be signed. This means if you want to build the drivers and install locally, you need to have a mac developer account.\ -If you'd like to avoid paying apple for the developer account and want to disable the signature checking, execute the following commands inside a terminal:\ -\pard\pardeftab720 - -\fs20 \cf0 sudo nvram boot-args="kext-dev-mode=1"\ -\pard\pardeftab720\sa283 -\cf0 sudo kextcache -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions\ -\pard\pardeftab720\sa283 - -\fs24 \cf0 Note that this is probably a bad idea unless you understand the implications of running unsigned driver code.\ -\pard\pardeftab720\sb140\sa120 - -\b\fs28 \cf0 Debugging\cf3 \ -\pard\pardeftab720\sa283 - -\b0\fs24 \cf0 Most of the debugging I did was via printing out text. In 360Controller, you can use IOLog(), and the output will appear in system.log. In Feedback360 normal fprintf(stderr,...), and the output will appear on the console of whatever application is attempting to use Force Feedback. In Pref360Control, NSLog() works as it's an Objective C program, and will output to the console of the Preferences application.\ -\pard\pardeftab720\sb200\sa120 - -\b\fs36 \cf0 Licence\ -\pard\pardeftab720\sa283 - -\b0\fs24 \cf0 Copyright (C) 2006-2013 Colin Munro\ -This driver is licensed under the GNU Public License. A copy of this license is included in the distribution file, please inspect it before using the binary or source.\ -} diff --git a/Install360Controller/Text/Welcome.rtf b/Install360Controller/Text/Welcome.rtf index 0f8c2807..5ebcf3d6 100644 --- a/Install360Controller/Text/Welcome.rtf +++ b/Install360Controller/Text/Welcome.rtf @@ -1,7 +1,6 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf200 -{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} +{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} -{\*\expandedcolortbl;;} {\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1} {\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2} {\list\listtemplateid3\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid201\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid3} @@ -12,462 +11,138 @@ {\list\listtemplateid8\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid701\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid8} {\list\listtemplateid9\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid801\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid9} {\list\listtemplateid10\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid901\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid10} -{\list\listtemplateid11\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1001\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid11} -{\list\listtemplateid12\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid12} -{\list\listtemplateid13\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1201\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid13} -{\list\listtemplateid14\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1301\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid14} -{\list\listtemplateid15\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1401\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid15} -{\list\listtemplateid16\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1501\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid16} -{\list\listtemplateid17\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1601\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid17} -{\list\listtemplateid18\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1701\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid18} -{\list\listtemplateid19\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1801\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid19} -{\list\listtemplateid20\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1901\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid20} -{\list\listtemplateid21\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid2001\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid21} -{\list\listtemplateid22\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid2101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid22} -{\list\listtemplateid23\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid2201\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid23} -{\list\listtemplateid24\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid2301\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid24} -{\list\listtemplateid25\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid2401\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid25} -{\list\listtemplateid26\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid2501\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid26} -{\list\listtemplateid27\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid2601\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid27} -{\list\listtemplateid28\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid2701\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid28} -{\list\listtemplateid29\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid2801\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid29} -{\list\listtemplateid30\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid2901\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid30} -{\list\listtemplateid31\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid3001\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid31} -{\list\listtemplateid32\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid3101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid32}} -{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}{\listoverride\listid7\listoverridecount0\ls7}{\listoverride\listid8\listoverridecount0\ls8}{\listoverride\listid9\listoverridecount0\ls9}{\listoverride\listid10\listoverridecount0\ls10}{\listoverride\listid11\listoverridecount0\ls11}{\listoverride\listid12\listoverridecount0\ls12}{\listoverride\listid13\listoverridecount0\ls13}{\listoverride\listid14\listoverridecount0\ls14}{\listoverride\listid15\listoverridecount0\ls15}{\listoverride\listid16\listoverridecount0\ls16}{\listoverride\listid17\listoverridecount0\ls17}{\listoverride\listid18\listoverridecount0\ls18}{\listoverride\listid19\listoverridecount0\ls19}{\listoverride\listid20\listoverridecount0\ls20}{\listoverride\listid21\listoverridecount0\ls21}{\listoverride\listid22\listoverridecount0\ls22}{\listoverride\listid23\listoverridecount0\ls23}{\listoverride\listid24\listoverridecount0\ls24}{\listoverride\listid25\listoverridecount0\ls25}{\listoverride\listid26\listoverridecount0\ls26}{\listoverride\listid27\listoverridecount0\ls27}{\listoverride\listid28\listoverridecount0\ls28}{\listoverride\listid29\listoverridecount0\ls29}{\listoverride\listid30\listoverridecount0\ls30}{\listoverride\listid31\listoverridecount0\ls31}{\listoverride\listid32\listoverridecount0\ls32}} -\margl1440\margr1440\vieww10240\viewh12600\viewkind0 -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +{\list\listtemplateid11\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1001\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid11}} +{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}{\listoverride\listid7\listoverridecount0\ls7}{\listoverride\listid8\listoverridecount0\ls8}{\listoverride\listid9\listoverridecount0\ls9}{\listoverride\listid10\listoverridecount0\ls10}{\listoverride\listid11\listoverridecount0\ls11}} +\paperw12240\paperh15840\margl1440\margr1440\vieww14760\viewh12840\viewkind0 +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural -\f0\b\fs42 \cf0 Xbox 360 Controller Driver\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +\f0\b\fs42 \cf0 XBox 360 Controller Driver\ -\f1\b0\fs24 \cf0 Version 0.16.11\ -Copyright \'a9 2005\'962013 Colin Munro\ -Copyright \'a9 2013\'962019 {\field{\*\fldinst{HYPERLINK "https://github.com/360Controller/360Controller/graphs/contributors"}}{\fldrslt 360Controller contributors}}\ +\b0\fs24 Version 0.12\ +Copyright (C) 2005-2013 Colin Munro\ +\ +Welcome to the installer for the XBox 360 Controller driver for Mac OS X.\ \ -Welcome to the installer for the Xbox 360 Controller driver for macOS.\ - -\f0\b \ -Update 0.16.11: 03/03/2019\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\cf0 \'95 Chinese localization\ - \'95 Add various new devices -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.16.10: 10/09/2018\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\cf0 \'95 Adds removal of Bluetooth kexts to installer, to prevent carry-over hangs on boot\ - \'95 Removed wireless 360 kexts that snuck back in to the install\ - \'95 Add various new devices -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.16.9: 09/15/2018\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\cf0 \'95 Resolves issues with hang in boot after installation\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\ls1\ilvl0\cf0 {\listtext \uc0\u8226 } -\f0\b Removes all hooks for Bluetooth controllers -\f1\b0 (Caused hang in boot)\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\cf0 \'95 Fixed an issue where Xbox One racing wheel pedals didn't work correctly\ - \'95 Add various new devices -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.16.8: 05/31/2018\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\cf0 \'95 Fixes for Xbox One guide button issues\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\ls2\ilvl0\cf0 {\listtext \uc0\u8226 }Fixes force feedback issues present since 0.16.6\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\cf0 \'95 Issues involving settings failing to be saved should be resolved\ - \'95 Appropriate rumble options should now be visible for Xbox One controllers in the preference pane -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.16.7: 05/16/2018\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\cf0 \'95 DMG fixes for macOS earlier than 10.13\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\ls3\ilvl0\cf0 {\listtext \uc0\u8226 }New devices -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.16.6: 04/03/2018\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 - -\f0\b \cf0 \'95 REMOVED XBOX 360 WIRELESS DRIVER -\f1\b0 \ - \'95 Enhancements for Bluetooth Xbox One S controllers\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\ls4\ilvl0\cf0 {\listtext \uc0\u8226 }Preferences should properly save now\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\ls4\ilvl0 -\f0\b \cf0 {\listtext \uc0\u8226 } -\f1\b0 New devices -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.16.5: 04/18/2017\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\cf0 \'95 New devices -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.16.4: 08/28/2016\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\cf0 \'95 Tons of new devices including the wired version of the new Xbox One controller\ - \'95 Third party Xbox 360 controllers can pretend to be Microsoft ones for better game compatibility\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\ls5\ilvl0\cf0 {\listtext \uc0\u8226 }Wireless controllers show a raw battery percentage value now\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\cf0 \'95 Preference pane doesn't complain about constraints in the Console anymore\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\ls6\ilvl0\cf0 {\listtext \uc0\u8226 }Xbox One racing wheel support\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\cf0 \'95 Enable/disable feature is more stable -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.16.3: 07/14/2016\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\ls7\ilvl0\cf0 {\listtext \uc0\u8226 }Actually resolves issue with Xbox One controller initialization\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\cf0 \'95 Third party Xbox One controllers still don't work, though -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.16.2: 07/09/2016\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\ls8\ilvl0\cf0 {\listtext \uc0\u8226 }Potentially resolves issue with Xbox One controller initialization -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.16.1: 07/06/2016\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\ls9\ilvl0\cf0 {\listtext \uc0\u8226 }New devices\ -{\listtext \uc0\u8226 }Fixed "normalize" not staying checked -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.16: 04/26/2016\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\ls10\ilvl0\cf0 {\listtext \uc0\u8226 }New devices\ -{\listtext \uc0\u8226 }The remapping tool is more robust\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls11\ilvl0\cf0 {\listtext \uc0\u8226 }Remapping works on wireless 360 controllers\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls11\ilvl0 -\f0\b \cf0 {\listtext \uc0\u8226 } -\f1\b0 Settings load properly\ -\ls11\ilvl0 -\f0\b {\listtext \uc0\u8226 } -\f1\b0 Xbox One controller pretends to be a 360 controller better ("Xbox One Controller (Xbox 360)" -> "Xbox 360 Wired Controller")\ -\ls11\ilvl0 -\f0\b {\listtext \uc0\u8226 } -\f1\b0 New rumble options for Xbox One controllers\ -\ls11\ilvl0 -\f0\b {\listtext \uc0\u8226 }OFFICIAL!\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.15 (beta 6): 04/09/2016\ -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 - -\f1\b0 \cf0 This update includes:\ -\pard\tx220\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\pardirnatural\partightenfactor0 -\ls12\ilvl0\cf0 {\listtext \uc0\u8226 }New wired Xbox One devices\ -{\listtext \uc0\u8226 }New Xbox 360 devices -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.15 (beta 5): 01/25/2016\ - -\f1\b0 This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls13\ilvl0\cf0 {\listtext \uc0\u8226 }Fixed Xbox One Elite implementation.\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls13\ilvl0 -\f0\b \cf0 {\listtext \uc0\u8226 } -\f1\b0 Fix Xbox One rumble. -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.15 (beta 4): 01/14/2016\ - -\f1\b0 This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls14\ilvl0\cf0 {\listtext \uc0\u8226 }Added fix for Rock Candy Xbox One controllers.\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls14\ilvl0 -\f0\b \cf0 {\listtext \uc0\u8226 } -\f1\b0 Added various new Xbox 360 controllers.\ -\ls14\ilvl0 -\f0\b {\listtext \uc0\u8226 } -\f1\b0 Xbox One controllers no longer pretend to be 360 controllers.\ -\ls14\ilvl0 -\f0\b {\listtext \uc0\u8226 } -\f1\b0 Added support for the Xbox One Elite controller. -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.15 (beta 3): 09/15/2015\ - -\f1\b0 This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls15\ilvl0\cf0 {\listtext \uc0\u8226 }Removed Wireless Controller Remapping temporarily, as it was causing problems with these controllers\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 - -\f0\b \cf0 \ -Update 0.15 (beta 2): 08/28/2015\ - -\f1\b0 This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls16\ilvl0\cf0 {\listtext \uc0\u8226 }New Xbox One Controller (2015 model) Support\ -{\listtext \uc0\u8226 }Swappable sticks\ -{\listtext \uc0\u8226 }A few more devices\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 - -\f0\b \cf0 \ -Update 0.15 (beta): 07/28/2015\ - -\f1\b0 This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls17\ilvl0\cf0 {\listtext \uc0\u8226 }Completely reworked User Interface by {\field{\*\fldinst{HYPERLINK "https://github.com/Pyroh"}}{\fldrslt Pyroh}}\ -{\listtext \uc0\u8226 }Xbox One Controller Support with Force Feedback by {\field{\*\fldinst{HYPERLINK "https://github.com/FranticRain"}}{\fldrslt FranticRain}}.\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls17\ilvl0 -\f0\b \cf0 {\listtext \uc0\u8226 } -\f1\b0 Added dozens of device IDs provided by users, so most of Xbox compatible controllers should work\ -\ls17\ilvl0 -\f0\b {\listtext \uc0\u8226 } -\f1\b0 Swappable button ids and Deadzone adjustment improvements by FranticRain\ -\ls17\ilvl0 -\f0\b {\listtext \uc0\u8226 } -\f1\b0 General bug fixes and improvements mostrly from {\field{\*\fldinst{HYPERLINK "https://github.com/MaddTheSane/"}}{\fldrslt C.W. Betts}}\ -\ls17\ilvl0 -\f0\b {\listtext \uc0\u8226 } -\f1\b0 You can now temporarily disable or completely uninstall the driver from the Preference Panel itself by {\field{\*\fldinst{HYPERLINK "https://github.com/RodrigoCard"}}{\fldrslt RodrigoCard}}. -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.14: 12/23/2014\ - -\f1\b0 This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls18\ilvl0\cf0 {\listtext \uc0\u8226 }Fixes Force Feedback and the controller lights that were broken on the beta\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls18\ilvl0 -\f0\b \cf0 {\listtext \uc0\u8226 } -\f1\b0 Bug fixes for Force feedback with < 1 second duration\ -\ls18\ilvl0 -\f0\b {\listtext \uc0\u8226 } -\f1\b0 Bug fixes for some devices\ -{\listtext \uc0\u8226 }Fixed the compilation of 32bit code.\ -\ls18\ilvl0 -\f0\b {\listtext \uc0\u8226 } -\f1\b0 Original Xbox's Controller Support with Force Feedback -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.14 (beta): 10/30/2014\ - -\f1\b0 This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls19\ilvl0\cf0 {\listtext \uc0\u8226 }Cocoa code modernization by C.W. Betts. This includes synthesized getters/setters, KVO/KVC, and migration to ARC.\ -{\listtext \uc0\u8226 }General code readability improvements\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls19\ilvl0 -\f0\b \cf0 {\listtext \uc0\u8226 } -\f1\b0 Better handling of feedback effects\ -{\listtext \uc0\u8226 }Force Feedback is currently broken in this beta, {\field{\*\fldinst{HYPERLINK "https://github.com/360Controller/360Controller/issues/22"}}{\fldrslt apparently due to an upstream Apple bug}}\ -\ls19\ilvl0 -\f0\b {\listtext \uc0\u8226 } -\f1\b0 Updated code signing to be compatible with 10.10 Yosemite\ -\ls19\ilvl0 -\f0\b {\listtext \uc0\u8226 } -\f1\b0 Package and Kexts Signed by {\field{\*\fldinst{HYPERLINK "https://twitter.com/RodrigoRodrigoR"}}{\fldrslt Rodrigo C. Rocha}} -\f0\b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -Update 0.13.1: 10/11/2013\ - -\f1\b0 This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls20\ilvl0\cf0 {\listtext \uc0\u8226 }Fix for kernel panics when Android File Transfer is also installed\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 - -\f0\b \cf0 \ -Update 0.13: 9/29/2013\ - -\f1\b0 \ -This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls21\ilvl0\cf0 {\listtext \uc0\u8226 }Near-total rewrite of the Feedback component\ -{\listtext \uc0\u8226 }Bug fixes in the preference pane\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ -\f0\b Update 0.12: 4/01/2013\ +\b Update 0.12: 4/01/2013\ -\f1\b0 \ +\b0 \ This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls22\ilvl0\cf0 {\listtext \uc0\u8226 }Fix that prevents non-ChatPad-compatible controllers from working\ -{\listtext \uc0\u8226 }Improvement to ChatPad support\ -{\listtext \uc0\u8226 }Improvement to wireless support (automatic and manual power-off)\ -{\listtext \uc0\u8226 }Updated Info.plist with many common devices\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls1\ilvl0\cf0 {\listtext \'95 }Fix that prevents non-ChatPad-compatible controllers from working\ +{\listtext \'95 }Improvement to ChatPad support\ +{\listtext \'95 }Improvement to wireless support (automatic and manual power-off)\ +{\listtext \'95 }Updated Info.plist with many common devices\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural \cf0 \ -\f0\b Update 0.11: 10/01/2012\ +\b Update 0.11: 10/01/2012\ -\f1\b0 \ +\b0 \ This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls23\ilvl0\cf0 {\listtext \uc0\u8226 }Temporary Lion fix (thanks to "codeman38")\ -{\listtext \uc0\u8226 }Adjustment to the automatic device match function\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls2\ilvl0\cf0 {\listtext \'95 }Temporary Lion fix (thanks to "codeman38")\ +{\listtext \'95 }Adjustment to the automatic device match function\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural \cf0 \ -\f0\b Update 0.10: 8/05/2011\ +\b Update 0.10: 8/05/2011\ -\f1\b0 \ +\b0 \ This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls24\ilvl0\cf0 {\listtext \uc0\u8226 }Various bugfixes\ -{\listtext \uc0\u8226 }New product IDs for Wireless Gaming Receiver\ -{\listtext \uc0\u8226 }Automatic device match function, allowing you to select and deselect which controllers you want it to match with\ -{\listtext \uc0\u8226 }Fix the incompatibility with Bioshock introduced with ChatPad support\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls3\ilvl0\cf0 {\listtext \'95 }Various bugfixes\ +{\listtext \'95 }New product IDs for Wireless Gaming Receiver\ +{\listtext \'95 }Automatic device match function, allowing you to select and deselect which controllers you want it to match with\ +{\listtext \'95 }Fix the incompatibility with Bioshock introduced with ChatPad support\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural \cf0 \ -\f0\b Update 0.09: 21/11/2009\ +\b Update 0.09: 21/11/2009\ -\f1\b0 \ +\b0 \ This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls25\ilvl0\cf0 {\listtext \uc0\u8226 }Driver rearchitecture\ -{\listtext \uc0\u8226 }ChatPad support in wired controller\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls4\ilvl0\cf0 {\listtext \'95 }Driver rearchitecture\ +{\listtext \'95 }ChatPad support in wired controller\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural -\f0\b \cf0 \ +\b \cf0 \ Update 0.08: 10/09/2009\ -\f1\b0 \ +\b0 \ This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls26\ilvl0\cf0 {\listtext \uc0\u8226 }64-bit support (untested)\ -{\listtext \uc0\u8226 }Fix for Snow Leopard\ -{\listtext \uc0\u8226 }Minor bugfixes\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls5\ilvl0\cf0 {\listtext \'95 }64-bit support (untested)\ +{\listtext \'95 }Fix for Snow Leopard\ +{\listtext \'95 }Minor bugfixes\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural \cf0 \ -\f0\b Update 0.07: 16/12/2007\ +\b Update 0.07: 16/12/2007\ -\f1\b0 \ +\b0 \ This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls27\ilvl0\cf0 {\listtext \uc0\u8226 }10.4 bugfix\ -{\listtext \uc0\u8226 }Extra controller IDs\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls6\ilvl0\cf0 {\listtext \'95 }10.4 bugfix\ +{\listtext \'95 }Extra controller IDs\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural \cf0 \ -\f0\b Update 0.06: 10/11/2007 -\f1\b0 \ +\b Update 0.06: 10/11/2007 +\b0 \ \ This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls28\ilvl0\cf0 {\listtext \uc0\u8226 }Improvements to the wireless support\ -{\listtext \uc0\u8226 }Daemon providing persistent settings and LED setting\ -{\listtext \uc0\u8226 }Bugfix to support Halo\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls7\ilvl0\cf0 {\listtext \'95 }Improvements to the wireless support\ +{\listtext \'95 }Daemon providing persistent settings and LED setting\ +{\listtext \'95 }Bugfix to support Halo\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural \cf0 \ -\f0\b Update 0.05: 21/4/2007 -\f1\b0 \ +\b Update 0.05: 21/4/2007 +\b0 \ \ This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls29\ilvl0\cf0 {\listtext \uc0\u8226 }Improvements to the wireless support\ -{\listtext \uc0\u8226 }New increased compatibility with games\ -{\listtext \uc0\u8226 }Support for the Guitar Hero controller\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls8\ilvl0\cf0 {\listtext \'95 }Improvements to the wireless support\ +{\listtext \'95 }New increased compatibility with games\ +{\listtext \'95 }Support for the Guitar Hero controller\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural \cf0 \ -\f0\b Update 0.04: 27/2/2007\ +\b Update 0.04: 27/2/2007\ -\f1\b0 \ +\b0 \ This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls30\ilvl0\cf0 {\listtext \uc0\u8226 }Driver for the Microsoft Wireless Gaming Receiver for Windows\ -{\listtext \uc0\u8226 }Driver for the above to use the Wireless 360 Controller\ -{\listtext \uc0\u8226 }Updates to the Preference Pane to support the Wireless 360 Controller\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls9\ilvl0\cf0 {\listtext \'95 }Driver for the Microsoft Wireless Gaming Receiver for Windows\ +{\listtext \'95 }Driver for the above to use the Wireless 360 Controller\ +{\listtext \'95 }Updates to the Preference Pane to support the Wireless 360 Controller\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural \cf0 \ -\f0\b Update 0.03: 22/7/2006\ +\b Update 0.03: 22/7/2006\ -\f1\b0 \ +\b0 \ This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls31\ilvl0\cf0 {\listtext \uc0\u8226 }More 3rd party vendor/product IDs\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls10\ilvl0\cf0 {\listtext \'95 }More 3rd party vendor/product IDs\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural \cf0 \ -\f0\b Update 0.02: 11/2/2006 -\f1\b0 \ +\b Update 0.02: 11/2/2006 +\b0 \ \ This update includes:\ -\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural\partightenfactor0 -\ls32\ilvl0\cf0 {\listtext \uc0\u8226 }Universal binaries, for Intel Mac support\ -{\listtext \uc0\u8226 }Additional 3rd party vendor/product IDs (support for matching on interface instead of IDs still isn't working)\ -{\listtext \uc0\u8226 }Preference Pane now correctly detects devices being connected/disconnected\ -{\listtext \uc0\u8226 }Alternative deadzone mode\ -{\listtext \uc0\u8226 }D-pad moved from pointer to plain joypad buttons, for better support in games\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls11\ilvl0\cf0 {\listtext \'95 }Universal binaries, for Intel Mac support\ +{\listtext \'95 }Additional 3rd party vendor/product IDs (support for matching on interface instead of IDs still isn't working)\ +{\listtext \'95 }Preference Pane now correctly detects devices being connected/disconnected\ +{\listtext \'95 }Alternative deadzone mode\ +{\listtext \'95 }D-pad moved from pointer to plain joypad buttons, for better support in games\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural \cf0 \ Please visit {\field{\*\fldinst{HYPERLINK "http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver"}}{\fldrslt http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver}} for information on this software. Consider donating or buying via the Amazon associate links to support development of this driver!\ \ - -\f0\b Update: -\f1\b0 Since the version 0.13 you can find new releases of this software here: {\field{\*\fldinst{HYPERLINK "https://github.com/360Controller/360Controller/releases/"}}{\fldrslt https://github.com/360Controller/360Controller/releases/}} , this is a fork of the driver initially developed by TattieBogle.\ -\ Ensure to read the following Read Me and License sections before installing!} \ No newline at end of file diff --git a/Install360Controller/makedmg.sh b/Install360Controller/makedmg.sh deleted file mode 100755 index 3ad3cb1d..00000000 --- a/Install360Controller/makedmg.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -hdiutil create -volname 360ControllerInstall -srcfolder ./build -ov -fs HFS+ -format UDZO 360ControllerInstall.dmg diff --git a/Install360Controller/notarize.sh b/Install360Controller/notarize.sh deleted file mode 100755 index 1461836e..00000000 --- a/Install360Controller/notarize.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -DEV_EMAIL=`echo | grep DEVELOPER_EMAIL ../DeveloperSettings.xcconfig` -NOTARIZATION_PASSWORD=`echo | grep NOTARIZATION_PASSWORD ../DeveloperSettings.xcconfig` -DMG_NAME=`echo | ls | grep '360ControllerInstall.*.dmg'` -USERNAME="${DEV_EMAIL//\DEVELOPER_EMAIL = }" -PASSWORD="${NOTARIZATION_PASSWORD//\NOTARIZATION_PASSWORD = }" - -xcrun altool --notarize-app --primary-bundle-id "com.mice.driver" --username ${USERNAME} --password ${PASSWORD} --file ${DMG_NAME} - diff --git a/Install360Controller/staple.sh b/Install360Controller/staple.sh deleted file mode 100755 index 87f6019b..00000000 --- a/Install360Controller/staple.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -DMG_NAME=`echo | ls | grep '360ControllerInstall.*.dmg'` -xcrun stapler staple ${DMG_NAME} -xcrun stapler validate ${DMG_NAME} - diff --git a/Pref360Control/BindingTableView.h b/Pref360Control/BindingTableView.h deleted file mode 100644 index 9d3a5e83..00000000 --- a/Pref360Control/BindingTableView.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// BindingTableView.h -// 360 Driver -// -// Created by Drew Mills on 1/30/15. -// - -#import - -@interface BindingTableView : NSObject - -@property NSArray *buttonArr; - -+ (NSTableView *)tableView; - -- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView; -- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex; - -@end diff --git a/Pref360Control/BindingTableView.m b/Pref360Control/BindingTableView.m deleted file mode 100644 index 38005301..00000000 --- a/Pref360Control/BindingTableView.m +++ /dev/null @@ -1,36 +0,0 @@ -// -// BindingTableView.m -// 360 Driver -// -// Created by Drew Mills on 1/30/15. -// - -#import "BindingTableView.h" -#import "MyWhole360ControllerMapper.h" - -@implementation BindingTableView - -static NSTableView *tblView; - -+ (NSTableView *)tableView { - return tblView; -} - -- (void)awakeFromNib { - _buttonArr = @[@"Up", @"Down", @"Left", @"Right", @"Start", @"Back", @"LS Click", @"RS Click", @"LB", @"RB", @"Guide", @"A", @"B", @"X", @"Y"]; -} - -- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { - tblView = tableView; - return [_buttonArr count]; -} - -- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { - if ([[aTableColumn identifier] isEqualToString:@"input"]) { - return [NSNumber numberWithInt:[MyWhole360ControllerMapper mapping][rowIndex]]; - } - else - return _buttonArr[rowIndex]; -} - -@end diff --git a/Pref360Control/DeviceItem.h b/Pref360Control/DeviceItem.h index 922c03d8..4c27482f 100644 --- a/Pref360Control/DeviceItem.h +++ b/Pref360Control/DeviceItem.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + DeviceItem.h - declaration of wrapper class for device handles - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -21,22 +21,24 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #import -#include -#include -#include -#include -#include -#import "Pref360ControlPref.h" - -@interface DeviceItem : NSObject -@property (strong, readonly) NSString *displayName; -@property (readonly) ControllerType controllerType; -@property (readonly) io_service_t rawDevice; -@property (readonly) FFDeviceObjectReference ffDevice; -@property (readonly) IOHIDDeviceInterface122 **hidDevice; - -+ (instancetype)allocateDeviceItemForDevice:(io_service_t)device; - -- (instancetype)initWithItemForDevice:(io_service_t)device; +#import +#import +#import +#import +#import + +@interface DeviceItem : NSObject { + IOHIDDeviceInterface122 **interface; + FFDeviceObjectReference forceFeedback; + io_service_t deviceHandle; + NSString *deviceName; +} + ++ allocateDeviceItemForDevice:(io_service_t)device; + +- (NSString*)name; +- (IOHIDDeviceInterface122**)hidDevice; +- (FFDeviceObjectReference)ffDevice; +- (io_service_t)rawDevice; @end diff --git a/Pref360Control/DeviceItem.m b/Pref360Control/DeviceItem.m index 9f0d7d63..2fba7cf9 100644 --- a/Pref360Control/DeviceItem.m +++ b/Pref360Control/DeviceItem.m @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + DeviceItem.m - implementation of device wrapper class - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -27,121 +27,74 @@ CFMutableDictionaryRef serviceProperties; NSDictionary *properties; NSString *deviceName = nil; - + if (IORegistryEntryCreateCFProperties(device, &serviceProperties, kCFAllocatorDefault, kNilOptions) != KERN_SUCCESS) return nil; - properties = CFBridgingRelease(serviceProperties); - deviceName = properties[@kIOHIDProductKey]; + properties = (NSDictionary*)serviceProperties; + deviceName = [properties objectForKey:(NSString*)CFSTR(kIOHIDProductKey)]; if (deviceName == nil) - deviceName = properties[@"USB Product Name"]; + deviceName = [properties objectForKey:@"USB Product Name"]; + [deviceName retain]; + CFRelease(serviceProperties); return deviceName; } -static ControllerType GetControllerType(io_service_t device) -{ - io_service_t parent; - CFMutableDictionaryRef serviceProperties; - - // Check for the DeviceData dictionary in device - if (IORegistryEntryCreateCFProperties(device, &serviceProperties, kCFAllocatorDefault, kNilOptions) == KERN_SUCCESS) - { - NSDictionary *properties = CFBridgingRelease(serviceProperties); - NSDictionary *deviceData = properties[@"DeviceData"]; - - if (deviceData != nil) - { - NSNumber *controllerType = deviceData[@"ControllerType"]; - if (controllerType != nil) - return (ControllerType)[controllerType intValue]; - } - } - - // Check for the DeviceData dictionary in the device's parent - if (IORegistryEntryGetParentEntry(device, kIOServicePlane, &parent) == KERN_SUCCESS) - { - if(IORegistryEntryCreateCFProperties(parent, &serviceProperties, kCFAllocatorDefault, kNilOptions) == KERN_SUCCESS) - { - NSDictionary *properties = CFBridgingRelease(serviceProperties); - NSDictionary *deviceData = properties[@"DeviceData"]; - - if (deviceData != nil) - { - NSNumber *controllerType = deviceData[@"ControllerType"]; - if (controllerType != nil) - return (ControllerType)[controllerType intValue]; - } - } - } - - NSLog(@"Error: couldn't find ControllerType"); - return Xbox360Controller; -} - -@interface DeviceItem () -@property (strong, readwrite) NSString *deviceName; -@property (readwrite) ControllerType controllerType; -@property (readwrite) io_service_t rawDevice; -@property (readwrite) FFDeviceObjectReference ffDevice; -@property (readwrite) IOHIDDeviceInterface122 **hidDevice; -@end - @implementation DeviceItem -@synthesize controllerType = controllerType; -@synthesize rawDevice = deviceHandle; -@synthesize ffDevice = forceFeedback; -@synthesize hidDevice = interface; -- (instancetype)initWithItemForDevice:(io_service_t)device ++ allocateDeviceItemForDevice:(io_service_t)device { - if (self = [super init]) { - IOReturn ret; - IOCFPlugInInterface **plugInInterface; - SInt32 score=0; - - ret = IOCreatePlugInInterfaceForService(device, kIOHIDDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &plugInInterface, &score); - if (ret != kIOReturnSuccess) { - return nil; - } - ret = (*plugInInterface)->QueryInterface(plugInInterface, CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID122), (LPVOID)&interface); - (*plugInInterface)->Release(plugInInterface); - if (ret != kIOReturnSuccess) { - return nil; - } - forceFeedback = 0; - FFCreateDevice(device, &forceFeedback); - self.rawDevice = device; - self.deviceName = GetDeviceName(device); - self.controllerType = GetControllerType(device); - } - return self; -} - -+ (instancetype)allocateDeviceItemForDevice:(io_service_t)device -{ - DeviceItem *item = [[[self class] alloc] initWithItemForDevice:device]; - - if (item) - return item; - + DeviceItem *item; + IOReturn ret; + IOCFPlugInInterface **plugInInterface; + SInt32 score=0; + + item=[[[DeviceItem alloc] init] autorelease]; + if(item==nil) goto fail; + ret=IOCreatePlugInInterfaceForService(device,kIOHIDDeviceUserClientTypeID,kIOCFPlugInInterfaceID,&plugInInterface,&score); + if(ret!=kIOReturnSuccess) goto fail; + ret=(*plugInInterface)->QueryInterface(plugInInterface,CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID122),(LPVOID)&item->interface); + (*plugInInterface)->Release(plugInInterface); + if(ret!=kIOReturnSuccess) goto fail; + item->forceFeedback=0; + FFCreateDevice(device,&item->forceFeedback); + item->deviceHandle=device; + item->deviceName = GetDeviceName(device); + return item; +fail: IOObjectRelease(device); - return nil; + return NULL; } - (void)dealloc { - if (deviceHandle) + if(deviceHandle != 0) IOObjectRelease(deviceHandle); - if (interface) + if(interface != NULL) (*interface)->Release(interface); - if (forceFeedback) + if(forceFeedback != 0) FFReleaseDevice(forceFeedback); + [deviceName release]; + [super dealloc]; +} + +- (NSString*)name +{ + return deviceName; } -- (NSString *)displayName { - if (self.deviceName == nil) - return @"Generic Controller"; - else - return self.deviceName; +- (IOHIDDeviceInterface122**)hidDevice +{ + return interface; +} + +- (FFDeviceObjectReference)ffDevice +{ + return forceFeedback; +} + +- (io_service_t)rawDevice +{ + return deviceHandle; } @end diff --git a/Pref360Control/DeviceLister.h b/Pref360Control/DeviceLister.h index b553cc1e..041f802a 100644 --- a/Pref360Control/DeviceLister.h +++ b/Pref360Control/DeviceLister.h @@ -1,21 +1,21 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + DeviceLister.h - decleration of a class to display supported devices - + This file is part of Xbox360Controller. - + Xbox360Controller is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + Xbox360Controller is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -24,9 +24,16 @@ @class Pref360ControlPref; -@interface DeviceLister : NSObject -@property (weak) IBOutlet NSWindow *sheet; -@property (weak) IBOutlet NSTableView *list; +@interface DeviceLister : NSObject { + Pref360ControlPref *owner; + IBOutlet NSWindow *sheet; + IBOutlet NSTableView *list; + + NSMutableDictionary *entries; + NSMutableArray *connected, *enabled; + + BOOL changed; +} - (void)showWithOwner:(Pref360ControlPref*)pane; - (IBAction)done:(id)sender; diff --git a/Pref360Control/DeviceLister.m b/Pref360Control/DeviceLister.m index 5e781985..027d4db7 100644 --- a/Pref360Control/DeviceLister.m +++ b/Pref360Control/DeviceLister.m @@ -1,48 +1,48 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + DeviceLister.m - implementation of a class to list supported devices - + This file is part of Xbox360Controller. - + Xbox360Controller is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + Xbox360Controller is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include +#import #import "DeviceLister.h" #import "Pref360ControlPref.h" #import "ControlPrefs.h" -#define TOOL_FILENAME @"DriverTool" - -#define Three60LocalizedString(key, comment) NSLocalizedStringWithDefaultValue(key, nil, [NSBundle bundleForClass:[self class]], key, comment) +#define TOOL_FILENAME @"DriverTool" // Get some sort of CF type for a field in the IORegistry static id GetDeviceValue(io_service_t device, NSString *key) { - CFTypeRef value = IORegistryEntrySearchCFProperty(device, kIOServicePlane, (__bridge CFStringRef)key, kCFAllocatorDefault, kIORegistryIterateRecursively); - - return CFBridgingRelease(value); + CFTypeRef value; + + value = IORegistryEntrySearchCFProperty(device, kIOServicePlane, (CFStringRef)key, kCFAllocatorDefault, kIORegistryIterateRecursively); + return [((NSObject*)value) autorelease]; } // Make sure a name is as nice as possible for eventually going into the XML for the driver static NSString* SanitiseName(NSString *name) { - NSMutableString *output = [[NSMutableString alloc] initWithCapacity:100]; - NSInteger i; - + NSMutableString *output; + int i; + + output = [NSMutableString stringWithCapacity:100]; for (i = 0; i < [name length]; i++) { unichar c = [name characterAtIndex:i]; @@ -52,7 +52,7 @@ static id GetDeviceValue(io_service_t device, NSString *key) continue; [output appendFormat:@"%C", c]; } - return [[NSString alloc] initWithString:output]; + return output; } // Get the Device interface for a given IO service @@ -62,7 +62,7 @@ static id GetDeviceValue(io_service_t device, NSString *key) IOUSBDeviceInterface **dev; IOReturn err; SInt32 score; - + if ((IOCreatePlugInInterfaceForService(device, kIOUSBDeviceUserClientTypeID, kIOCFPlugInInterfaceID, &iodev, &score) == kIOReturnSuccess) && (iodev != NULL)) { err = (*iodev)->QueryInterface(iodev, CFUUIDGetUUIDBytes(kIOUSBDeviceInterfaceID), (LPVOID)&dev); @@ -80,7 +80,7 @@ static id GetDeviceValue(io_service_t device, NSString *key) IOUSBInterfaceInterface **intf; IOReturn err; SInt32 score; - + if ((IOCreatePlugInInterfaceForService(interface, kIOUSBInterfaceUserClientTypeID, kIOCFPlugInInterfaceID, &iodev, &score) == kIOReturnSuccess) && (iodev != NULL)) { err = (*iodev)->QueryInterface(iodev, CFUUIDGetUUIDBytes(kIOUSBInterfaceInterfaceID), (LPVOID)&intf); @@ -92,7 +92,7 @@ static id GetDeviceValue(io_service_t device, NSString *key) } // List of interfaces we expect on a normal Microsoft controller -const struct ControllerInterface { +const struct { int numEndpoints; UInt8 classNum, subClassNum, protocolNum; } ControllerInterfaces[] = { @@ -104,27 +104,28 @@ static id GetDeviceValue(io_service_t device, NSString *key) }; // Detect if an IO service object is a Microsoft controller by running through and checking some things -static BOOL IsXbox360Controller(io_service_t device) +static BOOL IsXBox360Controller(io_service_t device) { - IOUSBDeviceInterface **interface = GetDeviceInterface(device); + IOUSBDeviceInterface **interface; IOUSBFindInterfaceRequest iRq; io_iterator_t iterator; io_service_t devInterface; IOUSBInterfaceInterface **interfaceInterface; - + int interfaceCount; UInt8 interfaceNum, classNum, subClassNum, protocolNum, endpointCount; - + BOOL devValid; // Get the interface to the device + interface = GetDeviceInterface(device); if (interface == NULL) return NO; (*interface)->GetDeviceClass(interface, &classNum); (*interface)->GetDeviceSubClass(interface, &subClassNum); (*interface)->GetDeviceProtocol(interface, &protocolNum); devValid = (classNum == 0xFF) && (subClassNum == 0xFF) && (protocolNum == 0xFF); - + // Search the interfaces iRq.bInterfaceClass = kIOUSBFindInterfaceDontCare; iRq.bInterfaceSubClass = kIOUSBFindInterfaceDontCare; @@ -145,10 +146,15 @@ static BOOL IsXbox360Controller(io_service_t device) (*interfaceInterface)->GetNumEndpoints(interfaceInterface, &endpointCount); if (interfaceNum < (sizeof(ControllerInterfaces) / sizeof(ControllerInterfaces[0]))) { - if ((ControllerInterfaces[interfaceNum].classNum == classNum) && - (ControllerInterfaces[interfaceNum].subClassNum == subClassNum) && - (ControllerInterfaces[interfaceNum].protocolNum == protocolNum) && - (ControllerInterfaces[interfaceNum].numEndpoints == endpointCount)) + if ( + (ControllerInterfaces[interfaceNum].classNum == classNum) + && + (ControllerInterfaces[interfaceNum].subClassNum == subClassNum) + && + (ControllerInterfaces[interfaceNum].protocolNum == protocolNum) + && + (ControllerInterfaces[interfaceNum].numEndpoints == endpointCount) + ) { // Found another interface in the right place interfaceCount++; @@ -160,50 +166,82 @@ static BOOL IsXbox360Controller(io_service_t device) } IOObjectRelease(iterator); } - + // Done (*interface)->Release(interface); - + return devValid && (interfaceCount >= 3); // Only 3 in case the security descriptor is missing? } -@interface DeviceLister () -@property (getter = isChanged) BOOL changed; -@property (strong) NSMutableDictionary *entries; -@property (weak) Pref360ControlPref *owner; -@end - @implementation DeviceLister -{ - NSMutableArray *connected, *enabled; -} -@synthesize list; -@synthesize sheet; -@synthesize changed; -@synthesize entries; -@synthesize owner; -- (instancetype)init +- init { if (self = [super init]) { - self.entries = [[NSMutableDictionary alloc] initWithCapacity:10]; - connected = [[NSMutableArray alloc] initWithCapacity:10]; - enabled = [[NSMutableArray alloc] initWithCapacity:10]; + entries = [[NSMutableDictionary dictionaryWithCapacity:10] retain]; + connected = [[NSMutableArray arrayWithCapacity:10] retain]; + enabled = [[NSMutableArray arrayWithCapacity:10] retain]; } return self; } +- (void)dealloc +{ + [entries release]; + [connected release]; + [enabled release]; + [super dealloc]; +} + - (NSString*)toolPath { // Find the path of our tool in our bundle - should it be in the driver's bundle? - return [[owner.bundle resourcePath] stringByAppendingPathComponent:TOOL_FILENAME]; + return [[[owner bundle] resourcePath] stringByAppendingPathComponent:TOOL_FILENAME]; } - (OSStatus)writeToolWithAuthorisation:(AuthorizationRef)authorisationRef { - // Pending major re-write, just return noErr - return noErr; + OSStatus result; + NSString *toolPath; + NSMutableArray *parameters; + const char **argv; + int i; + + toolPath = [self toolPath]; + + // Build array of parameters + parameters = [NSMutableArray arrayWithCapacity:10]; + [parameters addObject:@"edit"]; + + for (NSNumber *key in enabled) + { + NSString *name = [entries objectForKey:key]; + NSUInteger keyValue = [key unsignedIntValue]; + UInt16 vendor = (keyValue >> 16) & 0xFFFF; + UInt16 product = keyValue & 0xFFFF; + [parameters addObject:name]; + [parameters addObject:[NSString stringWithFormat:@"%i", vendor]]; + [parameters addObject:[NSString stringWithFormat:@"%i", product]]; + } + + // Convert parameters to a C array + argv = malloc(sizeof(char*) * ([parameters count] + 1)); + i = 0; + for (NSString *item in parameters) + argv[i++] = [item UTF8String]; + argv[i] = NULL; + + // Execute the command + result = AuthorizationExecuteWithPrivileges(authorisationRef, + [toolPath UTF8String], + kAuthorizationFlagDefaults, + (char**)argv, + NULL); + + // Done + free(argv); + return result; } - (NSString*)readTool @@ -213,32 +251,32 @@ - (NSString*)readTool NSData *data; NSString *response; NSArray *lines; - + // Prepare to run the tool - task = [[NSTask alloc] init]; + task = [[[NSTask alloc] init] autorelease]; [task setLaunchPath:[self toolPath]]; - + // Hook up the pipe to catch the output pipe = [NSPipe pipe]; [task setStandardOutput:pipe]; error = [NSPipe pipe]; [task setStandardError:error]; - + // Run the tool [task launch]; [task waitUntilExit]; - + // Check result if ([task terminationStatus] != 0) { data = [[error fileHandleForReading] readDataToEndOfFile]; - return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + return [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]; } - + // Read the data back data = [[pipe fileHandleForReading] readDataToEndOfFile]; - response = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - + response = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]; + // Parse the results lines = [response componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]]; for (NSString *line in lines) @@ -246,14 +284,14 @@ - (NSString*)readTool NSArray *values = [line componentsSeparatedByString:@","]; if ([values count] != 3) continue; - unsigned int vendor = [values[1] unsignedIntValue]; - unsigned int product = [values[2] unsignedIntValue]; - NSNumber *key = @((UInt32)((vendor << 16) | product)); + NSUInteger vendor = [[values objectAtIndex:1] intValue]; + NSUInteger product = [[values objectAtIndex:2] intValue]; + NSNumber *key = [NSNumber numberWithUnsignedInt:(int)((vendor << 16) | product)]; [enabled addObject:key]; - if (entries[key] == nil) - entries[key] = SanitiseName(values[0]); + if ([entries objectForKey:key] == nil) + [entries setObject:SanitiseName([values objectAtIndex:0]) forKey:key]; } - + return nil; } @@ -262,13 +300,13 @@ - (NSString*)readKnownDevices { NSDictionary *known; NSArray *keys; - + known = GetKnownDevices(); keys = [known allKeys]; for (NSNumber *key in keys) { - if (entries[key] == nil) - entries[key] = known[key]; + if ([entries objectForKey:key] == nil) + [entries setObject:[known objectForKey:key] forKey:key]; } return nil; } @@ -276,38 +314,40 @@ - (NSString*)readKnownDevices // Find any matching devices currently plugged in - (NSString*)readIOKit { - io_iterator_t iterator = 0; + io_iterator_t iterator; io_service_t object; - + + iterator = 0; IOServiceGetMatchingServices([owner masterPort], IOServiceMatching(kIOUSBDeviceClassName), &iterator); if (iterator != 0) { while ((object = IOIteratorNext(iterator)) != 0) { - if (IsXbox360Controller(object)) + if (IsXBox360Controller(object)) { NSNumber *vendorValue, *productValue; UInt16 vendor,product; - + vendorValue = GetDeviceValue(object, @"idVendor"); vendor = [vendorValue intValue]; - + productValue = GetDeviceValue(object, @"idProduct"); product = [productValue intValue]; - + if ((vendorValue != nil) && (productValue != nil)) { - NSNumber *key = @((UInt32)((vendor << 16) | product)); - + NSNumber *key; + + key = [NSNumber numberWithUnsignedInt:(vendor << 16) | product]; [connected addObject:key]; - if (entries[key] == nil) + if ([entries objectForKey:key] == nil) { NSString *name = GetDeviceValue(object, @"USB Product Name"); if (name == nil) name = [NSString stringWithFormat:@"Unknown_%.4x_%.4x", vendor, product]; else name = SanitiseName(name); - entries[key] = name; + [entries setObject:name forKey:key]; } } } @@ -320,7 +360,7 @@ - (NSString*)readIOKit - (void)showFailure:(NSString*)message { - NSAlert *alert = [NSAlert alertWithMessageText:@"Error" + NSAlert *alert = [NSAlert alertWithMessageText:nil defaultButton:nil alternateButton:nil otherButton:nil @@ -331,12 +371,13 @@ - (void)showFailure:(NSString*)message - (BOOL)loadDevices { NSString *error; - + // Initialise + error = nil; [entries removeAllObjects]; [connected removeAllObjects]; [enabled removeAllObjects]; - + // These can be done in any order, depending on the behaviour desired if (error == nil) error = [self readKnownDevices]; @@ -344,18 +385,18 @@ - (BOOL)loadDevices error = [self readTool]; if (error == nil) error = [self readIOKit]; - + // Check for errors if (error != nil) { [self showFailure:error]; return NO; } - + // Done SetKnownDevices(entries); [list reloadData]; - self.changed = NO; + changed = NO; return YES; } @@ -365,17 +406,17 @@ - (BOOL)trySave OSStatus status; AuthorizationRef authorisationRef; BOOL success = NO; - + status = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &authorisationRef); if (status != errAuthorizationSuccess) { - [self showFailure:Three60LocalizedString(@"Unable to create authorisation request", @"")]; + [self showFailure:NSLocalizedString(@"Unable to create authorisation request", @"")]; return NO; } - + AuthorizationItem right = {kAuthorizationRightExecute, 0, NULL, 0}; AuthorizationRights rights = {1, &right}; status = AuthorizationCopyRights(authorisationRef, @@ -385,19 +426,19 @@ - (BOOL)trySave NULL); if (status != errAuthorizationSuccess) { - [self showFailure:Three60LocalizedString(@"Unable to acquire authorisation", @"")]; + [self showFailure:NSLocalizedString(@"Unable to acquire authorisation", @"")]; goto fail; } - + status = [self writeToolWithAuthorisation:authorisationRef]; if (status != errAuthorizationSuccess) { - [self showFailure:Three60LocalizedString(@"Failed to execute the driver tool", @"")]; + [self showFailure:NSLocalizedString(@"Failed to execute the driver tool", @"")]; goto fail; } - + success = YES; - + fail: AuthorizationFree(authorisationRef, kAuthorizationFlagDestroyRights); return success; @@ -405,7 +446,7 @@ - (BOOL)trySave - (void)showWithOwner:(Pref360ControlPref*)pane { - self.owner = pane; + owner = pane; if (![self loadDevices]) return; [NSApp beginSheet:sheet @@ -423,27 +464,8 @@ - (IBAction)done:(id)sender [sheet close]; } -- (NSArray*)allEntries -{ - return [[entries allKeys] sortedArrayWithOptions:NSSortConcurrent usingComparator:^NSComparisonResult(id obj1, id obj2) { - NSNumber *str1 = obj1; - NSNumber *str2 = obj2; - UInt32 num1 = str1.unsignedIntValue; - UInt32 num2 = str2.unsignedIntValue; - - NSComparisonResult retval; - if (num1 > num2) { - retval = NSOrderedAscending; - } else if (num1 < num2) { - retval = NSOrderedDescending; - } else { - retval = NSOrderedSame; - } - return retval; - }]; -} - // NSTableView data source + - (NSInteger)numberOfRowsInTableView:(NSTableView*)tableView { return [entries count]; @@ -452,21 +474,21 @@ - (NSInteger)numberOfRowsInTableView:(NSTableView*)tableView - (id)tableView:(NSTableView*)aTableView objectValueForTableColumn:(NSTableColumn*)aTableColumn row:(NSInteger)rowIndex { NSString *identifier = [aTableColumn identifier]; - NSString *key = [self allEntries][rowIndex]; + NSString *key = [[entries allKeys] objectAtIndex:rowIndex]; if ([identifier compare:@"enable"] == NSOrderedSame) { - return @([enabled containsObject:key]); + return [NSNumber numberWithBool:[enabled containsObject:key]]; } if ([identifier compare:@"name"] == NSOrderedSame) { NSColor *colour; - + if ([connected containsObject:key]) colour = [NSColor blueColor]; else colour = [NSColor blackColor]; - return [[NSAttributedString alloc] initWithString:entries[key] - attributes:@{NSForegroundColorAttributeName: colour}]; + return [[[NSAttributedString alloc] initWithString:[entries objectForKey:key] + attributes:[NSDictionary dictionaryWithObject:colour forKey:NSForegroundColorAttributeName]] autorelease]; } return nil; } @@ -475,14 +497,14 @@ - (void)tableView:(NSTableView*)aTableView setObjectValue:(id)anObject forTableC { if ([(NSString*)[aTableColumn identifier] compare:@"enable"] == NSOrderedSame) { - NSString *key = [self allEntries][rowIndex]; + NSString *key = [[entries allKeys] objectAtIndex:rowIndex]; BOOL contains = [enabled containsObject:key]; if ([(NSNumber*)anObject boolValue]) { if (!contains) { [enabled addObject:key]; - self.changed = YES; + changed = YES; } } else @@ -490,9 +512,10 @@ - (void)tableView:(NSTableView*)aTableView setObjectValue:(id)anObject forTableC if (contains) { [enabled removeObject:key]; - self.changed = YES; + changed = YES; } } + } } diff --git a/Pref360Control/English.lproj/InfoPlist.strings b/Pref360Control/English.lproj/InfoPlist.strings new file mode 100644 index 00000000..6542423e Binary files /dev/null and b/Pref360Control/English.lproj/InfoPlist.strings differ diff --git a/Pref360Control/English.lproj/Pref360ControlPref.nib/designable.nib b/Pref360Control/English.lproj/Pref360ControlPref.nib/designable.nib new file mode 100644 index 00000000..16ccac1d --- /dev/null +++ b/Pref360Control/English.lproj/Pref360ControlPref.nib/designable.nib @@ -0,0 +1,2148 @@ + + + + 1050 + 12C60 + 2844 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2844 + + + NSBox + NSButton + NSButtonCell + NSCustomObject + NSCustomView + NSImageCell + NSImageView + NSMenu + NSMenuItem + NSPopUpButton + NSPopUpButtonCell + NSProgressIndicator + NSScrollView + NSScroller + NSSlider + NSSliderCell + NSTableColumn + NSTableView + NSTextField + NSTextFieldCell + NSView + NSWindowTemplate + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + Pref360ControlPref + + + FirstResponder + + + NSApplication + + + 7 + 2 + {{240, 597}, {595, 304}} + 1081606144 + << do not localize >> + NSWindow + + View + + + {595, 10} + + + 256 + + + + 256 + {{107, 260}, {471, 26}} + + + + YES + + -2076180416 + 2048 + + LucidaGrande + 13 + 1044 + + + 109199360 + 1 + + LucidaGrande + 13 + 16 + + + + + + 400 + 75 + + + Item1 + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + + OtherViews + + + + + + Item2 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Item3 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + 3 + YES + YES + 1 + + NO + + + + 256 + {{40, 266}, {65, 17}} + + + + YES + + 67108864 + 71303168 + RGV2aWNlOgo + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + NO + + + + 256 + {{43, 117}, {77, 77}} + + + + MyAnalogStick + NSView + + + + 256 + {{123, 43}, {77, 77}} + + + + MyDigitalStick + NSView + + + + 256 + {{226, 43}, {77, 77}} + + + + MyAnalogStick + NSView + + + + 256 + {{306, 117}, {77, 77}} + + + + MyMainButtons + NSView + + + + 256 + {{151, 141}, {126, 39}} + + + + MyCentreButtons + NSView + + + + 256 + {{43, 202}, {77, 18}} + + + + MyShoulderButton + NSView + + + + 256 + {{306, 202}, {77, 18}} + + + + MyShoulderButton + NSView + + + + 1280 + {{41, 224}, {161, 20}} + + + + 16392 + 255 + + + + 1280 + {{224, 224}, {161, 20}} + + + + 16392 + 255 + + + + 256 + {{41, 93}, {71, 18}} + + + + YES + + 67108864 + 0 + Invert X + + + 1211912448 + 2 + + NSSwitch + + + + 200 + 25 + + NO + + + + 256 + {{41, 73}, {71, 18}} + + + + YES + + 67108864 + 0 + Invert Y + + + 1211912448 + 2 + + + + 200 + 25 + + NO + + + + 256 + {{309, 81}, {71, 18}} + + + + YES + + 67108864 + 0 + Invert X + + + 1211912448 + 2 + + + + 200 + 25 + + NO + + + + 256 + {{309, 61}, {71, 18}} + + + + YES + + 67108864 + 0 + Invert Y + + + 1211912448 + 2 + + + + 200 + 25 + + NO + + + + 256 + {{224, 16}, {161, 21}} + + + + YES + + 67108864 + 0 + + + + + Helvetica + 12 + 16 + + + 32768 + 0.0 + 50 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 256 + {{41, 53}, {64, 18}} + + + + YES + + 67108864 + 0 + Linked + + + 1211912448 + 2 + + + + 200 + 25 + + NO + + + + 256 + {{309, 41}, {64, 18}} + + + + YES + + 67108864 + 0 + Linked + + + 1211912448 + 2 + + + + 200 + 25 + + NO + + + + 256 + + + + 274 + + + + 256 + {{13, 193}, {153, 14}} + + + + YES + + 67108864 + 272629760 + Xbox 360 Controller Driver + + LucidaGrande + 11 + 3100 + + + + + + NO + + + + 256 + {{13, 173}, {129, 17}} + + + + YES + + 67108864 + 272629760 + Version 0.12 + + LucidaGrande + 10 + 2843 + + + + + + NO + + + + 256 + {{13, 157}, {129, 17}} + + + + YES + + 67108864 + 272629760 + (C) 2006-13 Colin Munro + + + + + + NO + + + + 256 + {{10, 138}, {129, 14}} + + + + YES + + 69206017 + 272629760 + http://tattiebogle.net/ + + + + + + NO + + + + 256 + {{10, 116}, {153, 14}} + + + + YES + + 69206017 + 272629760 + http://mice-software.com/ + + + + + + NO + + + + 256 + {{13, 11}, {150, 97}} + + + YES + + 67108864 + 272629760 + Rm9yIG1vcmUgaW5mb3JtYXRpb24gb24gdGhpcyBkcml2ZXIsIHBsZWFzZSBzZWUgdGhlIHN1cHBsaWVk +IFJlYWRtZSBhbmQgTGljZW5jZSBkb2N1bWVudHMuCgpQbGVhc2UgY29uc2lkZXIgZG9uYXRpbmcgaWYg +eW91IGVuam95IHRoaXMgZHJpdmVyIQ + + + + + + NO + + + {{2, 2}, {179, 218}} + + + + + + {{395, 16}, {183, 235}} + + + + {0, 0} + + 67108864 + 0 + About + + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 3 + 0 + 2 + NO + + + + 256 + + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + {{197, 190}, {32, 24}} + + + + YES + + 134217728 + 33554432 + + NSImage + battNone + + 0 + 1 + 0 + YES + + NO + YES + + + + 268 + {{17, 40}, {21, 156}} + + + + YES + + 67108864 + 0 + + + 32768 + 0.0 + 50 + 0.0 + 0 + 0 + NO + YES + + NO + + + + -2147483380 + {{8, 254}, {39, 38}} + + + + YES + + 67108864 + 134217728 + + + + LucidaGrande + 18 + 16 + + + -2034499584 + 7 + + + 200 + 25 + + NO + + + + -2147483380 + {{62, 9}, {118, 32}} + + + + YES + + 67108864 + 134217728 + Power off + + + -2038284288 + 129 + + + 200 + 25 + + NO + + + {595, 304} + + + + + {{0, 0}, {1280, 1002}} + {595, 32} + {10000000000000, 10000000000000} + YES + + + 15 + 2 + {{131, 166}, {519, 336}} + 1685585920 + Window + NSWindow + + + {490, 150} + + + 256 + + + + 274 + + + + 2304 + + + + 256 + {477, 229} + + YES + NO + YES + + + -2147483392 + {{224, 0}, {16, 17}} + + + + enable + 20 + 20 + 20 + + 75497536 + 2048 + + + + 3 + MC4zMzMzMzI5ODU2AA + + + 6 + System + headerTextColor + + + + + 67108864 + 131072 + + + + 1211912448 + 2 + + NSImage + NSSwitch + + + + + 200 + 25 + + 1 + YES + YES + + + + name + 451 + 40 + 1000 + + 75497536 + 2048 + + + + + + + 337641536 + 2048 + Text Cell + + + + 6 + System + controlBackgroundColor + + + + + 1 + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + -700448768 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {477, 229}} + + + + + 4 + + + + -2147483392 + {{224, 17}, {15, 102}} + + NO + + _doScroller: + 0.9925373134328358 + + + + -2147483392 + {{-100, -100}, {223, 15}} + + NO + 1 + + _doScroller: + 0.57142859697341919 + + + {{20, 60}, {479, 231}} + + + 133650 + + + + QSAAAEEgAABBmAAAQZgAAA + 0.25 + 4 + 1 + + + + 268 + {{17, 299}, {355, 17}} + + YES + + 68157504 + 272630784 + Select the devices you would like to use with the driver: + + + + + + NO + + + + 289 + {{409, 12}, {96, 32}} + + YES + + 67108864 + 134217728 + Done + + + -2038284288 + 129 + + + 200 + 25 + + NO + + + + 292 + {{17, 16}, {323, 28}} + + YES + + 68157504 + 272630784 + To save changes to this list, you must enter your password.
A restart will be required for changes to take effect. + + LucidaGrande + 11 + 16 + + + + + + NO + + + {519, 336} + + {{0, 0}, {1280, 1002}} + {490, 172} + {10000000000000, 10000000000000} + YES + + + DeviceLister + + + + + + + _window + + + + 26 + + + + leftStickInvertY + + + + 127 + + + + rightStickInvertX + + + + 128 + + + + rightStickInvertY + + + + 129 + + + + deviceList + + + + 130 + + + + rightStickDeadzone + + + + 134 + + + + rightStick + + + + 136 + + + + leftTrigger + + + + 137 + + + + rightTrigger + + + + 138 + + + + leftShoulder + + + + 139 + + + + rightShoulder + + + + 140 + + + + digiStick + + + + 141 + + + + centreButtons + + + + 142 + + + + rightButtons + + + + 143 + + + + leftStick + + + + 144 + + + + leftStickInvertX + + + + 145 + + + + selectDevice: + + + + 146 + + + + changeSetting: + + + + 151 + + + + changeSetting: + + + + 152 + + + + changeSetting: + + + + 153 + + + + changeSetting: + + + + 154 + + + + changeSetting: + + + + 155 + + + + leftLinked + + + + 169 + + + + rightLinked + + + + 170 + + + + changeSetting: + + + + 171 + + + + changeSetting: + + + + 172 + + + + batteryLevel + + + + 175 + + + + changeSetting: + + + + 196 + + + + leftStickDeadzone + + + + 197 + + + + showDeviceList: + + + + 220 + + + + deviceLister + + + + 226 + + + + powerOff: + + + + 229 + + + + powerOff + + + + 230 + + + + dataSource + + + + 225 + + + + done: + + + + 222 + + + + sheet + + + + 223 + + + + list + + + + 224 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + 12 + + + + + + PrefPane + + + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 98 + + + + + + + + 103 + + + + + + + + 104 + + + + + 105 + + + + + 106 + + + + + 107 + + + + + 108 + + + + + 109 + + + + + 110 + + + + + 111 + + + + + 112 + + + + + 114 + + + + + + + + 115 + + + + + + + + 116 + + + + + + + + 117 + + + + + + + + 120 + + + + + + + + 156 + + + + + + + + 157 + + + + + + + + 158 + + + + + + + + + + + + + 174 + + + + + + + + 177 + + + + + + + + 178 + + + + + 179 + + + + + 180 + + + + + 181 + + + + + 182 + + + + + 184 + + + + + 185 + + + + + 186 + + + + + 193 + + + + + 99 + + + + + + + + + + 102 + + + + + 101 + + + + + 100 + + + + + -3 + + + Application + + + 161 + + + + + + + + 187 + + + + + 163 + + + + + + + + 188 + + + + + 165 + + + + + + + + 189 + + + + + 166 + + + + + + + + 190 + + + + + 167 + + + + + + + + 191 + + + + + 168 + + + + + + + + 192 + + + + + 194 + + + + + + + + 195 + + + + + 198 + + + + + + + + 199 + + + + + 200 + + + + + + DeviceSheet + + + 201 + + + + + + + + + + + 202 + + + + + + + + + + 203 + + + + + 204 + + + + + 205 + + + + + + + + + 207 + + + + + + + + 208 + + + + + + + + 209 + + + + + 211 + + + + + 214 + + + + + + + + 215 + + + + + 216 + + + + + + + + 217 + + + + + 218 + + + + + + + + 219 + + + + + 221 + + + + + 227 + + + + + + + + 228 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{326, 482}, {595, 304}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{349, 211}, {519, 336}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 230 + + + + + DeviceLister + NSObject + + done: + id + + + done: + + done: + id + + + + NSTableView + NSWindow + + + + list + NSTableView + + + sheet + NSWindow + + + + IBProjectSource + ./Classes/DeviceLister.h + + + + MyAnalogStick + NSView + + IBProjectSource + ./Classes/MyAnalogStick.h + + + + MyCentreButtons + NSView + + IBProjectSource + ./Classes/MyCentreButtons.h + + + + MyDigitalStick + NSView + + IBProjectSource + ./Classes/MyDigitalStick.h + + + + MyMainButtons + NSView + + IBProjectSource + ./Classes/MyMainButtons.h + + + + MyShoulderButton + NSView + + IBProjectSource + ./Classes/MyShoulderButton.h + + + + NSPreferencePane + NSObject + + NSView + NSView + NSView + NSWindow + + + + _firstKeyView + NSView + + + _initialKeyView + NSView + + + _lastKeyView + NSView + + + _window + NSWindow + + + + IBProjectSource + ./Classes/NSPreferencePane.h + + + + Pref360ControlPref + NSPreferencePane + + id + id + + + + powerOff: + id + + + showDeviceList: + id + + + + NSImageView + MyCentreButtons + NSPopUpButton + DeviceLister + MyDigitalStick + NSButton + MyShoulderButton + MyAnalogStick + NSSlider + NSButton + NSButton + NSProgressIndicator + NSButton + MyMainButtons + NSButton + MyShoulderButton + MyAnalogStick + NSSlider + NSButton + NSButton + NSProgressIndicator + + + + batteryLevel + NSImageView + + + centreButtons + MyCentreButtons + + + deviceList + NSPopUpButton + + + deviceLister + DeviceLister + + + digiStick + MyDigitalStick + + + leftLinked + NSButton + + + leftShoulder + MyShoulderButton + + + leftStick + MyAnalogStick + + + leftStickDeadzone + NSSlider + + + leftStickInvertX + NSButton + + + leftStickInvertY + NSButton + + + leftTrigger + NSProgressIndicator + + + powerOff + NSButton + + + rightButtons + MyMainButtons + + + rightLinked + NSButton + + + rightShoulder + MyShoulderButton + + + rightStick + MyAnalogStick + + + rightStickDeadzone + NSSlider + + + rightStickInvertX + NSButton + + + rightStickInvertY + NSButton + + + rightTrigger + NSProgressIndicator + + + + IBProjectSource + ./Classes/Pref360ControlPref.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + YES + 3 + + {11, 11} + {10, 3} + {15, 15} + {32, 24} + + + diff --git a/Pref360Control/English.lproj/Pref360ControlPref.nib/keyedobjects.nib b/Pref360Control/English.lproj/Pref360ControlPref.nib/keyedobjects.nib new file mode 100644 index 00000000..00668ec8 Binary files /dev/null and b/Pref360Control/English.lproj/Pref360ControlPref.nib/keyedobjects.nib differ diff --git a/Pref360Control/Info.plist b/Pref360Control/Info.plist index b23cea4a..29c92739 100644 --- a/Pref360Control/Info.plist +++ b/Pref360Control/Info.plist @@ -3,32 +3,32 @@ CFBundleDevelopmentRegion - en + English CFBundleExecutable - ${EXECUTABLE_NAME} + Pref360Control + CFBundleIconFile + CFBundleIdentifier com.mice.driver.360Controller.Prefs CFBundleInfoDictionaryVersion 6.0 - CFBundleName - Xbox 360 Controllers CFBundlePackageType BNDL CFBundleShortVersionString - ${CURRENT_PROJECT_VERSION} + 1.0 CFBundleSignature - 360D + ???? CFBundleVersion - ${CURRENT_PROJECT_VERSION} - LSMinimumSystemVersion - ${MIN_MACOS_VERSION} + 1.0 NSMainNibFile Pref360ControlPref NSPrefPaneIconFile - pref360controlpref.tiff - NSPrefPaneIconLabel - Xbox 360 Controllers + Pref360ControlPref.tiff NSPrincipalClass Pref360ControlPref + CFBundleName + XBox 360 Controllers + NSPrefPaneIconLabel + Xbox 360\nControllers diff --git a/Pref360Control/MyAnalogStick.h b/Pref360Control/MyAnalogStick.h index dd76df88..a95fdd23 100644 --- a/Pref360Control/MyAnalogStick.h +++ b/Pref360Control/MyAnalogStick.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + MyAnalogStick.h - declaration of analog stick view - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -23,18 +23,17 @@ #import @interface MyAnalogStick : NSView -@property (nonatomic) int deadzone; -@property (nonatomic) int positionX; -@property (nonatomic) int positionY; -@property (nonatomic) int realPositionX; -@property (nonatomic) int realPositionY; -@property (nonatomic) BOOL pressed; -@property (nonatomic) BOOL linked; -@property (nonatomic) BOOL normalized; +{ + int deadzone; + int x,y; + BOOL pressed,linked; +} -- (void)setPositionX:(int)positionX; -- (void)setNormalized:(BOOL)isNormalized; -- (void)setPositionY:(int)positionY; +- (void)setDeadzone:(int)pos; - (void)setPositionX:(int)xPos y:(int)yPos; +- (void)setPositionX:(int)xPos; +- (void)setPositionY:(int)xPos; +- (void)setPressed:(BOOL)pressedState; +- (void)setLinked:(BOOL)linkedState; @end diff --git a/Pref360Control/MyAnalogStick.m b/Pref360Control/MyAnalogStick.m index c1538bf6..cfb63924 100644 --- a/Pref360Control/MyAnalogStick.m +++ b/Pref360Control/MyAnalogStick.m @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + MyAnalogStick.m - implementation of analog stick view - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -22,161 +22,112 @@ */ #import "MyAnalogStick.h" -#define PRESSED_INSET 5 -#define AREA_INSET 4 +#define PRESSED_INSET 5 +#define AREA_INSET 4 @implementation MyAnalogStick -@synthesize pressed; -@synthesize deadzone; -@synthesize positionX = x; -@synthesize positionY = y; -@synthesize realPositionX = realX; -@synthesize realPositionY = realY; -@synthesize normalized = normalized; -@synthesize linked; - -- (void)setPressed:(BOOL)apressed -{ - pressed = apressed; - self.needsDisplay = YES; -} - -- (void)setDeadzone:(int)adeadzone -{ - deadzone = adeadzone; - self.needsDisplay = YES; -} - -- (void)setPositionX:(int)positionX -{ - x = positionX; - - if (normalized) - { - const UInt16 max16 = 32767; - float maxVal = max16 - deadzone; - - if (x > 0) - realX = (abs(x) * maxVal / max16) + deadzone + 1; - else if (x < 0) - realX = -((abs(x) * maxVal / max16) + deadzone + 1); - else // x == 0 - realX = 0; - } - else - { - realX = 0; - } - - self.needsDisplay = YES; -} - -- (void)setPositionY:(int)positionY -{ - y = positionY; - - if (normalized) - { - const UInt16 max16 = 32767; - float maxVal = max16 - deadzone; - - if (y > 0) - realY = (abs(y) * maxVal / max16) + deadzone + 1; - else if (y < 0) - realY = -((abs(y) * maxVal / max16) + deadzone + 1); - else // y == 0 - realY = 0; - } - else - { - realY = 0; - } - - self.needsDisplay = YES; -} - -- (void)setNormalized:(BOOL)isNormalized -{ - normalized = isNormalized; -} -- (void)setLinked:(BOOL)alinked +- (id)initWithFrame:(NSRect)frameRect { - linked = alinked; - self.needsDisplay = YES; + if ((self = [super initWithFrame:frameRect]) != nil) { + deadzone=0; + x=0; + y=0; + pressed=FALSE; + linked=FALSE; + } + return self; } - (void)drawRect:(NSRect)rect { - NSRect area = [self bounds], deadRect, posRect, realPosRect; - + NSRect area,deadRect,posRect; + // Compute positions - // Deadzone - deadRect.size.width = (deadzone * area.size.width) / 32768; - deadRect.size.height = (deadzone * area.size.height) / 32768; - deadRect.origin.x = area.origin.x + ((area.size.width - deadRect.size.width) / 2); - deadRect.origin.y = area.origin.y + ((area.size.height - deadRect.size.height) / 2); - // Position - posRect.size.width = 4; - posRect.size.height = 4; - posRect.origin.x = area.origin.x + AREA_INSET + (((x + 32768) * (area.size.width - (AREA_INSET * 2))) / 65536) - (posRect.size.width / 2); - posRect.origin.y = area.origin.y + area.size.height - AREA_INSET - (((y + 32768) * (area.size.height - (AREA_INSET * 2))) / 65536) - (posRect.size.height / 2); - // Real Position - realPosRect.size.width = 4; - realPosRect.size.height = 4; - realPosRect.origin.x = area.origin.x + AREA_INSET + (((realX + 32768) * (area.size.width - (AREA_INSET * 2))) / 65536) - (posRect.size.width / 2); - realPosRect.origin.y = area.origin.y + area.size.height - AREA_INSET - (((realY + 32768) * (area.size.height - (AREA_INSET * 2))) / 65536) - (posRect.size.height / 2); + // Area + area=[self bounds]; + // Deadzone + deadRect.size.width=(deadzone*area.size.width)/32768; + deadRect.size.height=(deadzone*area.size.height)/32768; + deadRect.origin.x=area.origin.x+((area.size.width-deadRect.size.width)/2); + deadRect.origin.y=area.origin.y+((area.size.height-deadRect.size.height)/2); + // Position + posRect.size.width=4; + posRect.size.height=4; + posRect.origin.x=area.origin.x+AREA_INSET+(((x+32768)*(area.size.width-(AREA_INSET*2)))/65536)-(posRect.size.width/2); + posRect.origin.y=area.origin.y+area.size.height-AREA_INSET-(((y+32768)*(area.size.height-(AREA_INSET*2)))/65536)-(posRect.size.height/2); // Draw border NSDrawLightBezel(area,area); // Draw pressed state if(pressed) { NSRect pressArea; - + pressArea=area; - pressArea.origin.x += PRESSED_INSET; - pressArea.origin.y += PRESSED_INSET; - pressArea.size.width -= PRESSED_INSET * 2; - pressArea.size.height -= PRESSED_INSET * 2; + pressArea.origin.x+=PRESSED_INSET; + pressArea.origin.y+=PRESSED_INSET; + pressArea.size.width-=PRESSED_INSET*2; + pressArea.size.height-=PRESSED_INSET*2; [[NSColor blackColor] set]; NSRectFill(pressArea); } // Draw deadzone - if (deadzone != 0) { + if(deadzone!=0) { [[NSColor redColor] set]; - if (linked) NSFrameRect(deadRect); + if(linked) NSFrameRect(deadRect); else { NSRect trueRect; - - trueRect = deadRect; - trueRect.origin.x = area.origin.x; - trueRect.size.width = area.size.width; + + trueRect=deadRect; + trueRect.origin.x=area.origin.x; + trueRect.size.width=area.size.width; NSFrameRect(trueRect); - trueRect = deadRect; - trueRect.origin.y = area.origin.y; - trueRect.size.height = area.size.height; + trueRect=deadRect; + trueRect.origin.y=area.origin.y; + trueRect.size.height=area.size.height; NSFrameRect(trueRect); } } - // Draw real position - if (realX || realY) - { - if (pressed) [[NSColor colorWithDeviceWhite:.3 alpha:1] set]; - else [[NSColor colorWithDeviceWhite:.7 alpha:1] set]; - NSRectFill(realPosRect); - } // Draw position - if (pressed) [[NSColor whiteColor] set]; + if(pressed) [[NSColor whiteColor] set]; else [[NSColor blackColor] set]; NSRectFill(posRect); } +- (void)setDeadzone:(int)pos +{ + deadzone=pos; + [self setNeedsDisplay:YES]; +} + - (void)setPositionX:(int)xPos y:(int)yPos { - // This does not trigger the key-value observer. - x = xPos; - // This does. - // Done so the setNeedsDisplay: is only called once - self.positionY = yPos; + x=xPos; + y=yPos; + [self setNeedsDisplay:YES]; +} + +- (void)setPositionX:(int)xPos +{ + x=xPos; + [self setNeedsDisplay:YES]; +} + +- (void)setPositionY:(int)yPos +{ + y=yPos; + [self setNeedsDisplay:YES]; +} + +- (void)setPressed:(BOOL)pressedState +{ + pressed=pressedState; + [self setNeedsDisplay:YES]; +} + +- (void)setLinked:(BOOL)linkedState +{ + linked=linkedState; + [self setNeedsDisplay:YES]; } @end diff --git a/Pref360Control/MyBatteryMonitor.h b/Pref360Control/MyBatteryMonitor.h deleted file mode 100644 index 87013dba..00000000 --- a/Pref360Control/MyBatteryMonitor.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// MyBatteryMonitor.h -// 360 Driver -// -// Created by Pierre TACCHI on 21/01/15. -// - -#import - -@interface MyBatteryMonitor : NSView - -@property (nonatomic) int bars; -@property (nonatomic) int percentage; - -@end diff --git a/Pref360Control/MyBatteryMonitor.m b/Pref360Control/MyBatteryMonitor.m deleted file mode 100644 index 2d8884fd..00000000 --- a/Pref360Control/MyBatteryMonitor.m +++ /dev/null @@ -1,29 +0,0 @@ -// -// MyBatteryMonitor.m -// 360 Driver -// -// Created by Pierre TACCHI on 21/01/15. -// - -#import "MyBatteryMonitor.h" -#import "Pref360StyleKit.h" - -@implementation MyBatteryMonitor - -- (void)setBars:(int)value { - _bars = value; - [self setNeedsDisplay:YES]; -} - -- (void)setPercentage:(int)value { - _percentage = value; - [self setNeedsDisplay:YES]; -} - -- (void)drawRect:(NSRect)dirtyRect { - [super drawRect:dirtyRect]; - - [Pref360StyleKit drawBatteryMonitorWithBars:_bars andPercentage:_percentage]; -} - -@end diff --git a/Pref360Control/MyCentreButtons.h b/Pref360Control/MyCentreButtons.h index 52a8927a..97168d5d 100644 --- a/Pref360Control/MyCentreButtons.h +++ b/Pref360Control/MyCentreButtons.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + MyCentreButtons.h - definition of view to draw the central buttons - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -23,7 +23,12 @@ #import @interface MyCentreButtons : NSView -@property (nonatomic) BOOL back; -@property (nonatomic) BOOL start; -@property (nonatomic) BOOL specific; +{ + BOOL back,start,appSpecific; +} + +- (void)setBack:(BOOL)bBack; +- (void)setStart:(BOOL)bStart; +- (void)setSpecific:(BOOL)bSpecific; + @end diff --git a/Pref360Control/MyCentreButtons.m b/Pref360Control/MyCentreButtons.m index 3bef7623..663ace14 100644 --- a/Pref360Control/MyCentreButtons.m +++ b/Pref360Control/MyCentreButtons.m @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + MyCentreButtons.m - implementation of central button view - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -19,71 +19,77 @@ You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#import "MyCentreButtons.h" +*/#import "MyCentreButtons.h" @implementation MyCentreButtons -@synthesize back; -@synthesize start; -@synthesize specific = appSpecific; - -- (void)setBack:(BOOL)aback -{ - back = aback; - self.needsDisplay = YES; -} -- (void)setStart:(BOOL)astart +- (id)initWithFrame:(NSRect)frameRect { - start = astart; - self.needsDisplay = YES; + if ((self = [super initWithFrame:frameRect]) != nil) { + back=start=appSpecific=FALSE; + } + return self; } -- (void)setSpecific:(BOOL)specific +- (void)drawButton:(NSString*)button inRectangle:(NSRect)rect pressed:(BOOL)down { - appSpecific = specific; - self.needsDisplay = YES; -} - -+ (void)drawButton:(NSString*)button inRectangle:(NSRect)rect pressed:(BOOL)down -{ - NSBezierPath *path = [NSBezierPath bezierPathWithOvalInRect:rect]; + NSBezierPath *path; NSSize size; NSDictionary *attributes; NSPoint point; - NSColor *colour = [NSColor blackColor]; - + NSColor *colour; + // Draw circle + path=[NSBezierPath bezierPathWithOvalInRect:rect]; + colour=[NSColor blackColor]; [colour set]; if(down) { [path fill]; - colour = [NSColor whiteColor]; + colour=[NSColor whiteColor]; } else [path stroke]; // Draw text - attributes = @{NSForegroundColorAttributeName: colour}; - size = [button sizeWithAttributes:attributes]; - point.x = rect.origin.x + ((rect.size.width - size.width) / 2); - point.y = rect.origin.y + ((rect.size.height - size.height) / 2); + attributes=[NSDictionary dictionaryWithObject:colour forKey:NSForegroundColorAttributeName]; + size=[button sizeWithAttributes:attributes]; + point.x=rect.origin.x+((rect.size.width-size.width)/2); + point.y=rect.origin.y+((rect.size.height-size.height)/2); [button drawAtPoint:point withAttributes:attributes]; } - (void)drawRect:(NSRect)rect { - NSRect area = [self bounds], button; + NSRect area,button; - button.size.height = area.size.height / 2; - button.size.width = area.size.width / 4; - button.origin.x = area.origin.x; - button.origin.y = area.origin.y + ((area.size.height - button.size.height) / 2); - [MyCentreButtons drawButton:@"Back" inRectangle:button pressed:back]; - button.origin.x = area.origin.x + area.size.width - button.size.width; - [MyCentreButtons drawButton:@"Start" inRectangle:button pressed:start]; - button.size.height = area.size.height - 2; - button.size.width = button.size.height; - button.origin.x = area.origin.x + ((area.size.width-button.size.width) / 2); - button.origin.y = area.origin.y + 1; - [MyCentreButtons drawButton:@"" inRectangle:button pressed:appSpecific]; + area=[self bounds]; + button.size.height=area.size.height/2; + button.size.width=area.size.width/4; + button.origin.x=area.origin.x; + button.origin.y=area.origin.y+((area.size.height-button.size.height)/2); + [self drawButton:@"Back" inRectangle:button pressed:back]; + button.origin.x=area.origin.x+area.size.width-button.size.width; + [self drawButton:@"Start" inRectangle:button pressed:start]; + button.size.height=area.size.height-2; + button.size.width=button.size.height; + button.origin.x=area.origin.x+((area.size.width-button.size.width)/2); + button.origin.y=area.origin.y+1; + [self drawButton:@"" inRectangle:button pressed:appSpecific]; +} + +- (void)setBack:(BOOL)bBack +{ + back=bBack; + [self setNeedsDisplay:TRUE]; +} + +- (void)setStart:(BOOL)bStart +{ + start=bStart; + [self setNeedsDisplay:TRUE]; +} + +- (void)setSpecific:(BOOL)bSpecific +{ + appSpecific=bSpecific; + [self setNeedsDisplay:TRUE]; } @end diff --git a/Pref360Control/MyDeadZoneViewer.h b/Pref360Control/MyDeadZoneViewer.h deleted file mode 100644 index 02f63e28..00000000 --- a/Pref360Control/MyDeadZoneViewer.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// MyDeadZoneViewer.h -// 360 Driver -// -// Created by Pierre TACCHI on 21/01/15. -// - -#import - -@interface MyDeadZoneViewer : NSView - -@property (nonatomic) double val; -@property (nonatomic) BOOL linked; - -@end diff --git a/Pref360Control/MyDeadZoneViewer.m b/Pref360Control/MyDeadZoneViewer.m deleted file mode 100644 index 0812c27d..00000000 --- a/Pref360Control/MyDeadZoneViewer.m +++ /dev/null @@ -1,29 +0,0 @@ -// -// MyDeadZoneViewer.m -// 360 Driver -// -// Created by Pierre TACCHI on 21/01/15. -// - -#import "MyDeadZoneViewer.h" -#import "Pref360StyleKit.h" - -@implementation MyDeadZoneViewer - --(void)setVal:(double)value { - _val = value; - [self setNeedsDisplay:YES]; -} - -- (void)setLinked:(BOOL)linked { - _linked = linked; - [self setNeedsDisplay:YES]; -} - -- (void)drawRect:(NSRect)dirtyRect { - [super drawRect:dirtyRect]; - - [Pref360StyleKit drawDeadZoneViewerWithValue:_val / 32768 linked:_linked]; -} - -@end diff --git a/Pref360Control/MyDigitalStick.h b/Pref360Control/MyDigitalStick.h index d647a063..f8ac4254 100644 --- a/Pref360Control/MyDigitalStick.h +++ b/Pref360Control/MyDigitalStick.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + MyDigitalStick.h - declaration of view to draw digital stick view - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -23,8 +23,14 @@ #import @interface MyDigitalStick : NSView -@property (nonatomic) BOOL up; -@property (nonatomic) BOOL down; -@property (nonatomic) BOOL left; -@property (nonatomic) BOOL right; +{ + NSBezierPath *up,*down,*left,*right; + BOOL bUp,bDown,bLeft,bRight; +} + +- (void)setUp:(BOOL)upState; +- (void)setDown:(BOOL)downState; +- (void)setLeft:(BOOL)leftState; +- (void)setRight:(BOOL)rightState; + @end diff --git a/Pref360Control/MyDigitalStick.m b/Pref360Control/MyDigitalStick.m index 2bd8a20b..3be6b1ab 100644 --- a/Pref360Control/MyDigitalStick.m +++ b/Pref360Control/MyDigitalStick.m @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + MyDigitalStick.m - implementation of digital stick view - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -22,47 +22,14 @@ */ #import "MyDigitalStick.h" -#define INSET_AMOUNT 10 +#define INSET_AMOUNT 10 @implementation MyDigitalStick -{ -@private - NSBezierPath *up, *down, *left, *right; -} -@synthesize up = bUp; -@synthesize down = bDown; -@synthesize left = bLeft; -@synthesize right = bRight; -- (void)setUp:(BOOL)anup +- (NSBezierPath*)makeTriangle:(int)start inRectangle:(NSRect)rect; { - bUp = anup; - self.needsDisplay = YES; -} - -- (void)setDown:(BOOL)adown -{ - bDown = adown; - self.needsDisplay = YES; -} - -- (void)setLeft:(BOOL)aleft -{ - bLeft = aleft; - self.needsDisplay = YES; -} - -- (void)setRight:(BOOL)aright -{ - bRight = aright; - self.needsDisplay = YES; -} - -+ (NSBezierPath*)makeTriangle:(int)start inRectangle:(NSRect)rect; -{ - // Create path - NSBezierPath *path = [NSBezierPath bezierPath]; - NSPoint centre, point; + NSBezierPath *path; + NSPoint centre,point; const int mult[][2]={ {0,0}, {1,0}, @@ -70,58 +37,96 @@ + (NSBezierPath*)makeTriangle:(int)start inRectangle:(NSRect)rect; {0,1}, {0,0} }; - + // Find central part - centre.x = rect.origin.x + (rect.size.width / 2); - centre.y = rect.origin.y + (rect.size.height / 2); + centre.x=rect.origin.x+(rect.size.width/2); + centre.y=rect.origin.y+(rect.size.height/2); + // Create path + path=[NSBezierPath bezierPath]; // Make triangle [path moveToPoint:centre]; - point.x = rect.origin.x + (rect.size.width * mult[start][0]); - point.y = rect.origin.y + (rect.size.height * mult[start][1]); + point.x=rect.origin.x+(rect.size.width*mult[start][0]); + point.y=rect.origin.y+(rect.size.height*mult[start][1]); [path lineToPoint:point]; - point.x = rect.origin.x + (rect.size.width * mult[start + 1][0]); - point.y = rect.origin.y + (rect.size.height * mult[start + 1][1]); + point.x=rect.origin.x+(rect.size.width*mult[start+1][0]); + point.y=rect.origin.y+(rect.size.height*mult[start+1][1]); [path lineToPoint:point]; [path closePath]; // Done - return path; + return [path retain]; } - (id)initWithFrame:(NSRect)frameRect { - if ((self = [super initWithFrame:frameRect]) != nil) { - NSRect rect = [self bounds], triangle; + if ((self = [super initWithFrame:frameRect]) != nil) { + NSRect rect,triangle; + + bUp=bDown=bLeft=bRight=FALSE; + rect=[self bounds]; + triangle.origin.x+=INSET_AMOUNT; + triangle.origin.y+=INSET_AMOUNT; + triangle.size.width-=INSET_AMOUNT*2; + triangle.size.height-=INSET_AMOUNT*2; + triangle.size.width=rect.size.width/3; + triangle.size.height=rect.size.height/3; + triangle.origin.y=rect.origin.y+(triangle.size.height*2); + triangle.origin.x=rect.origin.x+triangle.size.width; + up=[self makeTriangle:0 inRectangle:triangle]; + triangle.origin.y=rect.origin.y; + down=[self makeTriangle:2 inRectangle:triangle]; + triangle.origin.y=rect.origin.y+triangle.size.height; + triangle.origin.x=rect.origin.x; + left=[self makeTriangle:1 inRectangle:triangle]; + triangle.origin.x=rect.origin.x+(triangle.size.width*2); + right=[self makeTriangle:3 inRectangle:triangle]; + } + return self; +} - triangle.origin.x = INSET_AMOUNT; - triangle.origin.y = INSET_AMOUNT; - triangle.size.width =- INSET_AMOUNT * 2; - triangle.size.height =- INSET_AMOUNT * 2; - triangle.size.width = rect.size.width / 3; - triangle.size.height = rect.size.height / 3; - triangle.origin.y = rect.origin.y + (triangle.size.height * 2); - triangle.origin.x = rect.origin.x + triangle.size.width; - up = [MyDigitalStick makeTriangle:0 inRectangle:triangle]; - triangle.origin.y = rect.origin.y; - down = [MyDigitalStick makeTriangle:2 inRectangle:triangle]; - triangle.origin.y = rect.origin.y + triangle.size.height; - triangle.origin.x = rect.origin.x; - left = [MyDigitalStick makeTriangle:1 inRectangle:triangle]; - triangle.origin.x = rect.origin.x + (triangle.size.width * 2); - right = [MyDigitalStick makeTriangle:3 inRectangle:triangle]; - } - return self; +- (void)dealloc +{ + [up release]; + [down release]; + [left release]; + [right release]; + [super dealloc]; } - (void)drawRect:(NSRect)rect { - NSRect area = [self bounds]; - - NSDrawLightBezel(area, area); + NSRect area; + + area=[self bounds]; + NSDrawLightBezel(area,area); [[NSColor blackColor] set]; - if (bUp) [up fill]; - if (bDown) [down fill]; - if (bLeft) [left fill]; - if (bRight) [right fill]; + if(bUp) [up fill]; + if(bDown) [down fill]; + if(bLeft) [left fill]; + if(bRight) [right fill]; +} + +- (void)setUp:(BOOL)upState +{ + bUp=upState; + [self setNeedsDisplay:TRUE]; +} + +- (void)setDown:(BOOL)downState +{ + bDown=downState; + [self setNeedsDisplay:TRUE]; +} + +- (void)setLeft:(BOOL)leftState +{ + bLeft=leftState; + [self setNeedsDisplay:TRUE]; +} + +- (void)setRight:(BOOL)rightState +{ + bRight=rightState; + [self setNeedsDisplay:TRUE]; } @end diff --git a/Pref360Control/MyMainButtons.h b/Pref360Control/MyMainButtons.h index 8e12ca5e..30244113 100644 --- a/Pref360Control/MyMainButtons.h +++ b/Pref360Control/MyMainButtons.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + MyMainButtons.h - declaration of A/B/X/Y button view - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -23,8 +23,13 @@ #import @interface MyMainButtons : NSView -@property (nonatomic) BOOL a; -@property (nonatomic) BOOL b; -@property (nonatomic) BOOL x; -@property (nonatomic) BOOL y; +{ + BOOL a,b,x,y; +} + +- (void)setA:(BOOL)aVal; +- (void)setB:(BOOL)bVal; +- (void)setX:(BOOL)xVal; +- (void)setY:(BOOL)yVal; + @end diff --git a/Pref360Control/MyMainButtons.m b/Pref360Control/MyMainButtons.m index f69bd5af..4d1f6f73 100644 --- a/Pref360Control/MyMainButtons.m +++ b/Pref360Control/MyMainButtons.m @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + MyMainButtons.m - implementation of A/B/X/Y button view - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -22,88 +22,98 @@ */ #import "MyMainButtons.h" -#define MINI_OFFSET 2 +#define MINI_OFFSET 2 @implementation MyMainButtons -@synthesize a; -@synthesize b; -@synthesize x; -@synthesize y; -- (void)setA:(BOOL)aa +- (id)initWithFrame:(NSRect)frameRect { - a = aa; - self.needsDisplay = YES; + if ((self = [super initWithFrame:frameRect]) != nil) { + a=b=x=y=FALSE; + } + return self; } -- (void)setB:(BOOL)aa +- (void)drawButton:(NSString*)button inRectangle:(NSRect)rect pressed:(BOOL)down { - b = aa; - self.needsDisplay = YES; -} - -- (void)setX:(BOOL)aa -{ - x = aa; - self.needsDisplay = YES; -} - -- (void)setY:(BOOL)aa -{ - y = aa; - self.needsDisplay = YES; -} - -+ (void)drawButton:(NSString*)button inRectangle:(NSRect)rect pressed:(BOOL)down -{ - NSBezierPath *path = [NSBezierPath bezierPathWithOvalInRect:rect]; + NSBezierPath *path; NSSize size; NSDictionary *attributes; NSPoint point; - NSColor *colour = [NSColor blackColor]; - NSRect bling = rect; - + NSColor *colour; + NSRect bling; + // Draw circle + path=[NSBezierPath bezierPathWithOvalInRect:rect]; if(down) { [path fill]; +// colour=[NSColor whiteColor]; } else { [path stroke]; +// colour=[NSColor blackColor]; } - bling.origin.x -= 1; - bling.origin.y -= 1; - bling.size.width +=2 ; - bling.size.height +=2 ; - path = [NSBezierPath bezierPathWithOvalInRect:bling]; + colour=[NSColor blackColor]; + bling=rect; + bling.origin.x-=1; + bling.origin.y-=1; + bling.size.width+=2; + bling.size.height+=2; + path=[NSBezierPath bezierPathWithOvalInRect:bling]; [colour set]; [path stroke]; // Draw text - attributes = @{NSForegroundColorAttributeName: colour}; - size = [button sizeWithAttributes:attributes]; - point.x = rect.origin.x + ((rect.size.width - size.width) / 2); - point.y = rect.origin.y + ((rect.size.height - size.height) / 2); + attributes=[NSDictionary dictionaryWithObject:colour forKey:NSForegroundColorAttributeName]; + size=[button sizeWithAttributes:attributes]; + point.x=rect.origin.x+((rect.size.width-size.width)/2); + point.y=rect.origin.y+((rect.size.height-size.height)/2); [button drawAtPoint:point withAttributes:attributes]; } - (void)drawRect:(NSRect)rect { - NSRect area = [self bounds], bit; - - bit.size.width = area.size.width / 3; - bit.size.height = area.size.height / 3; - bit.origin.x = area.origin.x + bit.size.width; - bit.origin.y = area.origin.y + (bit.size.height * 2) - MINI_OFFSET; + NSRect area,bit; + + area=[self bounds]; + bit.size.width=area.size.width/3; + bit.size.height=area.size.height/3; + bit.origin.x=area.origin.x+bit.size.width; + bit.origin.y=area.origin.y+(bit.size.height*2)-MINI_OFFSET; [[NSColor yellowColor] set]; - [MyMainButtons drawButton:@"Y" inRectangle:bit pressed:y]; - bit.origin.y = area.origin.y + MINI_OFFSET; + [self drawButton:@"Y" inRectangle:bit pressed:y]; + bit.origin.y=area.origin.y+MINI_OFFSET; [[NSColor greenColor] set]; - [MyMainButtons drawButton:@"A" inRectangle:bit pressed:a]; - bit.origin.y = area.origin.y + bit.size.height; - bit.origin.x = area.origin.x + MINI_OFFSET; + [self drawButton:@"A" inRectangle:bit pressed:a]; + bit.origin.y=area.origin.y+bit.size.height; + bit.origin.x=area.origin.x+MINI_OFFSET; [[NSColor blueColor] set]; - [MyMainButtons drawButton:@"X" inRectangle:bit pressed:x]; - bit.origin.x = area.origin.x + (bit.size.width * 2) - MINI_OFFSET; + [self drawButton:@"X" inRectangle:bit pressed:x]; + bit.origin.x=area.origin.x+(bit.size.width*2)-MINI_OFFSET; [[NSColor redColor] set]; - [MyMainButtons drawButton:@"B" inRectangle:bit pressed:b]; + [self drawButton:@"B" inRectangle:bit pressed:b]; +} + +- (void)setA:(BOOL)aVal +{ + a=aVal; + [self setNeedsDisplay:TRUE]; +} + +- (void)setB:(BOOL)bVal +{ + b=bVal; + [self setNeedsDisplay:TRUE]; +} + +- (void)setX:(BOOL)xVal +{ + x=xVal; + [self setNeedsDisplay:TRUE]; +} + +- (void)setY:(BOOL)yVal +{ + y=yVal; + [self setNeedsDisplay:TRUE]; } @end diff --git a/Pref360Control/MyShoulderButton.h b/Pref360Control/MyShoulderButton.h index 527c6324..d4523d94 100644 --- a/Pref360Control/MyShoulderButton.h +++ b/Pref360Control/MyShoulderButton.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + MyShoulderButton.h - simple button view declaration - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -23,5 +23,10 @@ #import @interface MyShoulderButton : NSView -@property (nonatomic, getter = isPressed) BOOL pressed; +{ + BOOL pressed; +} + +- (void)setPressed:(BOOL)b; + @end diff --git a/Pref360Control/MyShoulderButton.m b/Pref360Control/MyShoulderButton.m index cdc5397a..829db270 100644 --- a/Pref360Control/MyShoulderButton.m +++ b/Pref360Control/MyShoulderButton.m @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + MyShoulderButton.m - implementation of simple button view - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -22,30 +22,38 @@ */ #import "MyShoulderButton.h" -#define INSET_AMOUNT 2 +#define INSET_AMOUNT 2 @implementation MyShoulderButton -@synthesize pressed; -- (void)setPressed:(BOOL)apressed +- (id)initWithFrame:(NSRect)frameRect { - pressed = apressed; - self.needsDisplay = YES; + if ((self = [super initWithFrame:frameRect]) != nil) { + pressed=FALSE; + } + return self; } - (void)drawRect:(NSRect)rect { - NSRect area = [self bounds]; - - NSDrawLightBezel(area, area); - if (pressed) { - area.origin.x += INSET_AMOUNT; - area.origin.y += INSET_AMOUNT; - area.size.width -= INSET_AMOUNT * 2; - area.size.height -= INSET_AMOUNT * 2; + NSRect area; + + area=[self bounds]; + NSDrawLightBezel(area,area); + if(pressed) { + area.origin.x+=INSET_AMOUNT; + area.origin.y+=INSET_AMOUNT; + area.size.width-=INSET_AMOUNT*2; + area.size.height-=INSET_AMOUNT*2; [[NSColor blueColor] set]; NSRectFill(area); } } +- (void)setPressed:(BOOL)b +{ + pressed=b; + [self setNeedsDisplay:TRUE]; +} + @end diff --git a/Pref360Control/MyTrigger.h b/Pref360Control/MyTrigger.h deleted file mode 100644 index a8854bc3..00000000 --- a/Pref360Control/MyTrigger.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// MyTrigger.h -// 360 Driver -// -// Created by Pierre TACCHI on 21/01/15. -// - -#import - -@interface MyTrigger : NSView - -@property (nonatomic, strong) NSString *name; -@property (nonatomic) int val; - -@end diff --git a/Pref360Control/MyTrigger.m b/Pref360Control/MyTrigger.m deleted file mode 100644 index 53653d6b..00000000 --- a/Pref360Control/MyTrigger.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// MyTrigger.m -// 360 Driver -// -// Created by Pierre TACCHI on 21/01/15. -// - -#import "MyTrigger.h" -#import "Pref360StyleKit.h" - -@implementation MyTrigger - - -- (void)setName:(NSString *)name { - _name = name; - [self setNeedsDisplay:YES]; -} - -- (void)setVal:(int)value { - _val = value; - [self setNeedsDisplay:YES]; -} - -- (void)drawRect:(NSRect)dirtyRect { - [super drawRect:dirtyRect]; - - if (_name == NULL) - _name = @""; - [Pref360StyleKit drawTriggerMetterWithIntensity:(_val / 255.0) triggerTitle:_name]; -} - -@end diff --git a/Pref360Control/MyWhole360Controller.h b/Pref360Control/MyWhole360Controller.h deleted file mode 100644 index ac0c44c3..00000000 --- a/Pref360Control/MyWhole360Controller.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// MyWhole360Controller.h -// 360 Driver -// -// Created by Pierre TACCHI on 21/01/15. -// - -#import - -@interface MyWhole360Controller : NSView - -@property (nonatomic) BOOL aPressed; -@property (nonatomic) BOOL bPressed; -@property (nonatomic) BOOL xPressed; -@property (nonatomic) BOOL yPressed; - -@property (nonatomic) BOOL leftPressed; -@property (nonatomic) BOOL upPressed; -@property (nonatomic) BOOL rightPressed; -@property (nonatomic) BOOL downPressed; - -@property (nonatomic) BOOL backPressed; -@property (nonatomic) BOOL startPressed; -@property (nonatomic) BOOL homePressed; - -@property (nonatomic) BOOL lbPressed; -@property (nonatomic) BOOL rbPressed; -@property (nonatomic) BOOL leftStickPressed; -@property (nonatomic) BOOL rightStickPressed; - -@property (nonatomic) CGPoint leftStickPosition; -@property (nonatomic) CGPoint rightStickPosition; -@property (nonatomic) CGFloat leftStickDeadzone; -@property (nonatomic) CGFloat rightStickDeadzone; -@property (nonatomic) BOOL leftNormalized; -@property (nonatomic) BOOL rightNormalized; - -@property (nonatomic) int leftStickXPos; -@property (nonatomic) int leftStickYPos; -@property (nonatomic) int rightStickXPos; -@property (nonatomic) int rightStickYPos; - -- (void)reset; - -@end diff --git a/Pref360Control/MyWhole360Controller.m b/Pref360Control/MyWhole360Controller.m deleted file mode 100644 index bda7756d..00000000 --- a/Pref360Control/MyWhole360Controller.m +++ /dev/null @@ -1,178 +0,0 @@ -// -// MyWhole360Controller.m -// 360 Driver -// -// Created by Pierre TACCHI on 21/01/15. -// - -#import "MyWhole360Controller.h" -#import "Pref360StyleKit.h" - -@implementation MyWhole360Controller - - -- (void)setAPressed:(BOOL)pressed { - _aPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setBPressed:(BOOL)pressed { - _bPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setXPressed:(BOOL)pressed { - _xPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setYPressed:(BOOL)pressed { - _yPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setLeftPressed:(BOOL)pressed { - _leftPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setUpPressed:(BOOL)pressed { - _upPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setRightPressed:(BOOL)pressed { - _rightPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setDownPressed:(BOOL)pressed { - _downPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setBackPressed:(BOOL)pressed { - _backPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setStartPressed:(BOOL)pressed { - _startPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setHomePressed:(BOOL)pressed { - _homePressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setLbPressed:(BOOL)pressed { - _lbPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setRbPressed:(BOOL)pressed { - _rbPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setLeftStickPressed:(BOOL)pressed { - _leftStickPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setRightStickPressed:(BOOL)pressed { - _rightStickPressed = pressed; - [self setNeedsDisplay:YES]; -} - -- (void)setLeftStickPosition:(CGPoint)position { - _leftStickPosition = position; - [self setNeedsDisplay:YES]; -} - -- (void)setRightStickPosition:(CGPoint)position { - _rightStickPosition = position; - [self setNeedsDisplay:YES]; -} - -- (void)setLeftStickDeadzone:(CGFloat)deadzone { - _leftStickDeadzone = deadzone / 32768.0; - [self setNeedsDisplay:YES]; -} - -- (void)setRightStickDeadzone:(CGFloat)deadzone { - _rightStickDeadzone = deadzone / 32768.0; - [self setNeedsDisplay:YES]; -} - -- (void)setLeftNormalized:(BOOL)normalized { - _leftNormalized = normalized; - [self setNeedsDisplay:YES]; -} - -- (void)setRightNormalized:(BOOL)normalized { - _rightNormalized = normalized; - [self setNeedsDisplay:YES]; -} - -- (void)setLeftStickXPos:(int)xPos { - CGPoint p = _leftStickPosition; - p.x = xPos / 32768.0; - [self setLeftStickPosition:p]; -} - -- (void)setLeftStickYPos:(int)yPos { - CGPoint p = _leftStickPosition; - p.y = yPos / 32768.0; - [self setLeftStickPosition:p]; -} - -- (void)setRightStickXPos:(int)xPos { - CGPoint p = _rightStickPosition; - p.x = xPos / 32768.0; - [self setRightStickPosition:p]; -} - -- (void)setRightStickYPos:(int)yPos { - CGPoint p = _rightStickPosition; - p.y = yPos / 32768.0; - [self setRightStickPosition:p]; -} - -- (void)reset { - [self setAPressed:NO]; - [self setBPressed:NO]; - [self setXPressed:NO]; - [self setYPressed:NO]; - [self setLeftPressed:NO]; - [self setUpPressed:NO]; - [self setRightPressed:NO]; - [self setDownPressed:NO]; - [self setBackPressed:NO]; - [self setStartPressed:NO]; - [self setHomePressed:NO]; - [self setLbPressed:NO]; - [self setRbPressed:NO]; - [self setLeftStickPressed:NO]; - [self setRightStickPressed:NO]; - [self setLeftStickPosition:NSZeroPoint]; - [self setRightStickPosition:NSZeroPoint]; - [self setLeftStickDeadzone:0]; - [self setRightStickDeadzone:0]; - [self setLeftNormalized:NO]; - [self setRightNormalized:NO]; -} - -- (void)awakeFromNib { - _leftStickPosition = NSZeroPoint; - _rightStickPosition = NSZeroPoint; -} - -- (void)drawRect:(NSRect)dirtyRect { - [super drawRect:dirtyRect]; - - [Pref360StyleKit drawX360ControllerWithControllerNumber:0 aPressed:_aPressed bPressed:_bPressed xPressed:_xPressed yPressed:_yPressed leftPressed:_leftPressed upPressed:_upPressed rightPressed:_rightPressed downPressed:_downPressed backPressed:_backPressed startPressed:_startPressed lbPressed:_lbPressed rbPressed:_rbPressed homePressed:_homePressed leftStickPressed:_leftStickPressed rightStickPressed:_rightStickPressed leftStick:_leftStickPosition rightStick:_rightStickPosition leftStickDeadzone:_leftStickDeadzone rightStickDeadzone:_rightStickDeadzone isLeftNormalized:_leftNormalized isRightNormalized:_rightNormalized]; -} - -@end diff --git a/Pref360Control/MyWhole360ControllerMapper.h b/Pref360Control/MyWhole360ControllerMapper.h deleted file mode 100644 index d8227adf..00000000 --- a/Pref360Control/MyWhole360ControllerMapper.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// MyWhole360ControllerMapper.h -// 360 Driver -// -// Created by Drew Mills on 1/30/15. -// Copyright (c) 2015 GitHub. All rights reserved. -// - -#import -#import "MyWhole360Controller.h" -#import "Pref360ControlPref.h" - -@interface MyWhole360ControllerMapper : MyWhole360Controller - -@property BOOL isMapping; - -- (void)runMapperWithButton:(NSButton *)button andOwner:(Pref360ControlPref *)pref; -- (void)cancelMappingWithButton:(NSButton *)button andOwner:(Pref360ControlPref *)pref; -- (void)resetWithOwner:(Pref360ControlPref *)pref; -- (void)buttonPressedAtIndex:(int)index; -+ (UInt8 *)mapping; - -@end diff --git a/Pref360Control/MyWhole360ControllerMapper.m b/Pref360Control/MyWhole360ControllerMapper.m deleted file mode 100644 index 0c8b8bb9..00000000 --- a/Pref360Control/MyWhole360ControllerMapper.m +++ /dev/null @@ -1,212 +0,0 @@ -// -// MyWhole360ControllerMapper.m -// 360 Driver -// -// Created by Drew Mills on 1/30/15. -// - -#import "MyWhole360Controller.h" -#import "MyWhole360ControllerMapper.h" -#import "Pref360StyleKit.h" -#import "BindingTableView.h" - -@implementation MyWhole360ControllerMapper -{ - int currentMappingIndex; - NSButton *remappingButton; - Pref360ControlPref *pref; -} - -static UInt8 mapping[15]; -static UInt8 previousMapping[15]; - -+ (UInt8 *)mapping -{ - return mapping; -} - -- (void)startMapping -{ - currentMappingIndex = 0; - _isMapping = YES; - [self setUpPressed:YES]; -} - -- (void)stopMapping -{ - [super reset]; - currentMappingIndex = 0; - _isMapping = NO; - if (remappingButton != nil) - [remappingButton setState:NSOffState]; - [pref changeSetting:nil]; - [[BindingTableView tableView] reloadData]; - [pref changeSetting:nil]; -} - -- (void)saveCurrentMapping { - for (int i = 0; i < 15; i++) { - previousMapping[i] = mapping[i]; - } -} - -- (void)restorePreviousMapping { - for (int i = 0; i < 15; i++) { - mapping[i] = previousMapping[i]; - } -} - -- (void)runMapperWithButton:(NSButton *)button andOwner:(Pref360ControlPref *)prefPref { - pref = prefPref; - remappingButton = button; - [self saveCurrentMapping]; - [self resetMapping]; - [pref changeSetting:nil]; - [self startMapping]; -} - -- (void)cancelMappingWithButton:(NSButton *)button andOwner:(Pref360ControlPref *)prefPref { - pref = prefPref; - remappingButton = button; - - [self restorePreviousMapping]; - [self stopMapping]; -} - -- (int)realignButtonToByte:(int)index { - if (index == 0) return 12; - if (index == 1) return 13; - if (index == 2) return 14; - if (index == 3) return 15; - if (index == 4) return 8; - if (index == 5) return 9; - if (index == 6) return 6; - if (index == 7) return 7; - if (index == 8) return 4; - if (index == 9) return 5; - if (index == 10) return 10; - if (index == 11) return 0; - if (index == 12) return 1; - if (index == 13) return 2; - if (index == 14) return 3; - return -1; // Should Never Happen -} - -- (void)buttonPressedAtIndex:(int)index { - mapping[currentMappingIndex] = [self realignButtonToByte:index]; - currentMappingIndex++; - [self setButtonAtIndex:currentMappingIndex]; - if (currentMappingIndex == 15) - [self stopMapping]; -} - -- (void)setButtonAtIndex:(int)index { - switch (index) { - case 1: - [self setUpPressed:NO]; - [self setDownPressed:YES]; - break; - - case 2: - [self setDownPressed:NO]; - [self setLeftPressed:YES]; - break; - - case 3: - [self setLeftPressed:NO]; - [self setRightPressed:YES]; - break; - - case 4: - [self setRightPressed:NO]; - [self setStartPressed:YES]; - break; - - case 5: - [self setStartPressed:NO]; - [self setBackPressed:YES]; - break; - - case 6: - [self setBackPressed:NO]; - [self setLeftStickPressed:YES]; - break; - - case 7: - [self setLeftStickPressed:NO]; - [self setRightStickPressed:YES]; - break; - - case 8: - [self setRightStickPressed:NO]; - [self setLbPressed:YES]; - break; - - case 9: - [self setLbPressed:NO]; - [self setRbPressed:YES]; - break; - - case 10: - [self setRbPressed:NO]; - [self setHomePressed:YES]; - break; - - case 11: - [self setHomePressed:NO]; - [self setAPressed:YES]; - break; - - case 12: - [self setAPressed:NO]; - [self setBPressed:YES]; - break; - - case 13: - [self setBPressed:NO]; - [self setXPressed:YES]; - break; - - case 14: - [self setXPressed:NO]; - [self setYPressed:YES]; - break; - - case 15: - [self setYPressed:NO]; - break; - - default: - break; - } -} - -- (void)resetMapping { - for (int i = 0; i < 15; i++) { - mapping[i] = i; - } - for (int i = 12; i < 16; i++) { - mapping[i-1] = i; - } -} - -- (void)resetWithOwner:(Pref360ControlPref *)prefPref { - pref = prefPref; - [self reset]; -} - -- (void)reset { - if (pref == nil) - NSLog(@"Unable to reset remapping (pref is nil)"); - [self resetMapping]; - [self stopMapping]; -} - -- (void)awakeFromNib { - [super awakeFromNib]; - _isMapping = NO; - [self resetMapping]; - [[BindingTableView tableView] reloadData]; -} - -@end diff --git a/Pref360Control/Pref360Control.xcodeproj/project.pbxproj b/Pref360Control/Pref360Control.xcodeproj/project.pbxproj new file mode 100644 index 00000000..f50d2a06 --- /dev/null +++ b/Pref360Control/Pref360Control.xcodeproj/project.pbxproj @@ -0,0 +1,507 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 3B04BE7313763D04005FA9F8 /* DeviceLister.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B04BE7113763D04005FA9F8 /* DeviceLister.h */; }; + 3B04BE7413763D04005FA9F8 /* DeviceLister.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B04BE7213763D04005FA9F8 /* DeviceLister.m */; }; + 3B04BEA61376416D005FA9F8 /* DriverTool in Resources */ = {isa = PBXBuildFile; fileRef = 3B04BEA51376416D005FA9F8 /* DriverTool */; }; + 3B47D9ED0B93C2BF00F200B8 /* battNone.tif in Resources */ = {isa = PBXBuildFile; fileRef = 3B47D9EC0B93C2BF00F200B8 /* battNone.tif */; }; + 3B47D9F20B93C31400F200B8 /* batt1.tif in Resources */ = {isa = PBXBuildFile; fileRef = 3B47D9EE0B93C31400F200B8 /* batt1.tif */; }; + 3B47D9F30B93C31400F200B8 /* batt0.tif in Resources */ = {isa = PBXBuildFile; fileRef = 3B47D9EF0B93C31400F200B8 /* batt0.tif */; }; + 3B47D9F40B93C31400F200B8 /* batt3.tif in Resources */ = {isa = PBXBuildFile; fileRef = 3B47D9F00B93C31400F200B8 /* batt3.tif */; }; + 3B47D9F50B93C31400F200B8 /* batt2.tif in Resources */ = {isa = PBXBuildFile; fileRef = 3B47D9F10B93C31400F200B8 /* batt2.tif */; }; + 3B86987F0CE2A22100283CEC /* ControlPrefs.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B86987D0CE2A22100283CEC /* ControlPrefs.h */; }; + 3B8698800CE2A22100283CEC /* ControlPrefs.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B86987E0CE2A22100283CEC /* ControlPrefs.m */; }; + 3B8B91321376FC120047D446 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B8B91311376FC120047D446 /* Security.framework */; }; + 3BBEAB01096B2C4C00F2E37B /* MyAnalogStick.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BBEAAFF096B2C4C00F2E37B /* MyAnalogStick.h */; }; + 3BBEAB02096B2C4C00F2E37B /* MyAnalogStick.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BBEAB00096B2C4C00F2E37B /* MyAnalogStick.m */; }; + 3BBEAB05096B2C5200F2E37B /* MyCentreButtons.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BBEAB03096B2C5200F2E37B /* MyCentreButtons.m */; }; + 3BBEAB06096B2C5200F2E37B /* MyCentreButtons.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BBEAB04096B2C5200F2E37B /* MyCentreButtons.h */; }; + 3BBEAB09096B2C5600F2E37B /* MyDigitalStick.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BBEAB07096B2C5600F2E37B /* MyDigitalStick.m */; }; + 3BBEAB0A096B2C5600F2E37B /* MyDigitalStick.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BBEAB08096B2C5600F2E37B /* MyDigitalStick.h */; }; + 3BBEAB0D096B2C5B00F2E37B /* MyMainButtons.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BBEAB0B096B2C5B00F2E37B /* MyMainButtons.h */; }; + 3BBEAB0E096B2C5B00F2E37B /* MyMainButtons.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BBEAB0C096B2C5B00F2E37B /* MyMainButtons.m */; }; + 3BBEAB11096B2C6000F2E37B /* MyShoulderButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BBEAB0F096B2C6000F2E37B /* MyShoulderButton.h */; }; + 3BBEAB12096B2C6000F2E37B /* MyShoulderButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BBEAB10096B2C6000F2E37B /* MyShoulderButton.m */; }; + 3BBEAB2D096B6EDE00F2E37B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BBEAB2C096B6EDE00F2E37B /* IOKit.framework */; }; + 3BC41F32096C85CB00664A42 /* DeviceItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BC41F30096C85CB00664A42 /* DeviceItem.h */; }; + 3BC41F33096C85CB00664A42 /* DeviceItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BC41F31096C85CB00664A42 /* DeviceItem.m */; }; + 3BC41F47096C8D0300664A42 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BC41F46096C8D0300664A42 /* ForceFeedback.framework */; }; + 8D202CEA0486D31800D8A456 /* Pref360Control_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32DBCFA20370C41700C91783 /* Pref360Control_Prefix.pch */; }; + 8D202CEB0486D31800D8A456 /* Pref360ControlPref.h in Headers */ = {isa = PBXBuildFile; fileRef = F506C03C013D9D7901CA16C8 /* Pref360ControlPref.h */; }; + 8D202CED0486D31800D8A456 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; + 8D202CEE0486D31800D8A456 /* Pref360ControlPref.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F506C040013D9D8001CA16C8 /* Pref360ControlPref.tiff */; }; + 8D202CEF0486D31800D8A456 /* Pref360ControlPref.nib in Resources */ = {isa = PBXBuildFile; fileRef = F506C042013D9D8C01CA16C8 /* Pref360ControlPref.nib */; }; + 8D202CF10486D31800D8A456 /* Pref360ControlPref.m in Sources */ = {isa = PBXBuildFile; fileRef = F506C03D013D9D7901CA16C8 /* Pref360ControlPref.m */; }; + 8D202CF30486D31800D8A456 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; }; + 8D202CF40486D31800D8A456 /* PreferencePanes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F506C035013D953901CA16C8 /* PreferencePanes.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 32DBCFA20370C41700C91783 /* Pref360Control_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pref360Control_Prefix.pch; sourceTree = ""; }; + 3B04BE7113763D04005FA9F8 /* DeviceLister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceLister.h; sourceTree = ""; }; + 3B04BE7213763D04005FA9F8 /* DeviceLister.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeviceLister.m; sourceTree = ""; }; + 3B04BEA51376416D005FA9F8 /* DriverTool */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = DriverTool; path = ../DriverTool/build/Release/DriverTool; sourceTree = SOURCE_ROOT; }; + 3B47D9EC0B93C2BF00F200B8 /* battNone.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = battNone.tif; sourceTree = ""; }; + 3B47D9EE0B93C31400F200B8 /* batt1.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = batt1.tif; sourceTree = ""; }; + 3B47D9EF0B93C31400F200B8 /* batt0.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = batt0.tif; sourceTree = ""; }; + 3B47D9F00B93C31400F200B8 /* batt3.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = batt3.tif; sourceTree = ""; }; + 3B47D9F10B93C31400F200B8 /* batt2.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = batt2.tif; sourceTree = ""; }; + 3B86987D0CE2A22100283CEC /* ControlPrefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ControlPrefs.h; path = ../360Daemon/ControlPrefs.h; sourceTree = SOURCE_ROOT; }; + 3B86987E0CE2A22100283CEC /* ControlPrefs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ControlPrefs.m; path = ../360Daemon/ControlPrefs.m; sourceTree = SOURCE_ROOT; }; + 3B8B91311376FC120047D446 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; + 3BBEAAFF096B2C4C00F2E37B /* MyAnalogStick.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MyAnalogStick.h; sourceTree = ""; }; + 3BBEAB00096B2C4C00F2E37B /* MyAnalogStick.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MyAnalogStick.m; sourceTree = ""; }; + 3BBEAB03096B2C5200F2E37B /* MyCentreButtons.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MyCentreButtons.m; sourceTree = ""; }; + 3BBEAB04096B2C5200F2E37B /* MyCentreButtons.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MyCentreButtons.h; sourceTree = ""; }; + 3BBEAB07096B2C5600F2E37B /* MyDigitalStick.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MyDigitalStick.m; sourceTree = ""; }; + 3BBEAB08096B2C5600F2E37B /* MyDigitalStick.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MyDigitalStick.h; sourceTree = ""; }; + 3BBEAB0B096B2C5B00F2E37B /* MyMainButtons.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MyMainButtons.h; sourceTree = ""; }; + 3BBEAB0C096B2C5B00F2E37B /* MyMainButtons.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MyMainButtons.m; sourceTree = ""; }; + 3BBEAB0F096B2C6000F2E37B /* MyShoulderButton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MyShoulderButton.h; sourceTree = ""; }; + 3BBEAB10096B2C6000F2E37B /* MyShoulderButton.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MyShoulderButton.m; sourceTree = ""; }; + 3BBEAB2C096B6EDE00F2E37B /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; + 3BC41F30096C85CB00664A42 /* DeviceItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceItem.h; sourceTree = ""; }; + 3BC41F31096C85CB00664A42 /* DeviceItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeviceItem.m; sourceTree = ""; }; + 3BC41F46096C8D0300664A42 /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = /System/Library/Frameworks/ForceFeedback.framework; sourceTree = ""; }; + 8D202CF70486D31800D8A456 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 8D202CF80486D31800D8A456 /* Pref360Control.prefPane */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Pref360Control.prefPane; sourceTree = BUILT_PRODUCTS_DIR; }; + F506C035013D953901CA16C8 /* PreferencePanes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PreferencePanes.framework; path = /System/Library/Frameworks/PreferencePanes.framework; sourceTree = ""; }; + F506C03C013D9D7901CA16C8 /* Pref360ControlPref.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pref360ControlPref.h; sourceTree = ""; }; + F506C03D013D9D7901CA16C8 /* Pref360ControlPref.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Pref360ControlPref.m; sourceTree = ""; }; + F506C040013D9D8001CA16C8 /* Pref360ControlPref.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Pref360ControlPref.tiff; sourceTree = ""; }; + F506C043013D9D8C01CA16C8 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/Pref360ControlPref.nib; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D202CF20486D31800D8A456 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D202CF30486D31800D8A456 /* Cocoa.framework in Frameworks */, + 8D202CF40486D31800D8A456 /* PreferencePanes.framework in Frameworks */, + 3BBEAB2D096B6EDE00F2E37B /* IOKit.framework in Frameworks */, + 3BC41F47096C8D0300664A42 /* ForceFeedback.framework in Frameworks */, + 3B8B91321376FC120047D446 /* Security.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* Pref360Control */ = { + isa = PBXGroup; + children = ( + 08FB77AFFE84173DC02AAC07 /* Classes */, + 32DBCFA10370C40200C91783 /* Other Sources */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, + 19C28FB8FE9D52D311CA2CBB /* Products */, + ); + name = Pref360Control; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */, + 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */, + ); + name = "Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 3B04BEA51376416D005FA9F8 /* DriverTool */, + 8D202CF70486D31800D8A456 /* Info.plist */, + 089C167DFE841241C02AAC07 /* InfoPlist.strings */, + F506C040013D9D8001CA16C8 /* Pref360ControlPref.tiff */, + F506C042013D9D8C01CA16C8 /* Pref360ControlPref.nib */, + 3B47D9EC0B93C2BF00F200B8 /* battNone.tif */, + 3B47D9EF0B93C31400F200B8 /* batt0.tif */, + 3B47D9EE0B93C31400F200B8 /* batt1.tif */, + 3B47D9F10B93C31400F200B8 /* batt2.tif */, + 3B47D9F00B93C31400F200B8 /* batt3.tif */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77AFFE84173DC02AAC07 /* Classes */ = { + isa = PBXGroup; + children = ( + 3B86987D0CE2A22100283CEC /* ControlPrefs.h */, + 3B86987E0CE2A22100283CEC /* ControlPrefs.m */, + F506C03C013D9D7901CA16C8 /* Pref360ControlPref.h */, + F506C03D013D9D7901CA16C8 /* Pref360ControlPref.m */, + 3BBEAAFF096B2C4C00F2E37B /* MyAnalogStick.h */, + 3BBEAB00096B2C4C00F2E37B /* MyAnalogStick.m */, + 3BBEAB04096B2C5200F2E37B /* MyCentreButtons.h */, + 3BBEAB03096B2C5200F2E37B /* MyCentreButtons.m */, + 3BBEAB08096B2C5600F2E37B /* MyDigitalStick.h */, + 3BBEAB07096B2C5600F2E37B /* MyDigitalStick.m */, + 3BBEAB0B096B2C5B00F2E37B /* MyMainButtons.h */, + 3BBEAB0C096B2C5B00F2E37B /* MyMainButtons.m */, + 3BBEAB0F096B2C6000F2E37B /* MyShoulderButton.h */, + 3BBEAB10096B2C6000F2E37B /* MyShoulderButton.m */, + 3BC41F30096C85CB00664A42 /* DeviceItem.h */, + 3BC41F31096C85CB00664A42 /* DeviceItem.m */, + 3B04BE7113763D04005FA9F8 /* DeviceLister.h */, + 3B04BE7213763D04005FA9F8 /* DeviceLister.m */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 3BC41F46096C8D0300664A42 /* ForceFeedback.framework */, + 3BBEAB2C096B6EDE00F2E37B /* IOKit.framework */, + 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */, + F506C035013D953901CA16C8 /* PreferencePanes.framework */, + 3B8B91311376FC120047D446 /* Security.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 089C1672FE841209C02AAC07 /* Foundation.framework */, + 089C167FFE841241C02AAC07 /* AppKit.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FB8FE9D52D311CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D202CF80486D31800D8A456 /* Pref360Control.prefPane */, + ); + name = Products; + sourceTree = ""; + }; + 32DBCFA10370C40200C91783 /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32DBCFA20370C41700C91783 /* Pref360Control_Prefix.pch */, + ); + name = "Other Sources"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 8D202CE90486D31800D8A456 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D202CEA0486D31800D8A456 /* Pref360Control_Prefix.pch in Headers */, + 8D202CEB0486D31800D8A456 /* Pref360ControlPref.h in Headers */, + 3BBEAB01096B2C4C00F2E37B /* MyAnalogStick.h in Headers */, + 3BBEAB06096B2C5200F2E37B /* MyCentreButtons.h in Headers */, + 3BBEAB0A096B2C5600F2E37B /* MyDigitalStick.h in Headers */, + 3BBEAB0D096B2C5B00F2E37B /* MyMainButtons.h in Headers */, + 3BBEAB11096B2C6000F2E37B /* MyShoulderButton.h in Headers */, + 3BC41F32096C85CB00664A42 /* DeviceItem.h in Headers */, + 3B86987F0CE2A22100283CEC /* ControlPrefs.h in Headers */, + 3B04BE7313763D04005FA9F8 /* DeviceLister.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 8D202CE80486D31800D8A456 /* Pref360Control */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3BBDC6A5097946B50023AAD8 /* Build configuration list for PBXNativeTarget "Pref360Control" */; + buildPhases = ( + 8D202CE90486D31800D8A456 /* Headers */, + 8D202CEC0486D31800D8A456 /* Resources */, + 8D202CF00486D31800D8A456 /* Sources */, + 8D202CF20486D31800D8A456 /* Frameworks */, + 8D202CF50486D31800D8A456 /* Rez */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Pref360Control; + productInstallPath = "$(HOME)/Library/PreferencePanes"; + productName = Pref360Control; + productReference = 8D202CF80486D31800D8A456 /* Pref360Control.prefPane */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 3BBDC6A9097946B50023AAD8 /* Build configuration list for PBXProject "Pref360Control" */; + compatibilityVersion = "Xcode 3.0"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 089C166AFE841209C02AAC07 /* Pref360Control */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D202CE80486D31800D8A456 /* Pref360Control */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D202CEC0486D31800D8A456 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D202CED0486D31800D8A456 /* InfoPlist.strings in Resources */, + 8D202CEE0486D31800D8A456 /* Pref360ControlPref.tiff in Resources */, + 8D202CEF0486D31800D8A456 /* Pref360ControlPref.nib in Resources */, + 3B47D9ED0B93C2BF00F200B8 /* battNone.tif in Resources */, + 3B47D9F20B93C31400F200B8 /* batt1.tif in Resources */, + 3B47D9F30B93C31400F200B8 /* batt0.tif in Resources */, + 3B47D9F40B93C31400F200B8 /* batt3.tif in Resources */, + 3B47D9F50B93C31400F200B8 /* batt2.tif in Resources */, + 3B04BEA61376416D005FA9F8 /* DriverTool in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 8D202CF50486D31800D8A456 /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D202CF00486D31800D8A456 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D202CF10486D31800D8A456 /* Pref360ControlPref.m in Sources */, + 3BBEAB02096B2C4C00F2E37B /* MyAnalogStick.m in Sources */, + 3BBEAB05096B2C5200F2E37B /* MyCentreButtons.m in Sources */, + 3BBEAB09096B2C5600F2E37B /* MyDigitalStick.m in Sources */, + 3BBEAB0E096B2C5B00F2E37B /* MyMainButtons.m in Sources */, + 3BBEAB12096B2C6000F2E37B /* MyShoulderButton.m in Sources */, + 3BC41F33096C85CB00664A42 /* DeviceItem.m in Sources */, + 3B8698800CE2A22100283CEC /* ControlPrefs.m in Sources */, + 3B04BE7413763D04005FA9F8 /* DeviceLister.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + F506C042013D9D8C01CA16C8 /* Pref360ControlPref.nib */ = { + isa = PBXVariantGroup; + children = ( + F506C043013D9D8C01CA16C8 /* English */, + ); + name = Pref360ControlPref.nib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3BBDC6A6097946B50023AAD8 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + COPY_PHASE_STRIP = NO; + DEBUGGING_SYMBOLS = YES; + FRAMEWORK_SEARCH_PATHS = ""; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + "GCC_ENABLE_OBJC_GC[arch=x86_64]" = supported; + GCC_ENABLE_TRIGRAPHS = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Pref360Control_Prefix.pch; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/PreferencePanes"; + LIBRARY_SEARCH_PATHS = ""; + LIBRARY_STYLE = Bundle; + MACOSX_DEPLOYMENT_TARGET = 10.5; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ( + "-bundle", + "-twolevel_namespace", + ); + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Pref360Control; + SDKROOT = ""; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = prefPane; + ZERO_LINK = YES; + }; + name = Development; + }; + 3BBDC6A7097946B50023AAD8 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + FRAMEWORK_SEARCH_PATHS = ""; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + "GCC_ENABLE_OBJC_GC[arch=x86_64]" = supported; + GCC_ENABLE_TRIGRAPHS = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Pref360Control_Prefix.pch; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/PreferencePanes"; + LIBRARY_SEARCH_PATHS = ""; + LIBRARY_STYLE = Bundle; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ( + "-bundle", + "-twolevel_namespace", + ); + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Pref360Control; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = prefPane; + ZERO_LINK = NO; + }; + name = Deployment; + }; + 3BBDC6A8097946B50023AAD8 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ""; + "GCC_ENABLE_OBJC_GC[arch=x86_64]" = supported; + GCC_ENABLE_TRIGRAPHS = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Pref360Control_Prefix.pch; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/PreferencePanes"; + LIBRARY_SEARCH_PATHS = ""; + LIBRARY_STYLE = Bundle; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ( + "-bundle", + "-twolevel_namespace", + ); + OTHER_REZFLAGS = ""; + PRODUCT_NAME = Pref360Control; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = prefPane; + }; + name = Default; + }; + 3BBDC6AA097946B50023AAD8 /* Development */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Development; + }; + 3BBDC6AB097946B50023AAD8 /* Deployment */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Deployment; + }; + 3BBDC6AC097946B50023AAD8 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Default; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3BBDC6A5097946B50023AAD8 /* Build configuration list for PBXNativeTarget "Pref360Control" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3BBDC6A6097946B50023AAD8 /* Development */, + 3BBDC6A7097946B50023AAD8 /* Deployment */, + 3BBDC6A8097946B50023AAD8 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + 3BBDC6A9097946B50023AAD8 /* Build configuration list for PBXProject "Pref360Control" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3BBDC6AA097946B50023AAD8 /* Development */, + 3BBDC6AB097946B50023AAD8 /* Deployment */, + 3BBDC6AC097946B50023AAD8 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/Pref360Control/Pref360ControlPref.h b/Pref360Control/Pref360ControlPref.h index e7096000..28f4b81d 100644 --- a/Pref360Control/Pref360ControlPref.h +++ b/Pref360Control/Pref360ControlPref.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + Pref360ControlPref.h - definition for the pref pane class - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -23,94 +23,71 @@ #import -#include -#include -#include -#include -#include - -@class MyWhole360Controller; -@class MyWhole360ControllerMapper; -@class MyTrigger; -@class MyBatteryMonitor; -@class MyDeadZoneViewer; -@class MyAnalogStick; -@class DeviceLister; - -typedef NS_ENUM(NSUInteger, ControllerType) { - Xbox360Controller = 0, - XboxOriginalController = 1, - XboxOneController = 2, - XboxOnePretend360Controller = 3, - Xbox360Pretend360Controller = 4 -} controllerType; - -@interface Pref360ControlPref : NSPreferencePane -// Window components -@property (weak) IBOutlet NSPopUpButton *deviceList; -@property (weak) IBOutlet NSButton *leftLinked; -@property (weak) IBOutlet NSSlider *leftStickDeadzone; -@property (weak) IBOutlet NSButton *leftStickInvertX; -@property (weak) IBOutlet NSButton *leftStickInvertY; -@property (weak) IBOutlet NSButton *rightLinked; -@property (weak) IBOutlet NSSlider *rightStickDeadzone; -@property (weak) IBOutlet NSButton *rightStickInvertX; -@property (weak) IBOutlet NSButton *rightStickInvertY; -@property (weak) IBOutlet DeviceLister *deviceLister; -@property (weak) IBOutlet NSButton *powerOff; -@property (weak) IBOutlet MyWhole360Controller *wholeController; -@property (weak) IBOutlet MyTrigger *leftTrigger; -@property (weak) IBOutlet MyTrigger *rightTrigger; -@property (weak) IBOutlet MyBatteryMonitor *batteryStatus; -@property (weak) IBOutlet MyDeadZoneViewer *leftDeadZone; -@property (weak) IBOutlet MyDeadZoneViewer *rightDeadZone; -@property (strong) IBOutlet NSPopover *aboutPopover; -@property (weak) IBOutlet NSPopUpButton *rumbleOptions; -@property (weak) IBOutlet NSButton *swapSticks; +#import +#import +#import +#import +#import -// Binding Tab -@property (weak) IBOutlet NSPopUpButton *deviceListBinding; -@property (weak) IBOutlet MyWhole360ControllerMapper *wholeControllerMapper; -@property (weak) IBOutlet NSTabView *tabView; -@property (weak) IBOutlet NSButton *remappingButton; -@property (weak) IBOutlet NSTableView *mappingTable; -@property (weak) IBOutlet NSButton *remappingResetButton; +#include "MyCentreButtons.h" +#include "MyDigitalStick.h" +#include "MyAnalogStick.h" +#include "MyMainButtons.h" +#include "MyShoulderButton.h" -// Advanced Tab -@property (weak) IBOutlet NSPopUpButton *deviceListAdvanced; -// Advanced Tab - Options -@property (weak) IBOutlet NSButton *enableDriverCheckBox; -@property (weak) IBOutlet NSButton *uninstallDriverButton; -// Advanced Tab - Deadzones -@property (weak) IBOutlet MyAnalogStick *leftStickAnalog; -@property (weak) IBOutlet MyAnalogStick *rightStickAnalog; -@property (weak) IBOutlet NSButton *leftLinkedAlt; -@property (weak) IBOutlet NSSlider *leftStickDeadzoneAlt; -@property (weak) IBOutlet NSButton *leftStickInvertXAlt; -@property (weak) IBOutlet NSButton *leftStickInvertYAlt; -@property (weak) IBOutlet NSButton *leftStickNormalize; -@property (weak) IBOutlet NSButton *rightLinkedAlt; -@property (weak) IBOutlet NSSlider *rightStickDeadzoneAlt; -@property (weak) IBOutlet NSButton *rightStickInvertXAlt; -@property (weak) IBOutlet NSButton *rightStickInvertYAlt; -@property (weak) IBOutlet NSButton *rightStickNormalize; -@property (weak) IBOutlet NSButton *pretend360Button; - -// About Tab -/* put About Tab's @properties here */ +@class DeviceLister; -// Internal info -@property (readonly) mach_port_t masterPort; +@interface Pref360ControlPref : NSPreferencePane +{ + // Window components + IBOutlet MyCentreButtons *centreButtons; + IBOutlet NSPopUpButton *deviceList; + IBOutlet MyDigitalStick *digiStick; + IBOutlet MyShoulderButton *leftShoulder; + IBOutlet MyAnalogStick *leftStick; + IBOutlet NSButton *leftLinked; + IBOutlet NSSlider *leftStickDeadzone; + IBOutlet NSButton *leftStickInvertX; + IBOutlet NSButton *leftStickInvertY; + IBOutlet NSProgressIndicator *leftTrigger; + IBOutlet MyMainButtons *rightButtons; + IBOutlet MyShoulderButton *rightShoulder; + IBOutlet MyAnalogStick *rightStick; + IBOutlet NSButton *rightLinked; + IBOutlet NSSlider *rightStickDeadzone; + IBOutlet NSButton *rightStickInvertX; + IBOutlet NSButton *rightStickInvertY; + IBOutlet NSProgressIndicator *rightTrigger; + IBOutlet NSImageView *batteryLevel; + IBOutlet DeviceLister *deviceLister; + IBOutlet NSButton *powerOff; + // Internal info + mach_port_t masterPort; + NSMutableArray *deviceArray; + IOHIDElementCookie axis[6],buttons[15]; + + IOHIDDeviceInterface122 **device; + IOHIDQueueInterface **hidQueue; + FFDeviceObjectReference ffDevice; + io_registry_entry_t registryEntry; + + int largeMotor,smallMotor; + + IONotificationPortRef notifyPort; + CFRunLoopSourceRef notifySource; + io_iterator_t onIteratorWired, offIteratorWired; + io_iterator_t onIteratorWireless, offIteratorWireless; +} + +- (void)mainViewDidLoad; - (void)eventQueueFired:(void*)sender withResult:(IOReturn)result; - (void)handleDeviceChange; +- (IBAction)showDeviceList:(id)sender; - (IBAction)powerOff:(id)sender; -- (IBAction)selectDevice:(id)sender; -- (IBAction)changeSetting:(id)sender; -- (IBAction)toggleDriverEnabled:(NSButton *)sender; -- (IBAction)willPerformUninstallation:(id)sender; +- (mach_port_t)masterPort; @end diff --git a/Pref360Control/Pref360ControlPref.m b/Pref360Control/Pref360ControlPref.m index 4669940c..3f700a0f 100644 --- a/Pref360Control/Pref360ControlPref.m +++ b/Pref360Control/Pref360ControlPref.m @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + Pref360ControlPref.m - main source of the pref pane - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -26,200 +26,114 @@ #import "DeviceItem.h" #import "ControlPrefs.h" #import "DeviceLister.h" -#import "MyWhole360Controller.h" -#import "MyWhole360ControllerMapper.h" -#import "MyTrigger.h" -#import "MyDeadZoneViewer.h" -#import "MyBatteryMonitor.h" -#import "MyAnalogStick.h" - -#define NO_ITEMS @"No devices found" - -@interface NSLayoutConstraint (Description) - -@end -@implementation NSLayoutConstraint (Description) - --(NSString *)description { - return [NSString stringWithFormat:@"id: %@, constant: %f", self.identifier, self.constant]; -} - -@end +#define NO_ITEMS @"No devices found" // Passes a C callback back to the Objective C class static void CallbackFunction(void *target,IOReturn result,void *refCon,void *sender) { - if (target) [((__bridge Pref360ControlPref*)target) eventQueueFired:sender withResult:result]; + if(target!=NULL) [((Pref360ControlPref*)target) eventQueueFired:sender withResult:result]; } // Handle callback for when our device is connected or disconnected. Both events are // actually handled identically. static void callbackHandleDevice(void *param,io_iterator_t iterator) { - io_service_t object = 0; - BOOL update = NO; - - while ((object = IOIteratorNext(iterator))) { + io_service_t object=0; + BOOL update; + + update=FALSE; + while((object=IOIteratorNext(iterator))!=0) { IOObjectRelease(object); - update = YES; + update=TRUE; } - - if (update) [(__bridge Pref360ControlPref*)param handleDeviceChange]; + if(update) [(Pref360ControlPref*)param handleDeviceChange]; } -@interface Pref360ControlPref () -@property (strong) NSMutableArray *deviceArray; -@end - @implementation Pref360ControlPref -{ -@private - // Internal info - IOHIDElementCookie axis[6],buttons[15]; - - IOHIDDeviceInterface122 **device; - IOHIDQueueInterface **hidQueue; - FFDeviceObjectReference ffDevice; - io_registry_entry_t registryEntry; - - int largeMotor, smallMotor; - - IONotificationPortRef notifyPort; - CFRunLoopSourceRef notifySource; - io_iterator_t onIteratorWired, offIteratorWired; - io_iterator_t onIteratorWireless, offIteratorWireless; - - FFEFFECT *effect; - FFCUSTOMFORCE *customforce; - FFEffectObjectReference effectRef; -} - - --(void)awakeFromNib { - [_aboutPopover setAppearance:NSPopoverAppearanceHUD]; - [_rumbleOptions removeAllItems]; - [_rumbleOptions addItemsWithTitles:@[@"Default", @"None"]]; -} // Set the pattern on the LEDs - (void)updateLED:(int)ledIndex { - FFEFFESCAPE escape = {0}; - unsigned char c = ledIndex; - - if (ffDevice == 0) return; - escape.dwSize = sizeof(escape); - escape.dwCommand = 0x02; - escape.cbInBuffer = sizeof(c); - escape.lpvInBuffer = &c; - FFDeviceEscape(ffDevice, &escape); + FFEFFESCAPE escape; + unsigned char c; + + if(ffDevice==0) return; + c=ledIndex; + escape.dwSize=sizeof(escape); + escape.dwCommand=0x02; + escape.cbInBuffer=sizeof(c); + escape.lpvInBuffer=&c; + escape.cbOutBuffer=0; + escape.lpvOutBuffer=NULL; + FFDeviceEscape(ffDevice,&escape); } -// This will initialize the ff effect. -- (void)testMotorsInit +// Enables and disables the rumble motor "override" +- (void)setMotorOverride:(BOOL)enable { - if (ffDevice == 0) return; - - FFCAPABILITIES capabs; - FFDeviceGetForceFeedbackCapabilities(ffDevice, &capabs); - - if(capabs.numFfAxes != 2) return; - - effect = calloc(1, sizeof(FFEFFECT)); - customforce = calloc(1, sizeof(FFCUSTOMFORCE)); - LONG *c = calloc(2, sizeof(LONG)); - DWORD *a = calloc(2, sizeof(DWORD)); - LONG *d = calloc(2, sizeof(LONG)); - - c[0] = 0; - c[1] = 0; - a[0] = capabs.ffAxes[0]; - a[1] = capabs.ffAxes[1]; - d[0] = 0; - d[1] = 0; - - customforce->cChannels = 2; - customforce->cSamples = 2; - customforce->rglForceData = c; - customforce->dwSamplePeriod = 100*1000; - - effect->cAxes = capabs.numFfAxes; - effect->rglDirection = d; - effect->rgdwAxes = a; - effect->dwSamplePeriod = 0; - effect->dwGain = 10000; - effect->dwFlags = FFEFF_OBJECTOFFSETS | FFEFF_SPHERICAL; - effect->dwSize = sizeof(FFEFFECT); - effect->dwDuration = FF_INFINITE; - effect->dwSamplePeriod = 100*1000; - effect->cbTypeSpecificParams = sizeof(FFCUSTOMFORCE); - effect->lpvTypeSpecificParams = customforce; - effect->lpEnvelope = NULL; - FFDeviceCreateEffect(ffDevice, kFFEffectType_CustomForce_ID, effect, &effectRef); + FFEFFESCAPE escape; + char c; + + if(ffDevice==0) return; + // If true, the motors will no longer obey any Force Feedback Framework + // effects, and the motors may be controlled directly. False and the + // motors will perform effects but can not be directly controlled. + c=enable?0x01:0x00; + escape.dwSize=sizeof(escape); + escape.dwCommand=0x00; + escape.cbInBuffer=sizeof(c); + escape.lpvInBuffer=&c; + escape.cbOutBuffer=0; + escape.lpvOutBuffer=NULL; + FFDeviceEscape(ffDevice,&escape); } -- (void)testMotorsCleanUp -{ - if (effectRef == NULL) return; - FFDeviceReleaseEffect(ffDevice, effectRef); - free(customforce->rglForceData); - free(effect->rgdwAxes); - free(effect->rglDirection); - free(customforce); - free(effect); -} +// If the direct rumble control is enabled, this will set the motors +// to the desired speed. - (void)testMotorsLarge:(unsigned char)large small:(unsigned char)small { - if (effectRef == NULL) return; - customforce->rglForceData[0] = (large * 10000) / 255; - customforce->rglForceData[1] = (small * 10000) / 255; - FFEffectSetParameters(effectRef, effect, FFEP_TYPESPECIFICPARAMS); - FFEffectStart(effectRef, 1, 0); + FFEFFESCAPE escape; + char c[2]; + + if(ffDevice==0) return; + c[0]=large; + c[1]=small; + escape.dwSize=sizeof(escape); + escape.dwCommand=0x01; + escape.cbInBuffer=sizeof(c); + escape.lpvInBuffer=c; + escape.cbOutBuffer=0; + escape.lpvOutBuffer=NULL; + FFDeviceEscape(ffDevice,&escape); } // Update axis GUI component - (void)axisChanged:(int)index newValue:(int)value { - NSInteger tabIndex = [_tabView indexOfTabViewItem:[_tabView selectedTabViewItem]]; - switch(index) { case 0: - [_wholeController setLeftStickXPos:value]; - [_leftStickAnalog setPositionX:value]; + [leftStick setPositionX:value]; break; - case 1: - [_wholeController setLeftStickYPos:value]; - [_leftStickAnalog setPositionY:value]; + [leftStick setPositionY:value]; break; - case 2: - [_wholeController setRightStickXPos:value]; - [_rightStickAnalog setPositionX:value]; + [rightStick setPositionX:value]; break; - case 3: - [_wholeController setRightStickYPos:value]; - [_rightStickAnalog setPositionY:value]; + [rightStick setPositionY:value]; break; - case 4: - if (tabIndex == 0) { // Controller Test - [_leftTrigger setVal:value]; - largeMotor=value; - [self testMotorsLarge:largeMotor small:smallMotor]; - } + [leftTrigger setDoubleValue:value]; + largeMotor=value; +// [self testMotorsLarge:largeMotor small:smallMotor]; break; - case 5: - if (tabIndex == 0) { - [_rightTrigger setVal:value]; - smallMotor=value; - [self testMotorsLarge:largeMotor small:smallMotor]; - } + [rightTrigger setDoubleValue:value]; + smallMotor=value; +// [self testMotorsLarge:largeMotor small:smallMotor]; break; - default: break; } @@ -228,109 +142,85 @@ - (void)axisChanged:(int)index newValue:(int)value // Update button GUI component - (void)buttonChanged:(int)index newValue:(int)value { - BOOL b = (value != 0); - NSInteger tabIndex = [_tabView indexOfTabViewItem:[_tabView selectedTabViewItem]]; - - if (tabIndex == 0) { // Controller Test - switch (index) { - case 0: - [_wholeController setAPressed:b]; - break; - - case 1: - [_wholeController setBPressed:b]; - break; - - case 2: - [_wholeController setXPressed:b]; - break; - - case 3: - [_wholeController setYPressed:b]; - break; - - case 4: - [_wholeController setLbPressed:b]; - break; - - case 5: - [_wholeController setRbPressed:b]; - break; - - case 6: - [_wholeController setLeftStickPressed:b]; - break; - - case 7: - [_wholeController setRightStickPressed:b]; - break; - - case 8: - [_wholeController setStartPressed:b]; - break; - - case 9: - [_wholeController setBackPressed:b]; - break; - - case 10: - [_wholeController setHomePressed:b]; - break; - - case 11: - [_wholeController setUpPressed:b]; - break; - - case 12: - [_wholeController setDownPressed:b]; - break; - - case 13: - [_wholeController setLeftPressed:b]; - break; - - case 14: - [_wholeController setRightPressed:b]; - break; - - default: - break; - } - } - else if (tabIndex == 1) { // Tweaks - if ([_wholeControllerMapper isMapping]) { - if (b == YES) { - [_wholeControllerMapper buttonPressedAtIndex:index]; - } - } + BOOL b; + + b=value!=0; + switch(index) { + case 0: + [rightButtons setA:b]; + break; + case 1: + [rightButtons setB:b]; + break; + case 2: + [rightButtons setX:b]; + break; + case 3: + [rightButtons setY:b]; + break; + case 4: + [leftShoulder setPressed:b]; + break; + case 5: + [rightShoulder setPressed:b]; + break; + case 6: + [leftStick setPressed:b]; + break; + case 7: + [rightStick setPressed:b]; + break; + case 8: + [centreButtons setStart:b]; + break; + case 9: + [centreButtons setBack:b]; + break; + case 10: + [centreButtons setSpecific:b]; + break; + case 11: + [digiStick setUp:b]; + break; + case 12: + [digiStick setDown:b]; + break; + case 13: + [digiStick setLeft:b]; + break; + case 14: + [digiStick setRight:b]; + break; + default: + break; } } // Handle message from I/O Kit indicating something happened on the device - (void)eventQueueFired:(void*)sender withResult:(IOReturn)result { - AbsoluteTime zeroTime = {0,0}; + AbsoluteTime zeroTime={0,0}; IOHIDEventStruct event; - BOOL found = NO; + BOOL found; int i; - - if (sender != hidQueue) return; - while (result == kIOReturnSuccess) { - result = (*hidQueue)->getNextEvent(hidQueue,&event,zeroTime,0); - if (result != kIOReturnSuccess) continue; + + if(sender!=hidQueue) return; + while(result==kIOReturnSuccess) { + result=(*hidQueue)->getNextEvent(hidQueue,&event,zeroTime,0); + if(result!=kIOReturnSuccess) continue; // Check axis - for (i = 0, found = NO; (i < 6) && !found; i++) { - if (event.elementCookie == axis[i]) { + for(i=0,found=FALSE;(i<6)&&(!found);i++) { + if(event.elementCookie==axis[i]) { [self axisChanged:i newValue:event.value]; - found = YES; + found=TRUE; } } - if (found) continue; + if(found) continue; // Check buttons - for (i = 0, found = NO; (i < 15) && !found; i++) { + for(i=0,found=FALSE;(i<15)&&(!found);i++) { if(event.elementCookie==buttons[i]) { [self buttonChanged:i newValue:event.value]; - found = YES; + found=TRUE; } } if(found) continue; @@ -341,140 +231,129 @@ - (void)eventQueueFired:(void*)sender withResult:(IOReturn)result // Enable input components - (void)inputEnable:(BOOL)enable { - [_leftStickDeadzone setEnabled:enable]; - [_leftStickDeadzoneAlt setEnabled:enable]; - [_leftStickInvertX setEnabled:enable]; - [_leftStickInvertXAlt setEnabled:enable]; - [_leftStickInvertY setEnabled:enable]; - [_leftStickInvertYAlt setEnabled:enable]; - [_leftLinked setEnabled:enable]; - [_leftLinkedAlt setEnabled:enable]; - [_leftStickNormalize setEnabled:enable]; - [_rightStickDeadzone setEnabled:enable]; - [_rightStickDeadzoneAlt setEnabled:enable]; - [_rightStickInvertX setEnabled:enable]; - [_rightStickInvertXAlt setEnabled:enable]; - [_rightStickInvertY setEnabled:enable]; - [_rightStickInvertYAlt setEnabled:enable]; - [_rightLinked setEnabled:enable]; - [_rightLinkedAlt setEnabled:enable]; - [_rightStickNormalize setEnabled:enable]; - [_rumbleOptions setEnabled:enable]; - [_swapSticks setEnabled:enable]; - [_pretend360Button setEnabled:enable]; + [leftStickDeadzone setEnabled:enable]; + [leftStickInvertX setEnabled:enable]; + [leftStickInvertY setEnabled:enable]; + [leftLinked setEnabled:enable]; + [rightStickDeadzone setEnabled:enable]; + [rightStickInvertX setEnabled:enable]; + [rightStickInvertY setEnabled:enable]; + [rightLinked setEnabled:enable]; } // Reset GUI components - (void)resetDisplay { - [_leftTrigger setVal:0]; - [_rightTrigger setVal:0]; - [_wholeController reset]; - [_leftDeadZone setVal:0]; - [_leftStickAnalog setDeadzone:0]; - [_leftDeadZone setLinked:NO]; - [_leftStickAnalog setLinked:NO]; - [_rightDeadZone setVal:0]; - [_rightStickAnalog setDeadzone:0]; - [_rightDeadZone setLinked:NO]; - [_rightStickAnalog setLinked:NO]; + NSBundle *bundle; + + [leftStick setPositionX:0 y:0]; + [leftStick setPressed:FALSE]; + [leftStick setDeadzone:0]; + [digiStick setUp:FALSE]; + [digiStick setDown:FALSE]; + [digiStick setLeft:FALSE]; + [digiStick setRight:FALSE]; + [centreButtons setBack:FALSE]; + [centreButtons setSpecific:FALSE]; + [centreButtons setStart:FALSE]; + [rightStick setPositionX:0 y:0]; + [rightStick setPressed:FALSE]; + [rightStick setDeadzone:0]; + [rightButtons setA:FALSE]; + [rightButtons setB:FALSE]; + [rightButtons setX:FALSE]; + [rightButtons setY:FALSE]; + [leftShoulder setPressed:FALSE]; + [leftTrigger setDoubleValue:0]; + [rightShoulder setPressed:FALSE]; + [rightTrigger setDoubleValue:0]; // Reset inputs - [_leftStickDeadzone setIntValue:0]; - [_leftStickDeadzoneAlt setIntValue:0]; - [_leftStickInvertX setState:NSOffState]; - [_leftStickInvertXAlt setState:NSOffState]; - [_leftStickInvertY setState:NSOffState]; - [_leftStickInvertYAlt setState:NSOffState]; - [_rightStickDeadzone setIntValue:0]; - [_rightStickDeadzoneAlt setIntValue:0]; - [_rightStickInvertX setState:NSOffState]; - [_rightStickInvertXAlt setState:NSOffState]; - [_rightStickInvertY setState:NSOffState]; - [_rightStickInvertYAlt setState:NSOffState]; - [_swapSticks setState:NSOffState]; + [leftStickDeadzone setIntValue:0]; + [leftStickInvertX setState:NSOffState]; + [leftStickInvertY setState:NSOffState]; + [rightStickDeadzone setIntValue:0]; + [rightStickInvertX setState:NSOffState]; + [rightStickInvertY setState:NSOffState]; // Disable inputs [self inputEnable:NO]; - [_powerOff setHidden:YES]; - // Hide battery status - [_batteryStatus setHidden:YES]; + [powerOff setHidden:YES]; + // Hide battery icon + bundle = [NSBundle bundleForClass:[self class]]; + [batteryLevel setImage:[[[NSImage alloc] initByReferencingFile:[bundle pathForResource:@"battNone" ofType:@"tif"]] autorelease]]; } // Stop using the HID device - (void)stopDevice { if(registryEntry==0) return; - [self testMotorsLarge:0 small:0]; - [self testMotorsCleanUp]; - if (hidQueue) { +// [self testMotorsLarge:0 small:0]; +// [self setMotorOverride:FALSE]; +// [self updateLED:0x00]; + if(hidQueue!=NULL) { CFRunLoopSourceRef eventSource; - + (*hidQueue)->stop(hidQueue); eventSource=(*hidQueue)->getAsyncEventSource(hidQueue); if((eventSource!=NULL)&&CFRunLoopContainsSource(CFRunLoopGetCurrent(),eventSource,kCFRunLoopCommonModes)) CFRunLoopRemoveSource(CFRunLoopGetCurrent(),eventSource,kCFRunLoopCommonModes); (*hidQueue)->Release(hidQueue); - hidQueue = NULL; + hidQueue=NULL; } - if (device) { + if(device!=NULL) { (*device)->close(device); - device = NULL; + device=NULL; } - registryEntry = 0; + registryEntry=0; } // Start using a HID device - (void)startDevice { - int i = (int)[_deviceList indexOfSelectedItem]; - int j; - CFArrayRef CFelements; + int i,j; + CFArrayRef elements; + CFDictionaryRef element; + CFTypeRef object; + long number; IOHIDElementCookie cookie; long usage,usagePage; CFRunLoopSourceRef eventSource; IOReturn ret; - + [self resetDisplay]; - if(([_deviceArray count]==0)||(i==-1)) { - NSLog(@"No devices found? :( device count==%i, i==%i",(int)[_deviceArray count], i); + i=(int)[deviceList indexOfSelectedItem]; + if(([deviceArray count]==0)||(i==-1)) { + NSLog(@"No devices found? :( device count==%i, i==%i",(int)[deviceArray count],i); return; } { - DeviceItem *item = _deviceArray[i]; - - device = [item hidDevice]; - ffDevice = [item ffDevice]; - registryEntry = [item rawDevice]; - controllerType = [item controllerType]; + DeviceItem *item=[deviceArray objectAtIndex:i]; + + device=[item hidDevice]; + ffDevice=[item ffDevice]; + registryEntry=[item rawDevice]; } - - if((*device)->copyMatchingElements(device,NULL,&CFelements)!=kIOReturnSuccess) { + if((*device)->copyMatchingElements(device,NULL,&elements)!=kIOReturnSuccess) { NSLog(@"Can't get elements list"); // Make note of failure? return; } - - NSArray *elements = CFBridgingRelease(CFelements); - - for (NSDictionary *element in elements) { - id object; + for(i=0;icreateAsyncEventSource(hidQueue, &eventSource); + ret=(*hidQueue)->createAsyncEventSource(hidQueue,&eventSource); if(ret!=kIOReturnSuccess) { NSLog(@"Unable to create async event source"); // Error? return; } // Set callback - ret=(*hidQueue)->setEventCallout(hidQueue, CallbackFunction, (__bridge void *)(self), NULL); + ret=(*hidQueue)->setEventCallout(hidQueue,CallbackFunction,self,NULL); if(ret!=kIOReturnSuccess) { NSLog(@"Unable to set event callback"); // Error? return; } // Add to runloop - CFRunLoopAddSource(CFRunLoopGetCurrent(), eventSource, kCFRunLoopCommonModes); + CFRunLoopAddSource(CFRunLoopGetCurrent(),eventSource,kCFRunLoopCommonModes); // Add some elements - for (i = 0; i < 6; i++) - (*hidQueue)->addElement(hidQueue, axis[i], 0); - for (i = 0; i < 15; i++) - (*hidQueue)->addElement(hidQueue, buttons[i], 0); + for(i=0;i<6;i++) + (*hidQueue)->addElement(hidQueue,axis[i],0); + for(i=0;i<15;i++) + (*hidQueue)->addElement(hidQueue,buttons[i],0); // Start - ret = (*hidQueue)->start(hidQueue); - if (ret != kIOReturnSuccess) { - NSLog(@"Unable to start queue - 0x%.8x", ret); + ret=(*hidQueue)->start(hidQueue); + if(ret!=kIOReturnSuccess) { + NSLog(@"Unable to start queue - 0x%.8x",ret); // Error? return; } // Read existing properties { - // CFDictionaryRef dict=(CFDictionaryRef)IORegistryEntryCreateCFProperty(registryEntry,CFSTR("DeviceData"),NULL,0); - CFDictionaryRef dict = (CFDictionaryRef)CFBridgingRetain(GetController(GetSerialNumber(registryEntry))); - if(dict) { +// CFDictionaryRef dict=(CFDictionaryRef)IORegistryEntryCreateCFProperty(registryEntry,CFSTR("DeviceData"),NULL,0); + CFDictionaryRef dict = (CFDictionaryRef)[GetController(GetSerialNumber(registryEntry)) retain]; + if(dict!=0) { CFBooleanRef boolValue; CFNumberRef intValue; - + if(CFDictionaryGetValueIfPresent(dict,CFSTR("InvertLeftX"),(void*)&boolValue)) { - [_leftStickInvertX setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; - [_leftStickInvertXAlt setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; - } else NSLog(@"No value for InvertLeftX\n"); + [leftStickInvertX setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; + } else NSLog(@"No value for InvertLeftX"); if(CFDictionaryGetValueIfPresent(dict,CFSTR("InvertLeftY"),(void*)&boolValue)) { - [_leftStickInvertY setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; - [_leftStickInvertYAlt setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; - } else NSLog(@"No value for InvertLeftY\n"); + [leftStickInvertY setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; + } else NSLog(@"No value for InvertLeftY"); if(CFDictionaryGetValueIfPresent(dict,CFSTR("RelativeLeft"),(void*)&boolValue)) { BOOL enable=CFBooleanGetValue(boolValue); - [_leftLinked setState:enable?NSOnState:NSOffState]; - [_leftLinkedAlt setState:enable?NSOnState:NSOffState]; - [_leftDeadZone setLinked:enable]; - [_leftStickAnalog setLinked:enable]; - } else NSLog(@"No value for RelativeLeft\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("DeadOffLeft"),(void*)&boolValue)) { - BOOL enable=CFBooleanGetValue(boolValue); - [_leftStickNormalize setState:enable]; - [_wholeController setLeftNormalized:enable]; - [_leftStickAnalog setNormalized:enable]; - } else NSLog(@"No value for DeadOffLeft\n"); + [leftLinked setState:enable?NSOnState:NSOffState]; + [leftStick setLinked:enable]; + } else NSLog(@"No value for RelativeLeft"); if(CFDictionaryGetValueIfPresent(dict,CFSTR("DeadzoneLeft"),(void*)&intValue)) { UInt16 i; - + CFNumberGetValue(intValue,kCFNumberShortType,&i); - [_leftStickDeadzone setIntValue:i]; - [_leftStickDeadzoneAlt setIntValue:i]; - [_leftDeadZone setVal:i]; - [_wholeController setLeftStickDeadzone:i]; - [_leftStickAnalog setDeadzone:i]; - } else NSLog(@"No value for DeadzoneLeft\n"); + [leftStickDeadzone setIntValue:i]; + [leftStick setDeadzone:i]; + } else NSLog(@"No value for DeadzoneLeft"); if(CFDictionaryGetValueIfPresent(dict,CFSTR("InvertRightX"),(void*)&boolValue)) { - [_rightStickInvertX setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; - [_rightStickInvertXAlt setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; - } else NSLog(@"No value for InvertRightX\n"); + [rightStickInvertX setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; + } else NSLog(@"No value for InvertRightX"); if(CFDictionaryGetValueIfPresent(dict,CFSTR("InvertRightY"),(void*)&boolValue)) { - [_rightStickInvertY setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; - [_rightStickInvertYAlt setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; - } else NSLog(@"No value for InvertRightY\n"); + [rightStickInvertY setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; + } else NSLog(@"No value for InvertRightY"); if(CFDictionaryGetValueIfPresent(dict,CFSTR("RelativeRight"),(void*)&boolValue)) { BOOL enable=CFBooleanGetValue(boolValue); - [_rightLinked setState:enable?NSOnState:NSOffState]; - [_rightLinkedAlt setState:enable?NSOnState:NSOffState]; - [_rightDeadZone setLinked:enable]; - [_wholeController setRightStickDeadzone:i]; - [_rightStickAnalog setLinked:enable]; - } else NSLog(@"No value for RelativeRight\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("DeadOffRight"),(void*)&boolValue)) { - BOOL enable=CFBooleanGetValue(boolValue); - [_rightStickNormalize setState:enable]; - [_wholeController setRightNormalized:enable]; - [_rightStickAnalog setNormalized:enable]; - } else NSLog(@"No value for DeadOffRight\n"); + [rightLinked setState:enable?NSOnState:NSOffState]; + [rightStick setLinked:enable]; + } else NSLog(@"No value for RelativeRight"); if(CFDictionaryGetValueIfPresent(dict,CFSTR("DeadzoneRight"),(void*)&intValue)) { UInt16 i; - + CFNumberGetValue(intValue,kCFNumberShortType,&i); - [_rightStickDeadzone setIntValue:i]; - [_rightStickDeadzoneAlt setIntValue:i]; - [_rightDeadZone setVal:i]; - [_rightStickAnalog setDeadzone:i]; - } else NSLog(@"No value for DeadzoneRight\n"); - - if(CFDictionaryGetValueIfPresent(dict,CFSTR("ControllerType"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - ControllerType controllerTypePrefs = (ControllerType)[num integerValue]; - if (controllerTypePrefs != controllerType) - NSLog(@"ControllerType from prefs was %d, expected %d", (int)controllerTypePrefs, (int)controllerType); - } else NSLog(@"No value for ControllerType\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("RumbleType"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [_rumbleOptions selectItemAtIndex:[num integerValue]]; -// [_rumbleOptions setState:[num integerValue]]; - } else NSLog(@"No value for RumbleType\n"); - - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingUp"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][0] = [num intValue]; - } else NSLog(@"No value for BindingUp\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingDown"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][1] = [num intValue]; - } else NSLog(@"No value for BindingDown\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingLeft"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][2] = [num intValue]; - } else NSLog(@"No value for BindingLeft\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingRight"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][3] = [num intValue]; - } else NSLog(@"No value for BindingRight\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingStart"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][4] = [num intValue]; - } else NSLog(@"No value for BindingStart\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingBack"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][5] = [num intValue]; - } else NSLog(@"No value for BindingBack\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingLSC"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][6] = [num intValue]; - } else NSLog(@"No value for BindingLSC\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingRSC"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][7] = [num intValue]; - } else NSLog(@"No value for BindingRSC\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingLB"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][8] = [num intValue]; - } else NSLog(@"No value for BindingLB\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingRB"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][9] = [num intValue]; - } else NSLog(@"No value for BindingRB\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingGuide"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][10] = [num intValue]; - } else NSLog(@"No value for BindingGuide\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingA"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][11] = [num intValue]; - } else NSLog(@"No value for BindingA\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingB"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][12] = [num intValue]; - } else NSLog(@"No value for BindingB\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingX"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][13] = [num intValue]; - } else NSLog(@"No value for BindingX\n"); - if(CFDictionaryGetValueIfPresent(dict,CFSTR("BindingY"),(void*)&intValue)) { - NSNumber *num = (__bridge NSNumber *)intValue; - [MyWhole360ControllerMapper mapping][14] = [num intValue]; - } else NSLog(@"No value for BindingY\n"); - - if(CFDictionaryGetValueIfPresent(dict,CFSTR("SwapSticks"),(void*)&boolValue)) { - [_swapSticks setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; - } else NSLog(@"No value for SwapSticks\n"); - - if(CFDictionaryGetValueIfPresent(dict,CFSTR("Pretend360"),(void*)&boolValue)) { - [_pretend360Button setState:CFBooleanGetValue(boolValue)?NSOnState:NSOffState]; - } else NSLog(@"No value for Pretend360"); - } else NSLog(@"No settings found\n"); + [rightStickDeadzone setIntValue:i]; + [rightStick setDeadzone:i]; + } else NSLog(@"No value for DeadzoneRight"); + CFRelease(dict); + } else NSLog(@"No settings found"); } - - // Set force feedback options - if (controllerType == XboxOneController || controllerType == XboxOnePretend360Controller) - { - [_rumbleOptions removeAllItems]; - [_rumbleOptions addItemsWithTitles:@[@"Default", @"None", @"Triggers Only", @"Both"]]; - } - else - { - [_rumbleOptions removeAllItems]; - [_rumbleOptions addItemsWithTitles:@[@"Default", @"None"]]; - } - // Enable GUI components [self inputEnable:YES]; - // Set device capabilities - // Set FF motor control - [self testMotorsInit]; - [self testMotorsLarge:0 small:0]; - largeMotor = 0; - smallMotor = 0; + // Set LED and manual motor control +// [self updateLED:0x0a]; +// [self setMotorOverride:TRUE]; +// [self testMotorsLarge:0 small:0]; + largeMotor=0; + smallMotor=0; // Battery level? { - int batteryLevel = -1; - int batteryPercentage = -1; + NSBundle *bundle = [NSBundle bundleForClass:[self class]]; + NSString *path; CFTypeRef prop; - - if (IOObjectConformsTo(registryEntry, "WirelessHIDDevice")) { + + path = nil; + if (IOObjectConformsTo(registryEntry, "WirelessHIDDevice")) + { prop = IORegistryEntryCreateCFProperty(registryEntry, CFSTR("BatteryLevel"), NULL, 0); - if (prop != nil) { + if (prop != nil) + { unsigned char level; - - if (CFNumberGetValue(prop, kCFNumberCharType, &level)) { - batteryLevel = level / 64; - batteryPercentage = level * 100 / 255.0f + 0.5f; - } + + if (CFNumberGetValue(prop, kCFNumberCharType, &level)) + path = [bundle pathForResource:[NSString stringWithFormat:@"batt%i", level / 64] ofType:@"tif"]; CFRelease(prop); } - [_powerOff setHidden:NO]; - } - if ( batteryLevel >= 0) { - [_batteryStatus setBars:batteryLevel]; - [_batteryStatus setPercentage:batteryPercentage]; - [_batteryStatus setHidden:NO]; - } else { - [_batteryStatus setHidden:YES]; + [powerOff setHidden:NO]; } + if (path == nil) + path = [bundle pathForResource:@"battNone" ofType:@"tif"]; + [batteryLevel setImage:[[[NSImage alloc] initByReferencingFile:path] autorelease]]; } - - [_mappingTable reloadData]; } // Clear out the device lists - (void)deleteDeviceList { - [_deviceList removeAllItems]; - [_deviceListBinding removeAllItems]; - [_deviceListAdvanced removeAllItems]; - [_deviceArray removeAllObjects]; + [deviceList removeAllItems]; + [deviceArray removeAllObjects]; } // Update the device list from the I/O Kit @@ -773,24 +526,23 @@ - (void)updateDeviceList CFMutableDictionaryRef hidDictionary; IOReturn ioReturn; io_iterator_t iterator; - io_object_t hidDevice; - int count = 0; - + io_object_t hidDevice, parent; + int count; + DeviceItem *item; + // Scrub old items [self stopDevice]; [self deleteDeviceList]; // Add new items hidDictionary=IOServiceMatching(kIOHIDDeviceKey); - ioReturn=IOServiceGetMatchingServices(_masterPort,hidDictionary,&iterator); - if((ioReturn != kIOReturnSuccess) || (iterator == 0)) { - [_deviceList addItemWithTitle:NO_ITEMS]; - [_deviceListBinding addItemWithTitle:NO_ITEMS]; - [_deviceListAdvanced addItemWithTitle:NO_ITEMS]; + ioReturn=IOServiceGetMatchingServices(masterPort,hidDictionary,&iterator); + if((ioReturn!=kIOReturnSuccess)||(iterator==0)) { + [deviceList addItemWithTitle:NO_ITEMS]; return; } - - while ((hidDevice = IOIteratorNext(iterator))) { - io_object_t parent = 0; + count=0; + while((hidDevice=IOIteratorNext(iterator))) { + parent = 0; IORegistryEntryGetParentEntry(hidDevice, kIOServicePlane, &parent); BOOL deviceWired = IOObjectConformsTo(parent, "Xbox360Peripheral") && IOObjectConformsTo(hidDevice, "Xbox360ControllerClass"); BOOL deviceWireless = IOObjectConformsTo(hidDevice, "WirelessHIDDevice"); @@ -799,66 +551,57 @@ - (void)updateDeviceList IOObjectRelease(hidDevice); continue; } - DeviceItem *item = [DeviceItem allocateDeviceItemForDevice:hidDevice]; - if (item == nil) continue; + item=[DeviceItem allocateDeviceItemForDevice:hidDevice]; + if(item==NULL) continue; // Add to item - NSString *name = item.displayName; - [_deviceList addItemWithTitle:[NSString stringWithFormat:@"%i: %@ (%@)", ++count, name, deviceWireless ? @"Wireless" : @"Wired"]]; - [_deviceListBinding addItemWithTitle:[NSString stringWithFormat:@"%i: %@ (%@)", count, name, deviceWireless ? @"Wireless" : @"Wired"]]; - [_deviceListAdvanced addItemWithTitle:[NSString stringWithFormat:@"%i: %@ (%@)", count, name, deviceWireless ? @"Wireless" : @"Wired"]]; - [_deviceArray addObject:item]; + NSString *name; + name = [item name]; + if (name == nil) + name = @"Generic Controller"; + [deviceList addItemWithTitle:[NSString stringWithFormat:@"%i: %@ (%@)", ++count, name, deviceWireless ? @"Wireless" : @"Wired"]]; + [deviceArray addObject:item]; } IOObjectRelease(iterator); - if (count==0) { - [_deviceList addItemWithTitle:NO_ITEMS]; - [_deviceListBinding addItemWithTitle:NO_ITEMS]; - [_deviceListAdvanced addItemWithTitle:NO_ITEMS]; - } + if(count==0) [deviceList addItemWithTitle:NO_ITEMS]; [self startDevice]; } // Start up -- (void)didSelect +- (void)mainViewDidLoad { io_object_t object; - + // Get master port, for accessing I/O Kit - IOMasterPort(MACH_PORT_NULL,&_masterPort); + IOMasterPort(MACH_PORT_NULL,&masterPort); // Set up notification of USB device addition/removal - notifyPort=IONotificationPortCreate(_masterPort); + notifyPort=IONotificationPortCreate(masterPort); notifySource=IONotificationPortGetRunLoopSource(notifyPort); - CFRunLoopAddSource(CFRunLoopGetCurrent(), notifySource, kCFRunLoopCommonModes); + CFRunLoopAddSource(CFRunLoopGetCurrent(),notifySource,kCFRunLoopCommonModes); // Prepare other fields - _deviceArray = [[NSMutableArray alloc] initWithCapacity:1]; + deviceArray=[[NSMutableArray arrayWithCapacity:1] retain]; device=NULL; hidQueue=NULL; // Activate callbacks // Wired - IOServiceAddMatchingNotification(notifyPort, kIOFirstMatchNotification, IOServiceMatching(kIOUSBDeviceClassName), callbackHandleDevice, (__bridge void *)(self), &onIteratorWired); - callbackHandleDevice((__bridge void *)(self), onIteratorWired); - IOServiceAddMatchingNotification(notifyPort, kIOTerminatedNotification, IOServiceMatching(kIOUSBDeviceClassName), callbackHandleDevice, (__bridge void *)(self), &offIteratorWired); + IOServiceAddMatchingNotification(notifyPort, kIOFirstMatchNotification, IOServiceMatching(kIOUSBDeviceClassName), callbackHandleDevice, self, &onIteratorWired); + callbackHandleDevice(self, onIteratorWired); + IOServiceAddMatchingNotification(notifyPort, kIOTerminatedNotification, IOServiceMatching(kIOUSBDeviceClassName), callbackHandleDevice, self, &offIteratorWired); while((object = IOIteratorNext(offIteratorWired)) != 0) IOObjectRelease(object); // Wireless - IOServiceAddMatchingNotification(notifyPort, kIOFirstMatchNotification, IOServiceMatching("WirelessHIDDevice"), callbackHandleDevice, (__bridge void *)(self), &onIteratorWireless); - callbackHandleDevice((__bridge void *)(self), onIteratorWireless); - IOServiceAddMatchingNotification(notifyPort, kIOTerminatedNotification, IOServiceMatching("WirelessHIDDevice"), callbackHandleDevice, (__bridge void *)(self), &offIteratorWireless); + IOServiceAddMatchingNotification(notifyPort, kIOFirstMatchNotification, IOServiceMatching("WirelessHIDDevice"), callbackHandleDevice, self, &onIteratorWireless); + callbackHandleDevice(self, onIteratorWireless); + IOServiceAddMatchingNotification(notifyPort, kIOTerminatedNotification, IOServiceMatching("WirelessHIDDevice"), callbackHandleDevice, self, &offIteratorWireless); while((object = IOIteratorNext(offIteratorWireless)) != 0) IOObjectRelease(object); - - // TEMP: Enable the "enable driver" checkbox if the kext is loaded in the memory - int result = system("kextstat | grep com.mice.driver.Xbox360Controller"); -// NSLog(@"Result of kextstat = %d", result); - if (result == 0) { - [self.enableDriverCheckBox setState:NSOnState]; - } else { - [self.enableDriverCheckBox setState:NSOffState]; - } } // Shut down -- (void)didUnselect +- (void)dealloc { + int i; + DeviceItem *item; + FFEFFESCAPE escape; unsigned char c; // Remove notification source @@ -866,14 +609,14 @@ - (void)didUnselect IOObjectRelease(onIteratorWireless); IOObjectRelease(offIteratorWired); IOObjectRelease(offIteratorWireless); + CFRunLoopRemoveSource(CFRunLoopGetCurrent(),notifySource,kCFRunLoopCommonModes); CFRunLoopSourceInvalidate(notifySource); IONotificationPortDestroy(notifyPort); // Release device and info [self stopDevice]; - for (DeviceItem *item in _deviceArray) + for (i = 0; i < [deviceArray count]; i++) { - FFEFFESCAPE escape = {0}; - NSInteger i = [_deviceArray indexOfObject:item]; + item = [deviceArray objectAtIndex:i]; if ([item ffDevice] == 0) continue; c = 0x06 + (i % 0x04); @@ -886,270 +629,61 @@ - (void)didUnselect FFDeviceEscape([item ffDevice], &escape); } [self deleteDeviceList]; + [deviceArray release]; // Close master port - mach_port_deallocate(mach_task_self(), _masterPort); + mach_port_deallocate(mach_task_self(),masterPort); // Done + [super dealloc]; } -// Handle selection from drop down menu -- (IBAction)selectDevice:(id)sender +- (mach_port_t)masterPort { - NSInteger tabIndex = [_tabView indexOfTabViewItem:[_tabView selectedTabViewItem]]; - if (tabIndex == 0) { // Controller Test - [_deviceListBinding selectItemAtIndex:[_deviceList indexOfSelectedItem]]; - [_deviceListAdvanced selectItemAtIndex:[_deviceList indexOfSelectedItem]]; - } - else if (tabIndex == 1) { // Binding Tab - [_deviceList selectItemAtIndex:[_deviceListBinding indexOfSelectedItem]]; - [_deviceListAdvanced selectItemAtIndex:[_deviceListBinding indexOfSelectedItem]]; - } - else if (tabIndex == 2) { // Deadzones Tab - [_deviceList selectItemAtIndex:[_deviceListAdvanced indexOfSelectedItem]]; - [_deviceListBinding selectItemAtIndex:[_deviceListAdvanced indexOfSelectedItem]]; - } + return masterPort; +} +// Handle selection from drop down menu +- (void)selectDevice:(id)sender +{ [self startDevice]; } // Handle changing a setting -- (IBAction)changeSetting:(id)sender +- (void)changeSetting:(id)sender { - // Send normalize to joysticks - [_wholeController setLeftNormalized:(BOOL)[_leftStickNormalize state]]; - [_leftStickAnalog setNormalized:(BOOL)[_leftStickNormalize state]]; - [_wholeController setRightNormalized:(BOOL)[_rightStickNormalize state]]; - [_rightStickAnalog setNormalized:(BOOL)[_rightStickNormalize state]]; - - // Sync settings between tabs - NSInteger tabIndex = [_tabView indexOfTabViewItem:[_tabView selectedTabViewItem]]; - - if (tabIndex == 0) { // Controller Test - [_leftLinkedAlt setState:[_leftLinked state]]; - [_leftStickDeadzoneAlt setDoubleValue:[_leftStickDeadzone doubleValue]]; - [_leftStickInvertXAlt setState:[_leftStickInvertX state]]; - [_leftStickInvertYAlt setState:[_leftStickInvertY state]]; - [_rightLinkedAlt setState:[_rightLinked state]]; - [_rightStickDeadzoneAlt setDoubleValue:[_rightStickDeadzone doubleValue]]; - [_rightStickInvertXAlt setState:[_rightStickInvertX state]]; - [_rightStickInvertYAlt setState:[_rightStickInvertY state]]; - } - else if (tabIndex == 2) { // Advanced Tab - [_leftLinked setState:[_leftLinkedAlt state]]; - [_leftStickDeadzone setDoubleValue:[_leftStickDeadzoneAlt doubleValue]]; - [_leftStickInvertX setState:[_leftStickInvertXAlt state]]; - [_leftStickInvertY setState:[_leftStickInvertYAlt state]]; - [_rightLinked setState:[_rightLinkedAlt state]]; - [_rightStickDeadzone setDoubleValue:[_rightStickDeadzoneAlt doubleValue]]; - [_rightStickInvertX setState:[_rightStickInvertXAlt state]]; - [_rightStickInvertY setState:[_rightStickInvertYAlt state]]; - } - - BOOL pretend360 = ([_pretend360Button state] == NSOnState); - if (controllerType == XboxOneController || controllerType == XboxOnePretend360Controller) - { - if (pretend360) - controllerType = XboxOnePretend360Controller; - else - controllerType = XboxOneController; - } - + CFDictionaryRef dict; + CFStringRef keys[8]; + CFTypeRef values[8]; + UInt16 i; + + // Set keys and values + keys[0]=CFSTR("InvertLeftX"); + values[0]=([leftStickInvertX state]==NSOnState)?kCFBooleanTrue:kCFBooleanFalse; + keys[1]=CFSTR("InvertLeftY"); + values[1]=([leftStickInvertY state]==NSOnState)?kCFBooleanTrue:kCFBooleanFalse; + keys[2]=CFSTR("InvertRightX"); + values[2]=([rightStickInvertX state]==NSOnState)?kCFBooleanTrue:kCFBooleanFalse; + keys[3]=CFSTR("InvertRightY"); + values[3]=([rightStickInvertY state]==NSOnState)?kCFBooleanTrue:kCFBooleanFalse; + keys[4]=CFSTR("DeadzoneLeft"); + i=[leftStickDeadzone doubleValue]; + values[4]=CFNumberCreate(NULL,kCFNumberShortType,&i); + keys[5]=CFSTR("DeadzoneRight"); + i=[rightStickDeadzone doubleValue]; + values[5]=CFNumberCreate(NULL,kCFNumberShortType,&i); + keys[6]=CFSTR("RelativeLeft"); + values[6]=([leftLinked state]==NSOnState)?kCFBooleanTrue:kCFBooleanFalse; + keys[7]=CFSTR("RelativeRight"); + values[7]=([rightLinked state]==NSOnState)?kCFBooleanTrue:kCFBooleanFalse; // Create dictionary - NSDictionary *dict = @{@"InvertLeftX": @((BOOL)([_leftStickInvertX state]==NSOnState)), - @"InvertLeftY": @((BOOL)([_leftStickInvertY state]==NSOnState)), - @"InvertRightX": @((BOOL)([_rightStickInvertX state]==NSOnState)), - @"InvertRightY": @((BOOL)([_rightStickInvertY state]==NSOnState)), - @"DeadzoneLeft": @((UInt16)[_leftStickDeadzone doubleValue]), - @"DeadzoneRight": @((UInt16)[_rightStickDeadzone doubleValue]), - @"RelativeLeft": @((BOOL)([_leftLinked state]==NSOnState)), - @"RelativeRight": @((BOOL)([_rightLinked state]==NSOnState)), - @"DeadOffLeft": @((BOOL)([_leftStickNormalize state]==NSOnState)), - @"DeadOffRight": @((BOOL)([_rightStickNormalize state]==NSOnState)), - @"ControllerType": @((UInt8)(controllerType)), - @"RumbleType": @((UInt8)([_rumbleOptions indexOfSelectedItem])), - @"BindingUp": @((UInt8)([MyWhole360ControllerMapper mapping][0])), - @"BindingDown": @((UInt8)([MyWhole360ControllerMapper mapping][1])), - @"BindingLeft": @((UInt8)([MyWhole360ControllerMapper mapping][2])), - @"BindingRight": @((UInt8)([MyWhole360ControllerMapper mapping][3])), - @"BindingStart": @((UInt8)([MyWhole360ControllerMapper mapping][4])), - @"BindingBack": @((UInt8)([MyWhole360ControllerMapper mapping][5])), - @"BindingLSC": @((UInt8)([MyWhole360ControllerMapper mapping][6])), - @"BindingRSC": @((UInt8)([MyWhole360ControllerMapper mapping][7])), - @"BindingLB": @((UInt8)([MyWhole360ControllerMapper mapping][8])), - @"BindingRB": @((UInt8)([MyWhole360ControllerMapper mapping][9])), - @"BindingGuide": @((UInt8)([MyWhole360ControllerMapper mapping][10])), - @"BindingA": @((UInt8)([MyWhole360ControllerMapper mapping][11])), - @"BindingB": @((UInt8)([MyWhole360ControllerMapper mapping][12])), - @"BindingX": @((UInt8)([MyWhole360ControllerMapper mapping][13])), - @"BindingY": @((UInt8)([MyWhole360ControllerMapper mapping][14])), - @"SwapSticks": @((BOOL)([_swapSticks state]==NSOnState)), - @"Pretend360": @((BOOL)pretend360)}; - + dict=CFDictionaryCreate(NULL,(const void**)keys,(const void**)values,sizeof(keys)/sizeof(keys[0]),&kCFTypeDictionaryKeyCallBacks,&kCFTypeDictionaryValueCallBacks); // Set property - IORegistryEntrySetCFProperties(registryEntry, (__bridge CFTypeRef)(dict)); - SetController(GetSerialNumber(registryEntry), dict); + IORegistryEntrySetCFProperties(registryEntry, dict); + SetController(GetSerialNumber(registryEntry), (NSDictionary*)dict); // Update UI - [_leftDeadZone setLinked:[_leftLinked state] == NSOnState]; - [_leftStickAnalog setLinked:[_leftLinked state] == NSOnState]; - [_leftDeadZone setVal:[_leftStickDeadzone doubleValue]]; - [_wholeController setLeftStickDeadzone:[_leftStickDeadzone doubleValue]]; - [_leftStickAnalog setDeadzone:[_leftStickDeadzone doubleValue]]; - [_rightDeadZone setLinked:[_rightLinked state] == NSOnState]; - [_rightStickAnalog setLinked:[_rightLinked state] == NSOnState]; - [_rightDeadZone setVal:[_rightStickDeadzone doubleValue]]; - [_wholeController setRightStickDeadzone:[_rightStickDeadzone doubleValue]]; - [_rightStickAnalog setDeadzone:[_rightStickDeadzone doubleValue]]; -} - -// Run an AppleScript from String and returns YES on successful execution -- (BOOL)runInlineAppleScript:(NSString *)scriptString -{ - NSDictionary* errorDict; - NSAppleEventDescriptor* returnDescriptor = NULL; - - NSAppleScript* scriptObject = [[NSAppleScript alloc] initWithSource:scriptString]; - - returnDescriptor = [scriptObject executeAndReturnError: &errorDict]; - scriptObject = nil; - - if (returnDescriptor != NULL) - { - // successful execution - if (kAENullEvent != [returnDescriptor descriptorType]) - { - return YES; - /* Uncomment this to handle the returned values */ -// // script returned an AppleScript result -// if (cAEList == [returnDescriptor descriptorType]) -// { -// // result is a list of other descriptors -// } -// else -// { -// // coerce the result to the appropriate ObjC type -// } - } - } - else - { - // no script result, handle error - id val = [errorDict objectForKey:@"NSAppleScriptErrorRange"]; - if (!val) { - NSLog(@"APPLESCRIPT ERROR:\n%@", errorDict); - } else { - NSRange r = [val rangeValue]; - NSMutableString *errorPoint = [NSMutableString stringWithString:scriptString]; - [errorPoint insertString:@"<---***" atIndex:r.location+r.length]; // end - [errorPoint insertString:@"***ERROR_HERE--->" atIndex:r.location]; // start - NSLog(@"APPLESCRIPT ERROR:\n%@" - @"\nERROR LOCATION:\n%@", - errorDict, errorPoint); - } - } - return NO; -} - -// Enable/disable the driver -// FIXME: currently only works after the controller is connected and loaded once. -// FIXME: will not uncheck the "Enabled" box if the prefpane is started with the driver disabled -- (IBAction)toggleDriverEnabled:(NSButton *)sender -{ - NSLog(@"Enable/disable driver stuff: will change state..."); - NSString *script = nil; - - // QUESTION: should I disable the daemon too? - if (sender.state == NSOnState) { - // The driver should be enabled - NSLog(@"Will Enable Driver..."); - script = - @"do shell script \"\ - cd \\\"/Library/Extensions\\\"\n\ - kextload \\\"360Controller.kext\\\"\n\ - \" with administrator privileges\n"; - - } else if (sender.state == NSOffState) { - // The driver should be disabled - NSLog(@"Will Disable Driver..."); - [self powerOff:nil]; - [self stopDevice]; - - script = - @"do shell script \"\ - kextstat | grep 360Controller\n\ - if [ $? -eq 0 ]\n\ - then\n\ - kextunload -b \\\"com.mice.driver.Xbox360Controller\\\"\n\ - fi\n\ - \" with administrator privileges\n"; - } - - if (script != nil) { - if ([self runInlineAppleScript:script]) { - NSLog(@"...done!"); - sleep(1); - } - } - - [self updateDeviceList]; -} - -// Asks the user to uninstall the package, If YES, runs inline AppleScript to do that procedure. -- (IBAction)willPerformUninstallation:(id)sender -{ - NSAlert *alert = [[NSAlert alloc] init]; - [alert addButtonWithTitle:@"YES"]; - [alert addButtonWithTitle:@"NO"]; - [alert setMessageText:@"Do you want to uninstall?"]; - [alert setInformativeText:@"This operation cannot be undone."]; - [alert setAlertStyle:NSWarningAlertStyle]; - - if ([alert runModal] != NSAlertFirstButtonReturn) { - NSLog(@"Uninstallation canceled!"); - return; - } - - NSLog(@"Will uninstall the driver..."); - - // quotes must be double escaped so the script will read \" properly - NSString *script = - @"do shell script \"\ - launchctl unload /Library/LaunchDaemons/com.mice.360Daemon.plist\n\ - kextunload -b \\\"com.mice.driver.Xbox360Controller\\\"\n\ - kextunload -b \\\"com.mice.driver.Wireless360Controller\\\"\n\ - kextunload -b \\\"com.mice.driver.WirelessGamingReceiver\\\"\n\ - rm -f /Library/LaunchDaemons/com.mice.360Daemon.plist\n\ - rm -rf /Library/Application\\\\ Support/MICE/360Daemon.app\n\ - rm -rf /System/Library/Extensions/360Controller.kext\n\ - rm -rf /System/Library/Extensions/Wireless360Controller.kext\n\ - rm -rf /System/Library/Extensions/WirelessGamingReceiver.kext\n\ - rm -rf /Library/Extensions/360Controller.kext\n\ - rm -rf /Library/Extensions/Wireless360Controller.kext\n\ - rm -rf /Library/Extensions/WirelessGamingReceiver.kext\n\ - rm -rf /Library/Extensions/XboxOneBluetooth.kext\n\ - rm -rf /Library/PreferencePanes/Pref360Control.prefPane\n\ - pkgutil --forget com.mice.pkg.Xbox360controller\ - \" with administrator privileges"; - - if (script != nil && [self runInlineAppleScript:script]) { - NSLog(@"...done!"); - - alert = [NSAlert alertWithMessageText:@"Success!" - defaultButton:nil - alternateButton:nil - otherButton:nil - informativeTextWithFormat:@"The driver was uninstalled successfully!\n Note that you may need to restart your Mac to be able to install it again properly."]; - [alert runModal]; - - // close the Preference Panel, as it needs to clean stuff - [[NSApplication sharedApplication] terminate:nil]; - } else { - NSLog(@"...error!"); - alert = [NSAlert alertWithMessageText:@"Error!" - defaultButton:nil - alternateButton:nil - otherButton:nil - informativeTextWithFormat:@"Error Uninstalling the Driver!"]; - [alert runModal]; - } + [leftStick setLinked:([leftLinked state]==NSOnState)]; + [leftStick setDeadzone:[leftStickDeadzone doubleValue]]; + [rightStick setLinked:([rightLinked state]==NSOnState)]; + [rightStick setDeadzone:[rightStickDeadzone doubleValue]]; } // Handle I/O Kit device add/remove @@ -1160,31 +694,23 @@ - (void)handleDeviceChange [self updateDeviceList]; } -- (IBAction)powerOff:(id)sender +- (IBAction)showDeviceList:(id)sender { - FFEFFESCAPE escape = {0}; + [deviceLister showWithOwner:self]; +} - if (ffDevice == 0) return; +- (IBAction)powerOff:(id)sender +{ + FFEFFESCAPE escape; + + if(ffDevice==0) return; escape.dwSize=sizeof(escape); escape.dwCommand=0x03; - FFDeviceEscape(ffDevice, &escape); -} - -- (IBAction)startRemappingPressed:(id)sender { - if (![_wholeControllerMapper isMapping]) - [_wholeControllerMapper runMapperWithButton:_remappingButton andOwner:self]; - else - [_wholeControllerMapper cancelMappingWithButton:_remappingButton andOwner:self]; -} - -- (IBAction)resetRemappingPressed:(id)sender { - [_remappingButton setState:NSOffState]; - [_wholeControllerMapper resetWithOwner:self]; -} - -- (IBAction)pretend360Checked:(id)sender { - [self changeSetting:NULL]; - [self performSelector:@selector(updateDeviceList) withObject:nil afterDelay:0.5]; + escape.cbInBuffer=0; + escape.lpvInBuffer=NULL; + escape.cbOutBuffer=0; + escape.lpvOutBuffer=NULL; + FFDeviceEscape(ffDevice,&escape); } @end diff --git a/Pref360Control/Pref360Control_Prefix.pch b/Pref360Control/Pref360Control_Prefix.pch index 11d1120b..5da80c02 100644 --- a/Pref360Control/Pref360Control_Prefix.pch +++ b/Pref360Control/Pref360Control_Prefix.pch @@ -2,15 +2,7 @@ // Prefix header for all source files of the 'Pref360Control' target in the 'Pref360Control' project. // -@import CoreFoundation; -#include -#include -#include -#include -#include -#include - #ifdef __OBJC__ - @import Cocoa; - @import PreferencePanes; + #import + #import #endif diff --git a/Pref360Control/Pref360StyleKit.h b/Pref360Control/Pref360StyleKit.h deleted file mode 100644 index b85a5727..00000000 --- a/Pref360Control/Pref360StyleKit.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Pref360StyleKit.h -// Pref360Control -// -// Created by Pierre TACCHI on 25/01/15. -// Copyright (c) 2015 . All rights reserved. -// -// Generated by PaintCode (www.paintcodeapp.com) -// - -#import -#import - - -@interface Pref360StyleKit : NSObject - -// Drawing Methods -+ (void)drawX360ControllerWithControllerNumber: (CGFloat)controllerNumber aPressed: (BOOL)aPressed bPressed: (BOOL)bPressed xPressed: (BOOL)xPressed yPressed: (BOOL)yPressed leftPressed: (BOOL)leftPressed upPressed: (BOOL)upPressed rightPressed: (BOOL)rightPressed downPressed: (BOOL)downPressed backPressed: (BOOL)backPressed startPressed: (BOOL)startPressed lbPressed: (BOOL)lbPressed rbPressed: (BOOL)rbPressed homePressed: (BOOL)homePressed leftStickPressed: (BOOL)leftStickPressed rightStickPressed: (BOOL)rightStickPressed leftStick: (NSPoint)leftStick rightStick: (NSPoint)rightStick leftStickDeadzone: (CGFloat)leftDeadzone rightStickDeadzone: (CGFloat)rightDeadzone isLeftNormalized: (BOOL)leftNormalized isRightNormalized: (BOOL)rightNormalized; -+ (void)drawTriggerMetterWithIntensity: (CGFloat)intensity triggerTitle: (NSString*)triggerTitle; -+ (void)drawBatteryMonitorWithBars: (CGFloat)bars andPercentage: (int)percentage; -+ (void)drawDeadZoneViewerWithValue: (CGFloat)value linked: (BOOL)linked; - -@end diff --git a/Pref360Control/Pref360StyleKit.m b/Pref360Control/Pref360StyleKit.m deleted file mode 100644 index c09356b8..00000000 --- a/Pref360Control/Pref360StyleKit.m +++ /dev/null @@ -1,1309 +0,0 @@ -// -// Pref360StyleKit.m -// Pref360Control -// -// Created by Pierre TACCHI on 25/01/15. -// Copyright (c) 2015 . All rights reserved. -// -// Generated by PaintCode (www.paintcodeapp.com) -// - -#import "Pref360StyleKit.h" - - -@implementation Pref360StyleKit - -#pragma mark Initialization - -+ (void)initialize -{ -} - -#pragma mark Drawing Methods - -+ (void)drawX360ControllerWithControllerNumber: (CGFloat)controllerNumber aPressed: (BOOL)aPressed bPressed: (BOOL)bPressed xPressed: (BOOL)xPressed yPressed: (BOOL)yPressed leftPressed: (BOOL)leftPressed upPressed: (BOOL)upPressed rightPressed: (BOOL)rightPressed downPressed: (BOOL)downPressed backPressed: (BOOL)backPressed startPressed: (BOOL)startPressed lbPressed: (BOOL)lbPressed rbPressed: (BOOL)rbPressed homePressed: (BOOL)homePressed leftStickPressed: (BOOL)leftStickPressed rightStickPressed: (BOOL)rightStickPressed leftStick: (NSPoint)leftStick rightStick: (NSPoint)rightStick leftStickDeadzone: (CGFloat)leftDeadzone rightStickDeadzone: (CGFloat)rightDeadzone isLeftNormalized: (BOOL)leftNormalized isRightNormalized: (BOOL)rightNormalized -{ - //// General Declarations - CGContextRef context = (CGContextRef)NSGraphicsContext.currentContext.graphicsPort; - - //// Color Declarations - NSColor* buttonX = [NSColor colorWithCalibratedRed: 0.124 green: 0.351 blue: 1 alpha: 1]; - NSColor* strokeX = [buttonX shadowWithLevel: 0.5]; - NSColor* buttonA = [NSColor colorWithCalibratedRed: 0.524 green: 0.883 blue: 0 alpha: 1]; - NSColor* strokeA = [buttonA shadowWithLevel: 0.5]; - NSColor* buttonB = [NSColor colorWithCalibratedRed: 1 green: 0.094 blue: 0.072 alpha: 1]; - NSColor* strokeB = [buttonB shadowWithLevel: 0.5]; - NSColor* buttonY = [NSColor colorWithCalibratedRed: 1 green: 0.814 blue: 0.047 alpha: 1]; - NSColor* strokeY = [buttonY shadowWithLevel: 0.5]; - NSColor* buttonHOME = [NSColor colorWithCalibratedRed: 0.895 green: 0.895 blue: 0.895 alpha: 1]; - NSColor* strokeHOME = [buttonHOME shadowWithLevel: 0.5]; - NSColor* controller = [NSColor colorWithCalibratedRed: 0.232 green: 0.232 blue: 0.232 alpha: 1]; - NSColor* backController = [controller highlightWithLevel: 0.4]; - NSColor* darkController = [controller shadowWithLevel: 0.3]; - NSColor* highlightController = [controller highlightWithLevel: 0.1]; - NSColor* stick = [NSColor colorWithCalibratedRed: 0.305 green: 0.335 blue: 0.28 alpha: 1]; - NSColor* highlightStick = [stick highlightWithLevel: 0.3]; - NSColor* shadowStick = [stick shadowWithLevel: 0.2]; - NSColor* pressed = [NSColor colorWithCalibratedRed: 1 green: 0.432 blue: 0 alpha: 1]; - NSColor* pressedStroke = [pressed shadowWithLevel: 0.5]; - NSColor* cross = [NSColor colorWithCalibratedRed: 0.372 green: 0.372 blue: 0.372 alpha: 1]; - NSColor* crossStroke = [cross shadowWithLevel: 0.5]; - NSColor* gradientColor = [NSColor colorWithCalibratedRed: 0 green: 0 blue: 0 alpha: 0.355]; - NSColor* gradientColor2 = [NSColor colorWithCalibratedRed: 0 green: 0 blue: 0 alpha: 0]; - - //// Gradient Declarations - NSGradient* gradient = [NSGradient.alloc initWithStartingColor: gradientColor endingColor: gradientColor2]; - - //// Variable Declarations - NSColor* led1Color = controllerNumber == 1 ? buttonA : strokeA; - NSColor* led2Color = controllerNumber == 2 ? buttonA : strokeA; - NSColor* led3Color = controllerNumber == 3 ? buttonA : strokeA; - NSColor* led4Color = controllerNumber == 4 ? buttonA : strokeA; - NSColor* aColor = aPressed ? pressed : buttonA; - NSColor* aStroke = aPressed ? pressedStroke : strokeA; - NSColor* bColor = bPressed ? pressed : buttonB; - NSColor* bStroke = bPressed ? pressedStroke : strokeB; - NSColor* xColor = xPressed ? pressed : buttonX; - NSColor* xStroke = xPressed ? pressedStroke : strokeX; - NSColor* yColor = yPressed ? pressed : buttonY; - NSColor* yStroke = yPressed ? pressedStroke : strokeY; - NSColor* backColor = backPressed ? pressed : controller; - NSColor* backStroke = backPressed ? pressedStroke : darkController; - NSColor* startColor = startPressed ? pressed : controller; - NSColor* startStroke = startPressed ? pressedStroke : darkController; - NSColor* lbColor = lbPressed ? pressed : darkController; - CGFloat leftAngle = lbPressed ? 2.5 : 0; - NSColor* rbColor = rbPressed ? pressed : darkController; - CGFloat rightAngle = rbPressed ? -2.5 : 0; - NSColor* homeColor = homePressed ? pressed : buttonHOME; - NSColor* homeStroke = homePressed ? pressedStroke : strokeHOME; - NSColor* leftStickColor = leftStickPressed ? pressed : stick; - NSColor* leftStickStroke = leftStickPressed ? pressedStroke : shadowStick; - NSColor* rightStickColor = rightStickPressed ? pressed : stick; - NSColor* rightStickStroke = rightStickPressed ? pressedStroke : shadowStick; - NSPoint leftStickPosition = NSMakePoint(leftStick.x * 15, -leftStick.y * 15); - NSPoint rightStickPosition = NSMakePoint(rightStick.x * 15, -rightStick.y * 15); - - //// right shoulder Drawing - [NSGraphicsContext saveGraphicsState]; - CGContextTranslateCTM(context, 319, 284); - CGContextRotateCTM(context, rightAngle * M_PI / 180); - - NSBezierPath* rightShoulderPath = NSBezierPath.bezierPath; - [rightShoulderPath moveToPoint: NSMakePoint(75.66, 2.83)]; - [rightShoulderPath curveToPoint: NSMakePoint(74.51, 15.43) controlPoint1: NSMakePoint(76.42, 14.82) controlPoint2: NSMakePoint(75.86, 12.28)]; - [rightShoulderPath curveToPoint: NSMakePoint(39.25, 32.38) controlPoint1: NSMakePoint(73.16, 18.58) controlPoint2: NSMakePoint(52.17, 30.17)]; - [rightShoulderPath curveToPoint: NSMakePoint(5.16, 34.04) controlPoint1: NSMakePoint(26.34, 34.59) controlPoint2: NSMakePoint(11.96, 36.06)]; - [rightShoulderPath curveToPoint: NSMakePoint(2.29, 28.14) controlPoint1: NSMakePoint(5.72, 29.92) controlPoint2: NSMakePoint(2.29, 28.14)]; - [rightShoulderPath lineToPoint: NSMakePoint(0, 26.48)]; - [rightShoulderPath lineToPoint: NSMakePoint(3.45, 20.76)]; - [rightShoulderPath curveToPoint: NSMakePoint(75.66, 2.83) controlPoint1: NSMakePoint(3.45, 20.76) controlPoint2: NSMakePoint(74.91, -9.15)]; - [rightShoulderPath closePath]; - [rbColor setFill]; - [rightShoulderPath fill]; - - [NSGraphicsContext restoreGraphicsState]; - - - //// leftShoulder Drawing - [NSGraphicsContext saveGraphicsState]; - CGContextTranslateCTM(context, 145, 284); - CGContextRotateCTM(context, leftAngle * M_PI / 180); - - NSBezierPath* leftShoulderPath = NSBezierPath.bezierPath; - [leftShoulderPath moveToPoint: NSMakePoint(-75.41, 2.83)]; - [leftShoulderPath curveToPoint: NSMakePoint(-74.26, 15.43) controlPoint1: NSMakePoint(-76.16, 14.82) controlPoint2: NSMakePoint(-75.6, 12.28)]; - [leftShoulderPath curveToPoint: NSMakePoint(-39, 32.38) controlPoint1: NSMakePoint(-72.91, 18.58) controlPoint2: NSMakePoint(-51.91, 30.17)]; - [leftShoulderPath curveToPoint: NSMakePoint(-4.9, 34.04) controlPoint1: NSMakePoint(-26.09, 34.59) controlPoint2: NSMakePoint(-11.71, 36.06)]; - [leftShoulderPath curveToPoint: NSMakePoint(-2.04, 28.14) controlPoint1: NSMakePoint(-5.47, 29.92) controlPoint2: NSMakePoint(-2.04, 28.14)]; - [leftShoulderPath lineToPoint: NSMakePoint(0.25, 26.48)]; - [leftShoulderPath lineToPoint: NSMakePoint(-3.19, 20.76)]; - [leftShoulderPath curveToPoint: NSMakePoint(-75.41, 2.83) controlPoint1: NSMakePoint(-3.19, 20.76) controlPoint2: NSMakePoint(-74.66, -9.15)]; - [leftShoulderPath closePath]; - [lbColor setFill]; - [leftShoulderPath fill]; - - [NSGraphicsContext restoreGraphicsState]; - - - //// Body - { - //// underPiece Drawing - NSBezierPath* underPiecePath = NSBezierPath.bezierPath; - [underPiecePath moveToPoint: NSMakePoint(232.47, 90.1)]; - [underPiecePath curveToPoint: NSMakePoint(257.11, 90.01) controlPoint1: NSMakePoint(232.47, 90.1) controlPoint2: NSMakePoint(241.06, 90.1)]; - [underPiecePath curveToPoint: NSMakePoint(296.1, 85.05) controlPoint1: NSMakePoint(273.16, 89.92) controlPoint2: NSMakePoint(285.23, 88.69)]; - [underPiecePath curveToPoint: NSMakePoint(336.04, 62.49) controlPoint1: NSMakePoint(306.97, 81.4) controlPoint2: NSMakePoint(322.76, 75.77)]; - [underPiecePath curveToPoint: NSMakePoint(389.02, 18.76) controlPoint1: NSMakePoint(349.33, 49.2) controlPoint2: NSMakePoint(378.51, 23.74)]; - [underPiecePath curveToPoint: NSMakePoint(419.68, 12.97) controlPoint1: NSMakePoint(399.54, 13.78) controlPoint2: NSMakePoint(410.82, 12.97)]; - [underPiecePath curveToPoint: NSMakePoint(386.19, 35.56) controlPoint1: NSMakePoint(428.53, 12.97) controlPoint2: NSMakePoint(386.19, 35.56)]; - [underPiecePath lineToPoint: NSMakePoint(337.38, 78.46)]; - [underPiecePath lineToPoint: NSMakePoint(304.07, 97.28)]; - [underPiecePath lineToPoint: NSMakePoint(232.47, 108.05)]; - [underPiecePath lineToPoint: NSMakePoint(160.86, 97.28)]; - [underPiecePath lineToPoint: NSMakePoint(127.55, 78.46)]; - [underPiecePath lineToPoint: NSMakePoint(78.75, 35.56)]; - [underPiecePath curveToPoint: NSMakePoint(45.26, 12.97) controlPoint1: NSMakePoint(78.75, 35.56) controlPoint2: NSMakePoint(36.4, 12.97)]; - [underPiecePath curveToPoint: NSMakePoint(75.91, 18.76) controlPoint1: NSMakePoint(54.11, 12.97) controlPoint2: NSMakePoint(65.39, 13.78)]; - [underPiecePath curveToPoint: NSMakePoint(128.89, 62.49) controlPoint1: NSMakePoint(86.43, 23.74) controlPoint2: NSMakePoint(115.6, 49.2)]; - [underPiecePath curveToPoint: NSMakePoint(168.84, 85.05) controlPoint1: NSMakePoint(142.17, 75.77) controlPoint2: NSMakePoint(157.97, 81.4)]; - [underPiecePath curveToPoint: NSMakePoint(207.83, 90.01) controlPoint1: NSMakePoint(179.7, 88.69) controlPoint2: NSMakePoint(191.77, 89.92)]; - [underPiecePath curveToPoint: NSMakePoint(232.47, 90.1) controlPoint1: NSMakePoint(223.88, 90.1) controlPoint2: NSMakePoint(232.47, 90.1)]; - [underPiecePath closePath]; - [backController setFill]; - [underPiecePath fill]; - - - //// upperPiece Drawing - NSBezierPath* upperPiecePath = NSBezierPath.bezierPath; - [upperPiecePath moveToPoint: NSMakePoint(326.27, 297.74)]; - [upperPiecePath lineToPoint: NSMakePoint(317.45, 309.05)]; - [upperPiecePath curveToPoint: NSMakePoint(287.1, 295.84) controlPoint1: NSMakePoint(317.45, 309.05) controlPoint2: NSMakePoint(297.62, 299)]; - [upperPiecePath curveToPoint: NSMakePoint(256.74, 291.86) controlPoint1: NSMakePoint(276.58, 292.68) controlPoint2: NSMakePoint(265.74, 291.86)]; - [upperPiecePath curveToPoint: NSMakePoint(232.14, 291.86) controlPoint1: NSMakePoint(247.75, 291.86) controlPoint2: NSMakePoint(232.14, 291.86)]; - [upperPiecePath curveToPoint: NSMakePoint(207.54, 291.86) controlPoint1: NSMakePoint(232.14, 291.86) controlPoint2: NSMakePoint(216.54, 291.86)]; - [upperPiecePath curveToPoint: NSMakePoint(177.19, 295.84) controlPoint1: NSMakePoint(198.55, 291.86) controlPoint2: NSMakePoint(187.71, 292.68)]; - [upperPiecePath curveToPoint: NSMakePoint(146.84, 309.05) controlPoint1: NSMakePoint(166.67, 299) controlPoint2: NSMakePoint(146.84, 309.05)]; - [upperPiecePath lineToPoint: NSMakePoint(138.02, 297.74)]; - [upperPiecePath lineToPoint: NSMakePoint(155.56, 278.49)]; - [upperPiecePath lineToPoint: NSMakePoint(232.14, 262.55)]; - [upperPiecePath lineToPoint: NSMakePoint(317.45, 278.49)]; - [upperPiecePath lineToPoint: NSMakePoint(326.27, 297.74)]; - [upperPiecePath closePath]; - [darkController setFill]; - [upperPiecePath fill]; - - - //// mainPiece Drawing - NSBezierPath* mainPiecePath = NSBezierPath.bezierPath; - [mainPiecePath moveToPoint: NSMakePoint(232, 98.24)]; - [mainPiecePath curveToPoint: NSMakePoint(199.49, 98.26) controlPoint1: NSMakePoint(232, 98.24) controlPoint2: NSMakePoint(218.98, 98.26)]; - [mainPiecePath curveToPoint: NSMakePoint(138.69, 81.37) controlPoint1: NSMakePoint(180.01, 98.26) controlPoint2: NSMakePoint(156.34, 94.14)]; - [mainPiecePath curveToPoint: NSMakePoint(95.6, 43.69) controlPoint1: NSMakePoint(121.04, 68.61) controlPoint2: NSMakePoint(108.77, 56.87)]; - [mainPiecePath curveToPoint: NSMakePoint(57.75, 13.88) controlPoint1: NSMakePoint(82.43, 30.52) controlPoint2: NSMakePoint(64.46, 16.16)]; - [mainPiecePath curveToPoint: NSMakePoint(32.63, 15.05) controlPoint1: NSMakePoint(51.04, 11.59) controlPoint2: NSMakePoint(38.05, 12.26)]; - [mainPiecePath curveToPoint: NSMakePoint(19.8, 29.28) controlPoint1: NSMakePoint(27.21, 17.84) controlPoint2: NSMakePoint(24.05, 21.26)]; - [mainPiecePath curveToPoint: NSMakePoint(12.25, 56.33) controlPoint1: NSMakePoint(15.55, 37.31) controlPoint2: NSMakePoint(13.81, 44.39)]; - [mainPiecePath curveToPoint: NSMakePoint(12.42, 103.97) controlPoint1: NSMakePoint(10.69, 68.26) controlPoint2: NSMakePoint(10.42, 83.87)]; - [mainPiecePath curveToPoint: NSMakePoint(19.13, 150.74) controlPoint1: NSMakePoint(14.42, 124.07) controlPoint2: NSMakePoint(15.78, 132)]; - [mainPiecePath curveToPoint: NSMakePoint(33.86, 208.39) controlPoint1: NSMakePoint(22.49, 169.47) controlPoint2: NSMakePoint(28.2, 189.55)]; - [mainPiecePath curveToPoint: NSMakePoint(52.42, 261.72) controlPoint1: NSMakePoint(39.51, 227.24) controlPoint2: NSMakePoint(48.55, 251.39)]; - [mainPiecePath curveToPoint: NSMakePoint(67.84, 292.19) controlPoint1: NSMakePoint(56.3, 272.06) controlPoint2: NSMakePoint(61.45, 286.91)]; - [mainPiecePath curveToPoint: NSMakePoint(99.81, 307.81) controlPoint1: NSMakePoint(74.22, 297.48) controlPoint2: NSMakePoint(85.43, 303.66)]; - [mainPiecePath curveToPoint: NSMakePoint(136.77, 310.82) controlPoint1: NSMakePoint(114.19, 311.96) controlPoint2: NSMakePoint(130.32, 312.02)]; - [mainPiecePath curveToPoint: NSMakePoint(153.53, 302.45) controlPoint1: NSMakePoint(143.23, 309.63) controlPoint2: NSMakePoint(145.42, 307.99)]; - [mainPiecePath curveToPoint: NSMakePoint(172.67, 290.01) controlPoint1: NSMakePoint(161.65, 296.92) controlPoint2: NSMakePoint(166.26, 293.18)]; - [mainPiecePath curveToPoint: NSMakePoint(198.91, 282.53) controlPoint1: NSMakePoint(179.08, 286.83) controlPoint2: NSMakePoint(187.74, 283.91)]; - [mainPiecePath curveToPoint: NSMakePoint(232, 280.48) controlPoint1: NSMakePoint(210.07, 281.15) controlPoint2: NSMakePoint(225.73, 280.57)]; - [mainPiecePath curveToPoint: NSMakePoint(265.09, 282.53) controlPoint1: NSMakePoint(238.27, 280.57) controlPoint2: NSMakePoint(253.93, 281.15)]; - [mainPiecePath curveToPoint: NSMakePoint(291.33, 290.01) controlPoint1: NSMakePoint(276.26, 283.91) controlPoint2: NSMakePoint(284.92, 286.83)]; - [mainPiecePath curveToPoint: NSMakePoint(310.47, 302.45) controlPoint1: NSMakePoint(297.74, 293.18) controlPoint2: NSMakePoint(302.35, 296.92)]; - [mainPiecePath curveToPoint: NSMakePoint(327.23, 310.82) controlPoint1: NSMakePoint(318.58, 307.99) controlPoint2: NSMakePoint(320.77, 309.63)]; - [mainPiecePath curveToPoint: NSMakePoint(364.19, 307.81) controlPoint1: NSMakePoint(333.68, 312.02) controlPoint2: NSMakePoint(349.81, 311.96)]; - [mainPiecePath curveToPoint: NSMakePoint(396.16, 292.19) controlPoint1: NSMakePoint(378.57, 303.66) controlPoint2: NSMakePoint(389.78, 297.48)]; - [mainPiecePath curveToPoint: NSMakePoint(411.58, 261.72) controlPoint1: NSMakePoint(402.55, 286.91) controlPoint2: NSMakePoint(407.7, 272.06)]; - [mainPiecePath curveToPoint: NSMakePoint(430.14, 208.39) controlPoint1: NSMakePoint(415.45, 251.39) controlPoint2: NSMakePoint(424.49, 227.24)]; - [mainPiecePath curveToPoint: NSMakePoint(444.87, 150.74) controlPoint1: NSMakePoint(435.8, 189.55) controlPoint2: NSMakePoint(441.51, 169.47)]; - [mainPiecePath curveToPoint: NSMakePoint(451.58, 103.97) controlPoint1: NSMakePoint(448.22, 132) controlPoint2: NSMakePoint(449.58, 124.07)]; - [mainPiecePath curveToPoint: NSMakePoint(451.75, 56.33) controlPoint1: NSMakePoint(453.58, 83.87) controlPoint2: NSMakePoint(453.31, 68.26)]; - [mainPiecePath curveToPoint: NSMakePoint(444.2, 29.28) controlPoint1: NSMakePoint(450.19, 44.39) controlPoint2: NSMakePoint(448.45, 37.31)]; - [mainPiecePath curveToPoint: NSMakePoint(431.37, 15.05) controlPoint1: NSMakePoint(439.95, 21.26) controlPoint2: NSMakePoint(436.79, 17.84)]; - [mainPiecePath curveToPoint: NSMakePoint(406.25, 13.88) controlPoint1: NSMakePoint(425.95, 12.26) controlPoint2: NSMakePoint(412.96, 11.59)]; - [mainPiecePath curveToPoint: NSMakePoint(368.4, 43.69) controlPoint1: NSMakePoint(399.54, 16.16) controlPoint2: NSMakePoint(382.98, 29.55)]; - [mainPiecePath curveToPoint: NSMakePoint(325.31, 81.37) controlPoint1: NSMakePoint(353.82, 57.83) controlPoint2: NSMakePoint(342.96, 68.61)]; - [mainPiecePath curveToPoint: NSMakePoint(264.51, 98.26) controlPoint1: NSMakePoint(307.66, 94.14) controlPoint2: NSMakePoint(283.99, 98.26)]; - [mainPiecePath curveToPoint: NSMakePoint(232, 98.24) controlPoint1: NSMakePoint(245.02, 98.26) controlPoint2: NSMakePoint(232, 98.24)]; - [mainPiecePath closePath]; - [controller setFill]; - [mainPiecePath fill]; - - - //// Bezier 6 Drawing - NSBezierPath* bezier6Path = NSBezierPath.bezierPath; - [bezier6Path moveToPoint: NSMakePoint(137.17, 310.95)]; - [bezier6Path curveToPoint: NSMakePoint(153.95, 302.58) controlPoint1: NSMakePoint(143.63, 309.75) controlPoint2: NSMakePoint(145.82, 308.12)]; - [bezier6Path curveToPoint: NSMakePoint(173.1, 290.14) controlPoint1: NSMakePoint(162.07, 297.05) controlPoint2: NSMakePoint(166.68, 293.31)]; - [bezier6Path curveToPoint: NSMakePoint(199.35, 282.66) controlPoint1: NSMakePoint(179.51, 286.96) controlPoint2: NSMakePoint(188.18, 284.04)]; - [bezier6Path curveToPoint: NSMakePoint(232.47, 280.6) controlPoint1: NSMakePoint(210.52, 281.27) controlPoint2: NSMakePoint(226.19, 280.69)]; - [bezier6Path curveToPoint: NSMakePoint(265.58, 282.66) controlPoint1: NSMakePoint(238.74, 280.69) controlPoint2: NSMakePoint(254.41, 281.27)]; - [bezier6Path curveToPoint: NSMakePoint(291.84, 290.14) controlPoint1: NSMakePoint(276.75, 284.04) controlPoint2: NSMakePoint(285.42, 286.96)]; - [bezier6Path curveToPoint: NSMakePoint(310.99, 302.58) controlPoint1: NSMakePoint(298.25, 293.31) controlPoint2: NSMakePoint(302.86, 297.05)]; - [bezier6Path curveToPoint: NSMakePoint(327.76, 310.95) controlPoint1: NSMakePoint(319.11, 308.12) controlPoint2: NSMakePoint(321.3, 309.75)]; - [bezier6Path curveToPoint: NSMakePoint(364.75, 307.94) controlPoint1: NSMakePoint(334.22, 312.15) controlPoint2: NSMakePoint(350.36, 312.09)]; - [bezier6Path curveToPoint: NSMakePoint(396.75, 292.32) controlPoint1: NSMakePoint(379.14, 303.79) controlPoint2: NSMakePoint(390.36, 297.61)]; - [bezier6Path curveToPoint: NSMakePoint(400.42, 288.13) controlPoint1: NSMakePoint(398.02, 291.27) controlPoint2: NSMakePoint(399.24, 289.83)]; - [bezier6Path curveToPoint: NSMakePoint(344.12, 305.03) controlPoint1: NSMakePoint(382.74, 295.64) controlPoint2: NSMakePoint(359.83, 304.98)]; - [bezier6Path curveToPoint: NSMakePoint(304.61, 289.92) controlPoint1: NSMakePoint(324.85, 305.1) controlPoint2: NSMakePoint(319.18, 300.27)]; - [bezier6Path curveToPoint: NSMakePoint(261.8, 273.12) controlPoint1: NSMakePoint(290.05, 279.57) controlPoint2: NSMakePoint(275.66, 274.04)]; - [bezier6Path curveToPoint: NSMakePoint(243.28, 272.63) controlPoint1: NSMakePoint(255.52, 272.7) controlPoint2: NSMakePoint(248.78, 272.61)]; - [bezier6Path curveToPoint: NSMakePoint(232.14, 272.63) controlPoint1: NSMakePoint(236.64, 272.65) controlPoint2: NSMakePoint(232.14, 272.63)]; - [bezier6Path curveToPoint: NSMakePoint(221.01, 272.63) controlPoint1: NSMakePoint(232.14, 272.63) controlPoint2: NSMakePoint(227.65, 272.65)]; - [bezier6Path curveToPoint: NSMakePoint(202.49, 273.12) controlPoint1: NSMakePoint(215.51, 272.61) controlPoint2: NSMakePoint(208.77, 272.7)]; - [bezier6Path curveToPoint: NSMakePoint(159.67, 289.92) controlPoint1: NSMakePoint(188.63, 274.04) controlPoint2: NSMakePoint(174.24, 279.57)]; - [bezier6Path curveToPoint: NSMakePoint(120.17, 305.03) controlPoint1: NSMakePoint(145.11, 300.27) controlPoint2: NSMakePoint(139.44, 305.1)]; - [bezier6Path curveToPoint: NSMakePoint(64.79, 288.52) controlPoint1: NSMakePoint(104.73, 304.98) controlPoint2: NSMakePoint(82.34, 295.96)]; - [bezier6Path curveToPoint: NSMakePoint(68.19, 292.32) controlPoint1: NSMakePoint(65.88, 290.05) controlPoint2: NSMakePoint(67.01, 291.35)]; - [bezier6Path curveToPoint: NSMakePoint(100.18, 307.94) controlPoint1: NSMakePoint(74.57, 297.61) controlPoint2: NSMakePoint(85.79, 303.79)]; - [bezier6Path curveToPoint: NSMakePoint(137.17, 310.95) controlPoint1: NSMakePoint(114.57, 312.09) controlPoint2: NSMakePoint(130.72, 312.15)]; - [bezier6Path closePath]; - [highlightController setFill]; - [bezier6Path fill]; - - - //// Oval Drawing - NSBezierPath* ovalPath = NSBezierPath.bezierPath; - [ovalPath moveToPoint: NSMakePoint(327.06, 123.32)]; - [ovalPath curveToPoint: NSMakePoint(327.06, 194.38) controlPoint1: NSMakePoint(346.1, 142.94) controlPoint2: NSMakePoint(346.1, 174.76)]; - [ovalPath curveToPoint: NSMakePoint(258.12, 194.38) controlPoint1: NSMakePoint(308.02, 214.01) controlPoint2: NSMakePoint(277.16, 214.01)]; - [ovalPath curveToPoint: NSMakePoint(258.12, 123.32) controlPoint1: NSMakePoint(239.08, 174.76) controlPoint2: NSMakePoint(239.08, 142.94)]; - [ovalPath curveToPoint: NSMakePoint(327.06, 123.32) controlPoint1: NSMakePoint(277.16, 103.69) controlPoint2: NSMakePoint(308.02, 103.69)]; - [ovalPath closePath]; - [darkController setStroke]; - [ovalPath setLineWidth: 1]; - [ovalPath stroke]; - - - //// Oval 4 Drawing - NSBezierPath* oval4Path = NSBezierPath.bezierPath; - [oval4Path moveToPoint: NSMakePoint(136.58, 207.39)]; - [oval4Path curveToPoint: NSMakePoint(136.58, 271.56) controlPoint1: NSMakePoint(154.59, 225.11) controlPoint2: NSMakePoint(154.59, 253.84)]; - [oval4Path curveToPoint: NSMakePoint(71.35, 271.56) controlPoint1: NSMakePoint(118.57, 289.28) controlPoint2: NSMakePoint(89.36, 289.28)]; - [oval4Path curveToPoint: NSMakePoint(71.35, 207.39) controlPoint1: NSMakePoint(53.34, 253.84) controlPoint2: NSMakePoint(53.34, 225.11)]; - [oval4Path curveToPoint: NSMakePoint(136.58, 207.39) controlPoint1: NSMakePoint(89.36, 189.67) controlPoint2: NSMakePoint(118.57, 189.67)]; - [oval4Path closePath]; - [darkController setStroke]; - [oval4Path setLineWidth: 1]; - [oval4Path stroke]; - - - //// Oval 2 Drawing - NSBezierPath* oval2Path = NSBezierPath.bezierPath; - [oval2Path moveToPoint: NSMakePoint(200.35, 125.54)]; - [oval2Path curveToPoint: NSMakePoint(200.35, 196.4) controlPoint1: NSMakePoint(219.76, 145.11) controlPoint2: NSMakePoint(219.76, 176.83)]; - [oval2Path curveToPoint: NSMakePoint(130.07, 196.4) controlPoint1: NSMakePoint(180.94, 215.97) controlPoint2: NSMakePoint(149.48, 215.97)]; - [oval2Path curveToPoint: NSMakePoint(130.07, 125.54) controlPoint1: NSMakePoint(110.67, 176.83) controlPoint2: NSMakePoint(110.67, 145.11)]; - [oval2Path curveToPoint: NSMakePoint(200.35, 125.54) controlPoint1: NSMakePoint(149.48, 105.97) controlPoint2: NSMakePoint(180.94, 105.97)]; - [oval2Path closePath]; - [darkController setStroke]; - [oval2Path setLineWidth: 1]; - [oval2Path stroke]; - - - //// Oval 8 Drawing - NSBezierPath* oval8Path = NSBezierPath.bezierPath; - [oval8Path moveToPoint: NSMakePoint(325, 163.5)]; - [oval8Path curveToPoint: NSMakePoint(293.5, 195) controlPoint1: NSMakePoint(325, 180.9) controlPoint2: NSMakePoint(310.9, 195)]; - [oval8Path curveToPoint: NSMakePoint(262, 163.5) controlPoint1: NSMakePoint(276.1, 195) controlPoint2: NSMakePoint(262, 180.9)]; - [oval8Path curveToPoint: NSMakePoint(293.5, 132) controlPoint1: NSMakePoint(262, 146.1) controlPoint2: NSMakePoint(276.1, 132)]; - [oval8Path curveToPoint: NSMakePoint(325, 163.5) controlPoint1: NSMakePoint(310.9, 132) controlPoint2: NSMakePoint(325, 146.1)]; - [oval8Path closePath]; - [highlightStick setFill]; - [oval8Path fill]; - [darkController setStroke]; - [oval8Path setLineWidth: 2]; - [oval8Path stroke]; - - - //// Oval 6 Drawing - NSBezierPath* oval6Path = NSBezierPath.bezierPath; - [oval6Path moveToPoint: NSMakePoint(135, 240.5)]; - [oval6Path curveToPoint: NSMakePoint(103.5, 272) controlPoint1: NSMakePoint(135, 257.9) controlPoint2: NSMakePoint(120.9, 272)]; - [oval6Path curveToPoint: NSMakePoint(72, 240.5) controlPoint1: NSMakePoint(86.1, 272) controlPoint2: NSMakePoint(72, 257.9)]; - [oval6Path curveToPoint: NSMakePoint(103.5, 209) controlPoint1: NSMakePoint(72, 223.1) controlPoint2: NSMakePoint(86.1, 209)]; - [oval6Path curveToPoint: NSMakePoint(135, 240.5) controlPoint1: NSMakePoint(120.9, 209) controlPoint2: NSMakePoint(135, 223.1)]; - [oval6Path closePath]; - [highlightStick setFill]; - [oval6Path fill]; - [darkController setStroke]; - [oval6Path setLineWidth: 2]; - [oval6Path stroke]; - } - - - //// But home Drawing - NSBezierPath* butHomePath = NSBezierPath.bezierPath; - [butHomePath moveToPoint: NSMakePoint(251.22, 234.1)]; - [butHomePath curveToPoint: NSMakePoint(232.47, 252.85) controlPoint1: NSMakePoint(251.22, 244.46) controlPoint2: NSMakePoint(242.82, 252.85)]; - [butHomePath curveToPoint: NSMakePoint(213.72, 234.1) controlPoint1: NSMakePoint(222.11, 252.85) controlPoint2: NSMakePoint(213.72, 244.46)]; - [butHomePath curveToPoint: NSMakePoint(232.47, 215.35) controlPoint1: NSMakePoint(213.72, 223.75) controlPoint2: NSMakePoint(222.11, 215.35)]; - [butHomePath curveToPoint: NSMakePoint(251.22, 234.1) controlPoint1: NSMakePoint(242.82, 215.35) controlPoint2: NSMakePoint(251.22, 223.75)]; - [butHomePath closePath]; - [homeColor setFill]; - [butHomePath fill]; - [homeStroke setStroke]; - [butHomePath setLineWidth: 2]; - [butHomePath stroke]; - - - //// But select - { - //// back Drawing - NSBezierPath* backPath = NSBezierPath.bezierPath; - [backPath moveToPoint: NSMakePoint(197.97, 234.85)]; - [backPath curveToPoint: NSMakePoint(188.93, 224.48) controlPoint1: NSMakePoint(197.97, 229.61) controlPoint2: NSMakePoint(194.05, 225.26)]; - [backPath curveToPoint: NSMakePoint(187.26, 224.35) controlPoint1: NSMakePoint(188.38, 224.4) controlPoint2: NSMakePoint(187.83, 224.35)]; - [backPath curveToPoint: NSMakePoint(183.93, 224.35) controlPoint1: NSMakePoint(187.26, 224.35) controlPoint2: NSMakePoint(184.49, 224.35)]; - [backPath curveToPoint: NSMakePoint(173.22, 234.85) controlPoint1: NSMakePoint(178.01, 224.35) controlPoint2: NSMakePoint(173.22, 229.05)]; - [backPath curveToPoint: NSMakePoint(183.93, 245.35) controlPoint1: NSMakePoint(173.22, 240.65) controlPoint2: NSMakePoint(178.01, 245.35)]; - [backPath curveToPoint: NSMakePoint(187.26, 245.35) controlPoint1: NSMakePoint(184.49, 245.35) controlPoint2: NSMakePoint(186.69, 245.35)]; - [backPath curveToPoint: NSMakePoint(197.97, 234.85) controlPoint1: NSMakePoint(193.17, 245.35) controlPoint2: NSMakePoint(197.97, 240.65)]; - [backPath closePath]; - [backColor setFill]; - [backPath fill]; - [backStroke setStroke]; - [backPath setLineWidth: 2]; - [backPath stroke]; - - - //// Rectangle Drawing - NSBezierPath* rectanglePath = NSBezierPath.bezierPath; - [rectanglePath moveToPoint: NSMakePoint(188.29, 239.65)]; - [rectanglePath lineToPoint: NSMakePoint(180.49, 234.85)]; - [rectanglePath lineToPoint: NSMakePoint(188.29, 230.05)]; - [rectanglePath lineToPoint: NSMakePoint(188.29, 239.65)]; - [rectanglePath closePath]; - [backStroke setFill]; - [rectanglePath fill]; - } - - - //// But start - { - //// start Drawing - NSBezierPath* startPath = NSBezierPath.bezierPath; - [startPath moveToPoint: NSMakePoint(290.15, 234.85)]; - [startPath curveToPoint: NSMakePoint(281.11, 224.48) controlPoint1: NSMakePoint(290.15, 229.61) controlPoint2: NSMakePoint(286.23, 225.26)]; - [startPath curveToPoint: NSMakePoint(279.44, 224.35) controlPoint1: NSMakePoint(280.57, 224.4) controlPoint2: NSMakePoint(280.01, 224.35)]; - [startPath curveToPoint: NSMakePoint(276.11, 224.35) controlPoint1: NSMakePoint(279.44, 224.35) controlPoint2: NSMakePoint(276.68, 224.35)]; - [startPath curveToPoint: NSMakePoint(265.4, 234.85) controlPoint1: NSMakePoint(270.2, 224.35) controlPoint2: NSMakePoint(265.4, 229.05)]; - [startPath curveToPoint: NSMakePoint(276.11, 245.35) controlPoint1: NSMakePoint(265.4, 240.65) controlPoint2: NSMakePoint(270.2, 245.35)]; - [startPath curveToPoint: NSMakePoint(279.44, 245.35) controlPoint1: NSMakePoint(276.68, 245.35) controlPoint2: NSMakePoint(278.88, 245.35)]; - [startPath curveToPoint: NSMakePoint(290.15, 234.85) controlPoint1: NSMakePoint(285.36, 245.35) controlPoint2: NSMakePoint(290.15, 240.65)]; - [startPath closePath]; - [startColor setFill]; - [startPath fill]; - [startStroke setStroke]; - [startPath setLineWidth: 2]; - [startPath stroke]; - - - //// Rectangle 2 Drawing - NSBezierPath* rectangle2Path = NSBezierPath.bezierPath; - [rectangle2Path moveToPoint: NSMakePoint(275.08, 230.05)]; - [rectangle2Path lineToPoint: NSMakePoint(282.88, 234.85)]; - [rectangle2Path lineToPoint: NSMakePoint(275.08, 239.65)]; - [rectangle2Path lineToPoint: NSMakePoint(275.08, 230.05)]; - [rectangle2Path closePath]; - [startStroke setFill]; - [rectangle2Path fill]; - } - - - //// But X - { - //// X Drawing - NSBezierPath* xPath = NSBezierPath.bezierPath; - [xPath moveToPoint: NSMakePoint(340.5, 236.75)]; - [xPath curveToPoint: NSMakePoint(324.75, 252.5) controlPoint1: NSMakePoint(340.5, 245.45) controlPoint2: NSMakePoint(333.45, 252.5)]; - [xPath curveToPoint: NSMakePoint(309, 236.75) controlPoint1: NSMakePoint(316.05, 252.5) controlPoint2: NSMakePoint(309, 245.45)]; - [xPath curveToPoint: NSMakePoint(324.75, 221) controlPoint1: NSMakePoint(309, 228.05) controlPoint2: NSMakePoint(316.05, 221)]; - [xPath curveToPoint: NSMakePoint(340.5, 236.75) controlPoint1: NSMakePoint(333.45, 221) controlPoint2: NSMakePoint(340.5, 228.05)]; - [xPath closePath]; - [xColor setFill]; - [xPath fill]; - [xStroke setStroke]; - [xPath setLineWidth: 3]; - [xPath stroke]; - - - //// Text Drawing - NSBezierPath* textPath = NSBezierPath.bezierPath; - [textPath moveToPoint: NSMakePoint(316.5, 244.8)]; - [textPath lineToPoint: NSMakePoint(321.98, 244.8)]; - [textPath lineToPoint: NSMakePoint(324.84, 239.85)]; - [textPath lineToPoint: NSMakePoint(327.61, 244.8)]; - [textPath lineToPoint: NSMakePoint(333.03, 244.8)]; - [textPath lineToPoint: NSMakePoint(328.02, 237)]; - [textPath lineToPoint: NSMakePoint(333.51, 228.7)]; - [textPath lineToPoint: NSMakePoint(327.91, 228.7)]; - [textPath lineToPoint: NSMakePoint(324.74, 233.87)]; - [textPath lineToPoint: NSMakePoint(321.55, 228.7)]; - [textPath lineToPoint: NSMakePoint(315.99, 228.7)]; - [textPath lineToPoint: NSMakePoint(321.55, 237.09)]; - [textPath lineToPoint: NSMakePoint(316.5, 244.8)]; - [textPath closePath]; - [xStroke setFill]; - [textPath fill]; - } - - - //// But B - { - //// B Drawing - NSBezierPath* bPath = NSBezierPath.bezierPath; - [bPath moveToPoint: NSMakePoint(407.5, 236.75)]; - [bPath curveToPoint: NSMakePoint(391.75, 252.5) controlPoint1: NSMakePoint(407.5, 245.45) controlPoint2: NSMakePoint(400.45, 252.5)]; - [bPath curveToPoint: NSMakePoint(376, 236.75) controlPoint1: NSMakePoint(383.05, 252.5) controlPoint2: NSMakePoint(376, 245.45)]; - [bPath curveToPoint: NSMakePoint(391.75, 221) controlPoint1: NSMakePoint(376, 228.05) controlPoint2: NSMakePoint(383.05, 221)]; - [bPath curveToPoint: NSMakePoint(407.5, 236.75) controlPoint1: NSMakePoint(400.45, 221) controlPoint2: NSMakePoint(407.5, 228.05)]; - [bPath closePath]; - [bColor setFill]; - [bPath fill]; - [bStroke setStroke]; - [bPath setLineWidth: 3]; - [bPath stroke]; - - - //// Text 3 Drawing - NSBezierPath* text3Path = NSBezierPath.bezierPath; - [text3Path moveToPoint: NSMakePoint(386.3, 243.73)]; - [text3Path lineToPoint: NSMakePoint(394.37, 243.73)]; - [text3Path curveToPoint: NSMakePoint(397.47, 242.73) controlPoint1: NSMakePoint(395.72, 243.73) controlPoint2: NSMakePoint(396.75, 243.4)]; - [text3Path curveToPoint: NSMakePoint(398.55, 240.25) controlPoint1: NSMakePoint(398.19, 242.06) controlPoint2: NSMakePoint(398.55, 241.24)]; - [text3Path curveToPoint: NSMakePoint(397.78, 238.13) controlPoint1: NSMakePoint(398.55, 239.43) controlPoint2: NSMakePoint(398.3, 238.72)]; - [text3Path curveToPoint: NSMakePoint(396.28, 237.2) controlPoint1: NSMakePoint(397.44, 237.74) controlPoint2: NSMakePoint(396.94, 237.43)]; - [text3Path curveToPoint: NSMakePoint(398.49, 235.95) controlPoint1: NSMakePoint(397.28, 236.96) controlPoint2: NSMakePoint(398.02, 236.54)]; - [text3Path curveToPoint: NSMakePoint(399.2, 233.74) controlPoint1: NSMakePoint(398.96, 235.37) controlPoint2: NSMakePoint(399.2, 234.63)]; - [text3Path curveToPoint: NSMakePoint(398.7, 231.79) controlPoint1: NSMakePoint(399.2, 233.02) controlPoint2: NSMakePoint(399.03, 232.37)]; - [text3Path curveToPoint: NSMakePoint(397.32, 230.42) controlPoint1: NSMakePoint(398.36, 231.21) controlPoint2: NSMakePoint(397.9, 230.75)]; - [text3Path curveToPoint: NSMakePoint(395.68, 229.96) controlPoint1: NSMakePoint(396.95, 230.21) controlPoint2: NSMakePoint(396.41, 230.06)]; - [text3Path curveToPoint: NSMakePoint(393.74, 229.77) controlPoint1: NSMakePoint(394.71, 229.83) controlPoint2: NSMakePoint(394.06, 229.77)]; - [text3Path lineToPoint: NSMakePoint(386.3, 229.77)]; - [text3Path lineToPoint: NSMakePoint(386.3, 243.73)]; - [text3Path closePath]; - [text3Path moveToPoint: NSMakePoint(390.65, 238.25)]; - [text3Path lineToPoint: NSMakePoint(392.53, 238.25)]; - [text3Path curveToPoint: NSMakePoint(393.93, 238.6) controlPoint1: NSMakePoint(393.2, 238.25) controlPoint2: NSMakePoint(393.67, 238.37)]; - [text3Path curveToPoint: NSMakePoint(394.33, 239.61) controlPoint1: NSMakePoint(394.19, 238.83) controlPoint2: NSMakePoint(394.33, 239.17)]; - [text3Path curveToPoint: NSMakePoint(393.93, 240.56) controlPoint1: NSMakePoint(394.33, 240.01) controlPoint2: NSMakePoint(394.19, 240.33)]; - [text3Path curveToPoint: NSMakePoint(392.55, 240.9) controlPoint1: NSMakePoint(393.67, 240.79) controlPoint2: NSMakePoint(393.21, 240.9)]; - [text3Path lineToPoint: NSMakePoint(390.65, 240.9)]; - [text3Path lineToPoint: NSMakePoint(390.65, 238.25)]; - [text3Path closePath]; - [text3Path moveToPoint: NSMakePoint(390.65, 232.77)]; - [text3Path lineToPoint: NSMakePoint(392.85, 232.77)]; - [text3Path curveToPoint: NSMakePoint(394.42, 233.17) controlPoint1: NSMakePoint(393.59, 232.77) controlPoint2: NSMakePoint(394.12, 232.9)]; - [text3Path curveToPoint: NSMakePoint(394.88, 234.23) controlPoint1: NSMakePoint(394.73, 233.43) controlPoint2: NSMakePoint(394.88, 233.78)]; - [text3Path curveToPoint: NSMakePoint(394.43, 235.22) controlPoint1: NSMakePoint(394.88, 234.64) controlPoint2: NSMakePoint(394.73, 234.97)]; - [text3Path curveToPoint: NSMakePoint(392.84, 235.6) controlPoint1: NSMakePoint(394.12, 235.47) controlPoint2: NSMakePoint(393.6, 235.6)]; - [text3Path lineToPoint: NSMakePoint(390.65, 235.6)]; - [text3Path lineToPoint: NSMakePoint(390.65, 232.77)]; - [text3Path closePath]; - [bStroke setFill]; - [text3Path fill]; - } - - - //// But Y - { - //// Y Drawing - NSBezierPath* yPath = NSBezierPath.bezierPath; - [yPath moveToPoint: NSMakePoint(375, 272)]; - [yPath curveToPoint: NSMakePoint(359, 288) controlPoint1: NSMakePoint(375, 280.84) controlPoint2: NSMakePoint(367.84, 288)]; - [yPath curveToPoint: NSMakePoint(343, 272) controlPoint1: NSMakePoint(350.16, 288) controlPoint2: NSMakePoint(343, 280.84)]; - [yPath curveToPoint: NSMakePoint(359, 256) controlPoint1: NSMakePoint(343, 263.16) controlPoint2: NSMakePoint(350.16, 256)]; - [yPath curveToPoint: NSMakePoint(375, 272) controlPoint1: NSMakePoint(367.84, 256) controlPoint2: NSMakePoint(375, 263.16)]; - [yPath closePath]; - [yColor setFill]; - [yPath fill]; - [yStroke setStroke]; - [yPath setLineWidth: 3]; - [yPath stroke]; - - - //// Text 4 Drawing - NSBezierPath* text4Path = NSBezierPath.bezierPath; - [text4Path moveToPoint: NSMakePoint(351.4, 277.98)]; - [text4Path lineToPoint: NSMakePoint(356.19, 277.98)]; - [text4Path lineToPoint: NSMakePoint(359.01, 273.27)]; - [text4Path lineToPoint: NSMakePoint(361.83, 277.98)]; - [text4Path lineToPoint: NSMakePoint(366.59, 277.98)]; - [text4Path lineToPoint: NSMakePoint(361.16, 269.87)]; - [text4Path lineToPoint: NSMakePoint(361.16, 264.02)]; - [text4Path lineToPoint: NSMakePoint(356.84, 264.02)]; - [text4Path lineToPoint: NSMakePoint(356.84, 269.87)]; - [text4Path lineToPoint: NSMakePoint(351.4, 277.98)]; - [text4Path closePath]; - [yStroke setFill]; - [text4Path fill]; - } - - - //// But A - { - //// A Drawing - NSBezierPath* aPath = NSBezierPath.bezierPath; - [aPath moveToPoint: NSMakePoint(375, 203)]; - [aPath curveToPoint: NSMakePoint(359, 219) controlPoint1: NSMakePoint(375, 211.84) controlPoint2: NSMakePoint(367.84, 219)]; - [aPath curveToPoint: NSMakePoint(343, 203) controlPoint1: NSMakePoint(350.16, 219) controlPoint2: NSMakePoint(343, 211.84)]; - [aPath curveToPoint: NSMakePoint(359, 187) controlPoint1: NSMakePoint(343, 194.16) controlPoint2: NSMakePoint(350.16, 187)]; - [aPath curveToPoint: NSMakePoint(375, 203) controlPoint1: NSMakePoint(367.84, 187) controlPoint2: NSMakePoint(375, 194.16)]; - [aPath closePath]; - [aColor setFill]; - [aPath fill]; - [aStroke setStroke]; - [aPath setLineWidth: 3]; - [aPath stroke]; - - - //// Text 2 Drawing - NSBezierPath* text2Path = NSBezierPath.bezierPath; - [text2Path moveToPoint: NSMakePoint(361.4, 199.32)]; - [text2Path lineToPoint: NSMakePoint(356.49, 199.32)]; - [text2Path lineToPoint: NSMakePoint(355.81, 197.02)]; - [text2Path lineToPoint: NSMakePoint(351.4, 197.02)]; - [text2Path lineToPoint: NSMakePoint(356.65, 210.98)]; - [text2Path lineToPoint: NSMakePoint(361.35, 210.98)]; - [text2Path lineToPoint: NSMakePoint(366.6, 197.02)]; - [text2Path lineToPoint: NSMakePoint(362.08, 197.02)]; - [text2Path lineToPoint: NSMakePoint(361.4, 199.32)]; - [text2Path closePath]; - [text2Path moveToPoint: NSMakePoint(360.49, 202.34)]; - [text2Path lineToPoint: NSMakePoint(358.95, 207.36)]; - [text2Path lineToPoint: NSMakePoint(357.42, 202.34)]; - [text2Path lineToPoint: NSMakePoint(360.49, 202.34)]; - [text2Path closePath]; - [aStroke setFill]; - [text2Path fill]; - } - - - //// DigiCross - { - //// Oval 3 Drawing - NSBezierPath* oval3Path = NSBezierPath.bezierPath; - [oval3Path moveToPoint: NSMakePoint(204, 162.5)]; - [oval3Path curveToPoint: NSMakePoint(165.5, 201) controlPoint1: NSMakePoint(204, 183.76) controlPoint2: NSMakePoint(186.76, 201)]; - [oval3Path curveToPoint: NSMakePoint(127, 162.5) controlPoint1: NSMakePoint(144.24, 201) controlPoint2: NSMakePoint(127, 183.76)]; - [oval3Path curveToPoint: NSMakePoint(165.5, 124) controlPoint1: NSMakePoint(127, 141.24) controlPoint2: NSMakePoint(144.24, 124)]; - [oval3Path curveToPoint: NSMakePoint(204, 162.5) controlPoint1: NSMakePoint(186.76, 124) controlPoint2: NSMakePoint(204, 141.24)]; - [oval3Path closePath]; - [darkController setFill]; - [oval3Path fill]; - - - //// Oval 5 Drawing - NSBezierPath* oval5Path = NSBezierPath.bezierPath; - [oval5Path moveToPoint: NSMakePoint(201, 162.5)]; - [oval5Path curveToPoint: NSMakePoint(165.5, 198) controlPoint1: NSMakePoint(201, 182.11) controlPoint2: NSMakePoint(185.11, 198)]; - [oval5Path curveToPoint: NSMakePoint(130, 162.5) controlPoint1: NSMakePoint(145.89, 198) controlPoint2: NSMakePoint(130, 182.11)]; - [oval5Path curveToPoint: NSMakePoint(165.5, 127) controlPoint1: NSMakePoint(130, 142.89) controlPoint2: NSMakePoint(145.89, 127)]; - [oval5Path curveToPoint: NSMakePoint(201, 162.5) controlPoint1: NSMakePoint(185.11, 127) controlPoint2: NSMakePoint(201, 142.89)]; - [oval5Path closePath]; - [cross setFill]; - [oval5Path fill]; - [crossStroke setStroke]; - [oval5Path setLineWidth: 1]; - [oval5Path stroke]; - - - //// Bezier 5 Drawing - NSBezierPath* bezier5Path = NSBezierPath.bezierPath; - [bezier5Path moveToPoint: NSMakePoint(176.59, 196.23)]; - [bezier5Path curveToPoint: NSMakePoint(177.55, 184.69) controlPoint1: NSMakePoint(176.63, 194.6) controlPoint2: NSMakePoint(176.83, 189.18)]; - [bezier5Path curveToPoint: NSMakePoint(186.12, 174.48) controlPoint1: NSMakePoint(178.4, 179.35) controlPoint2: NSMakePoint(182.37, 175.72)]; - [bezier5Path curveToPoint: NSMakePoint(199.27, 173.48) controlPoint1: NSMakePoint(189.42, 173.38) controlPoint2: NSMakePoint(197.38, 173.45)]; - [bezier5Path curveToPoint: NSMakePoint(201, 162.5) controlPoint1: NSMakePoint(200.39, 170.02) controlPoint2: NSMakePoint(201, 166.33)]; - [bezier5Path curveToPoint: NSMakePoint(199.18, 151.26) controlPoint1: NSMakePoint(201, 158.57) controlPoint2: NSMakePoint(200.36, 154.79)]; - [bezier5Path curveToPoint: NSMakePoint(187.54, 150.3) controlPoint1: NSMakePoint(197.69, 151.22) controlPoint2: NSMakePoint(192.12, 151.03)]; - [bezier5Path curveToPoint: NSMakePoint(177.32, 141.72) controlPoint1: NSMakePoint(182.19, 149.44) controlPoint2: NSMakePoint(178.56, 145.47)]; - [bezier5Path curveToPoint: NSMakePoint(176.32, 128.68) controlPoint1: NSMakePoint(176.25, 138.48) controlPoint2: NSMakePoint(176.29, 130.75)]; - [bezier5Path curveToPoint: NSMakePoint(165.5, 127) controlPoint1: NSMakePoint(172.91, 127.59) controlPoint2: NSMakePoint(169.27, 127)]; - [bezier5Path curveToPoint: NSMakePoint(157.66, 127.87) controlPoint1: NSMakePoint(162.81, 127) controlPoint2: NSMakePoint(160.18, 127.3)]; - [bezier5Path curveToPoint: NSMakePoint(154.1, 128.87) controlPoint1: NSMakePoint(156.45, 128.14) controlPoint2: NSMakePoint(155.26, 128.48)]; - [bezier5Path curveToPoint: NSMakePoint(153.14, 140.31) controlPoint1: NSMakePoint(154.05, 130.62) controlPoint2: NSMakePoint(153.84, 135.92)]; - [bezier5Path curveToPoint: NSMakePoint(144.56, 150.52) controlPoint1: NSMakePoint(152.28, 145.65) controlPoint2: NSMakePoint(148.32, 149.28)]; - [bezier5Path curveToPoint: NSMakePoint(135.99, 151.49) controlPoint1: NSMakePoint(142.6, 151.17) controlPoint2: NSMakePoint(138.99, 151.41)]; - [bezier5Path curveToPoint: NSMakePoint(131.73, 151.52) controlPoint1: NSMakePoint(134.19, 151.54) controlPoint2: NSMakePoint(132.6, 151.54)]; - [bezier5Path curveToPoint: NSMakePoint(130, 162.5) controlPoint1: NSMakePoint(130.61, 154.98) controlPoint2: NSMakePoint(130, 158.67)]; - [bezier5Path curveToPoint: NSMakePoint(131.82, 173.75) controlPoint1: NSMakePoint(130, 166.43) controlPoint2: NSMakePoint(130.64, 170.21)]; - [bezier5Path curveToPoint: NSMakePoint(136.02, 173.95) controlPoint1: NSMakePoint(132.66, 173.77) controlPoint2: NSMakePoint(134.19, 173.83)]; - [bezier5Path curveToPoint: NSMakePoint(143.15, 174.7) controlPoint1: NSMakePoint(138.2, 174.09) controlPoint2: NSMakePoint(140.8, 174.33)]; - [bezier5Path curveToPoint: NSMakePoint(153.37, 183.28) controlPoint1: NSMakePoint(148.5, 175.56) controlPoint2: NSMakePoint(152.12, 179.53)]; - [bezier5Path curveToPoint: NSMakePoint(154.37, 196.22) controlPoint1: NSMakePoint(154.42, 186.47) controlPoint2: NSMakePoint(154.4, 194.01)]; - [bezier5Path curveToPoint: NSMakePoint(165.5, 198) controlPoint1: NSMakePoint(157.87, 197.37) controlPoint2: NSMakePoint(161.61, 198)]; - [bezier5Path curveToPoint: NSMakePoint(176.59, 196.23) controlPoint1: NSMakePoint(169.37, 198) controlPoint2: NSMakePoint(173.1, 197.38)]; - [bezier5Path closePath]; - [cross setFill]; - [bezier5Path fill]; - [crossStroke setStroke]; - [bezier5Path setLineWidth: 1]; - [bezier5Path stroke]; - - - if (downPressed) - { - //// D - { - //// down Drawing - NSBezierPath* downPath = NSBezierPath.bezierPath; - [downPath moveToPoint: NSMakePoint(181.16, 147.34)]; - [downPath curveToPoint: NSMakePoint(177.32, 141.72) controlPoint1: NSMakePoint(179.29, 145.73) controlPoint2: NSMakePoint(177.97, 143.69)]; - [downPath curveToPoint: NSMakePoint(176.32, 128.68) controlPoint1: NSMakePoint(176.25, 138.48) controlPoint2: NSMakePoint(176.29, 130.75)]; - [downPath curveToPoint: NSMakePoint(165.5, 127) controlPoint1: NSMakePoint(172.91, 127.59) controlPoint2: NSMakePoint(169.27, 127)]; - [downPath curveToPoint: NSMakePoint(157.66, 127.87) controlPoint1: NSMakePoint(162.81, 127) controlPoint2: NSMakePoint(160.18, 127.3)]; - [downPath curveToPoint: NSMakePoint(154.1, 128.87) controlPoint1: NSMakePoint(156.45, 128.14) controlPoint2: NSMakePoint(155.26, 128.48)]; - [downPath curveToPoint: NSMakePoint(153.14, 140.31) controlPoint1: NSMakePoint(154.05, 130.62) controlPoint2: NSMakePoint(153.84, 135.92)]; - [downPath curveToPoint: NSMakePoint(149.7, 147.2) controlPoint1: NSMakePoint(152.69, 143.11) controlPoint2: NSMakePoint(151.39, 145.44)]; - [downPath curveToPoint: NSMakePoint(165.5, 163) controlPoint1: NSMakePoint(158.26, 155.76) controlPoint2: NSMakePoint(165.5, 163)]; - [downPath curveToPoint: NSMakePoint(181.16, 147.34) controlPoint1: NSMakePoint(165.5, 163) controlPoint2: NSMakePoint(172.67, 155.83)]; - [downPath closePath]; - [pressed setFill]; - [downPath fill]; - - - //// down 2 Drawing - NSBezierPath* down2Path = NSBezierPath.bezierPath; - [down2Path moveToPoint: NSMakePoint(181.16, 147.34)]; - [down2Path curveToPoint: NSMakePoint(177.32, 141.72) controlPoint1: NSMakePoint(179.29, 145.73) controlPoint2: NSMakePoint(177.97, 143.69)]; - [down2Path curveToPoint: NSMakePoint(176.32, 128.68) controlPoint1: NSMakePoint(176.25, 138.48) controlPoint2: NSMakePoint(176.29, 130.75)]; - [down2Path curveToPoint: NSMakePoint(165.5, 127) controlPoint1: NSMakePoint(172.91, 127.59) controlPoint2: NSMakePoint(169.27, 127)]; - [down2Path curveToPoint: NSMakePoint(157.66, 127.87) controlPoint1: NSMakePoint(162.81, 127) controlPoint2: NSMakePoint(160.18, 127.3)]; - [down2Path curveToPoint: NSMakePoint(154.1, 128.87) controlPoint1: NSMakePoint(156.45, 128.14) controlPoint2: NSMakePoint(155.26, 128.48)]; - [down2Path curveToPoint: NSMakePoint(153.14, 140.31) controlPoint1: NSMakePoint(154.05, 130.62) controlPoint2: NSMakePoint(153.84, 135.92)]; - [down2Path curveToPoint: NSMakePoint(149.7, 147.2) controlPoint1: NSMakePoint(152.69, 143.11) controlPoint2: NSMakePoint(151.39, 145.44)]; - [pressedStroke setStroke]; - [down2Path setLineWidth: 1]; - [down2Path stroke]; - } - } - - - if (rightPressed) - { - //// R - { - //// right Drawing - NSBezierPath* rightPath = NSBezierPath.bezierPath; - [rightPath moveToPoint: NSMakePoint(186.12, 174.48)]; - [rightPath curveToPoint: NSMakePoint(199.27, 173.48) controlPoint1: NSMakePoint(189.42, 173.38) controlPoint2: NSMakePoint(197.38, 173.45)]; - [rightPath curveToPoint: NSMakePoint(201, 162.5) controlPoint1: NSMakePoint(200.39, 170.02) controlPoint2: NSMakePoint(201, 166.33)]; - [rightPath curveToPoint: NSMakePoint(199.18, 151.26) controlPoint1: NSMakePoint(201, 158.57) controlPoint2: NSMakePoint(200.36, 154.79)]; - [rightPath curveToPoint: NSMakePoint(187.54, 150.3) controlPoint1: NSMakePoint(197.69, 151.22) controlPoint2: NSMakePoint(192.12, 151.03)]; - [rightPath curveToPoint: NSMakePoint(180.64, 146.86) controlPoint1: NSMakePoint(184.73, 149.85) controlPoint2: NSMakePoint(182.4, 148.54)]; - [rightPath curveToPoint: NSMakePoint(165, 162.5) controlPoint1: NSMakePoint(172.16, 155.34) controlPoint2: NSMakePoint(165, 162.5)]; - [rightPath curveToPoint: NSMakePoint(180.65, 178.15) controlPoint1: NSMakePoint(165, 162.5) controlPoint2: NSMakePoint(172.16, 169.66)]; - [rightPath curveToPoint: NSMakePoint(186.12, 174.48) controlPoint1: NSMakePoint(182.24, 176.37) controlPoint2: NSMakePoint(184.21, 175.11)]; - [rightPath closePath]; - [pressed setFill]; - [rightPath fill]; - - - //// right 2 Drawing - NSBezierPath* right2Path = NSBezierPath.bezierPath; - [right2Path moveToPoint: NSMakePoint(180.65, 178.15)]; - [right2Path curveToPoint: NSMakePoint(186.12, 174.48) controlPoint1: NSMakePoint(182.24, 176.37) controlPoint2: NSMakePoint(184.21, 175.11)]; - [right2Path curveToPoint: NSMakePoint(199.27, 173.48) controlPoint1: NSMakePoint(189.42, 173.38) controlPoint2: NSMakePoint(197.38, 173.45)]; - [right2Path curveToPoint: NSMakePoint(201, 162.5) controlPoint1: NSMakePoint(200.39, 170.02) controlPoint2: NSMakePoint(201, 166.33)]; - [right2Path curveToPoint: NSMakePoint(199.18, 151.26) controlPoint1: NSMakePoint(201, 158.57) controlPoint2: NSMakePoint(200.36, 154.79)]; - [right2Path curveToPoint: NSMakePoint(187.54, 150.3) controlPoint1: NSMakePoint(197.69, 151.22) controlPoint2: NSMakePoint(192.12, 151.03)]; - [right2Path curveToPoint: NSMakePoint(180.64, 146.86) controlPoint1: NSMakePoint(184.73, 149.85) controlPoint2: NSMakePoint(182.4, 148.54)]; - [pressedStroke setStroke]; - [right2Path setLineWidth: 1]; - [right2Path stroke]; - } - } - - - if (upPressed) - { - //// U - { - //// up Drawing - NSBezierPath* upPath = NSBezierPath.bezierPath; - [upPath moveToPoint: NSMakePoint(176.59, 196.23)]; - [upPath curveToPoint: NSMakePoint(177.55, 184.69) controlPoint1: NSMakePoint(176.63, 194.6) controlPoint2: NSMakePoint(176.83, 189.18)]; - [upPath curveToPoint: NSMakePoint(181.14, 177.64) controlPoint1: NSMakePoint(178.01, 181.8) controlPoint2: NSMakePoint(179.38, 179.42)]; - [upPath curveToPoint: NSMakePoint(165.5, 162) controlPoint1: NSMakePoint(172.65, 169.15) controlPoint2: NSMakePoint(165.5, 162)]; - [upPath curveToPoint: NSMakePoint(149.69, 177.81) controlPoint1: NSMakePoint(165.5, 162) controlPoint2: NSMakePoint(158.25, 169.25)]; - [upPath curveToPoint: NSMakePoint(153.37, 183.28) controlPoint1: NSMakePoint(151.48, 179.39) controlPoint2: NSMakePoint(152.73, 181.37)]; - [upPath curveToPoint: NSMakePoint(154.37, 196.22) controlPoint1: NSMakePoint(154.42, 186.47) controlPoint2: NSMakePoint(154.4, 194.01)]; - [upPath curveToPoint: NSMakePoint(165.5, 198) controlPoint1: NSMakePoint(157.87, 197.37) controlPoint2: NSMakePoint(161.61, 198)]; - [upPath curveToPoint: NSMakePoint(176.59, 196.23) controlPoint1: NSMakePoint(169.37, 198) controlPoint2: NSMakePoint(173.1, 197.38)]; - [upPath closePath]; - [pressed setFill]; - [upPath fill]; - - - //// up 2 Drawing - NSBezierPath* up2Path = NSBezierPath.bezierPath; - [up2Path moveToPoint: NSMakePoint(149.69, 177.81)]; - [up2Path curveToPoint: NSMakePoint(153.37, 183.28) controlPoint1: NSMakePoint(151.48, 179.39) controlPoint2: NSMakePoint(152.73, 181.37)]; - [up2Path curveToPoint: NSMakePoint(154.37, 196.22) controlPoint1: NSMakePoint(154.42, 186.47) controlPoint2: NSMakePoint(154.4, 194.01)]; - [up2Path curveToPoint: NSMakePoint(165.5, 198) controlPoint1: NSMakePoint(157.87, 197.37) controlPoint2: NSMakePoint(161.61, 198)]; - [up2Path curveToPoint: NSMakePoint(176.59, 196.23) controlPoint1: NSMakePoint(169.37, 198) controlPoint2: NSMakePoint(173.1, 197.38)]; - [up2Path curveToPoint: NSMakePoint(177.55, 184.69) controlPoint1: NSMakePoint(176.63, 194.6) controlPoint2: NSMakePoint(176.83, 189.18)]; - [up2Path curveToPoint: NSMakePoint(181.14, 177.64) controlPoint1: NSMakePoint(178.01, 181.8) controlPoint2: NSMakePoint(179.38, 179.42)]; - [pressedStroke setStroke]; - [up2Path setLineWidth: 1]; - [up2Path stroke]; - } - } - - - if (leftPressed) - { - //// L - { - //// left Drawing - NSBezierPath* leftPath = NSBezierPath.bezierPath; - [leftPath moveToPoint: NSMakePoint(150.18, 146.68)]; - [leftPath curveToPoint: NSMakePoint(144.56, 150.52) controlPoint1: NSMakePoint(148.57, 148.56) controlPoint2: NSMakePoint(146.54, 149.87)]; - [leftPath lineToPoint: NSMakePoint(144.42, 150.57)]; - [leftPath curveToPoint: NSMakePoint(135.99, 151.49) controlPoint1: NSMakePoint(142.43, 151.18) controlPoint2: NSMakePoint(138.92, 151.42)]; - [leftPath curveToPoint: NSMakePoint(131.73, 151.52) controlPoint1: NSMakePoint(134.19, 151.54) controlPoint2: NSMakePoint(132.6, 151.54)]; - [leftPath curveToPoint: NSMakePoint(130, 162.5) controlPoint1: NSMakePoint(130.61, 154.98) controlPoint2: NSMakePoint(130, 158.67)]; - [leftPath curveToPoint: NSMakePoint(131.82, 173.75) controlPoint1: NSMakePoint(130, 166.43) controlPoint2: NSMakePoint(130.64, 170.21)]; - [leftPath curveToPoint: NSMakePoint(136.02, 173.95) controlPoint1: NSMakePoint(132.66, 173.77) controlPoint2: NSMakePoint(134.19, 173.83)]; - [leftPath curveToPoint: NSMakePoint(143.15, 174.7) controlPoint1: NSMakePoint(138.2, 174.09) controlPoint2: NSMakePoint(140.8, 174.33)]; - [leftPath curveToPoint: NSMakePoint(150.21, 178.29) controlPoint1: NSMakePoint(146.04, 175.17) controlPoint2: NSMakePoint(148.43, 176.54)]; - [leftPath curveToPoint: NSMakePoint(166, 162.5) controlPoint1: NSMakePoint(158.76, 169.74) controlPoint2: NSMakePoint(166, 162.5)]; - [leftPath curveToPoint: NSMakePoint(150.18, 146.68) controlPoint1: NSMakePoint(166, 162.5) controlPoint2: NSMakePoint(158.74, 155.24)]; - [leftPath closePath]; - [pressed setFill]; - [leftPath fill]; - - - //// left 2 Drawing - NSBezierPath* left2Path = NSBezierPath.bezierPath; - [left2Path moveToPoint: NSMakePoint(150.18, 146.68)]; - [left2Path curveToPoint: NSMakePoint(144.56, 150.52) controlPoint1: NSMakePoint(148.57, 148.56) controlPoint2: NSMakePoint(146.54, 149.87)]; - [left2Path lineToPoint: NSMakePoint(144.42, 150.57)]; - [left2Path curveToPoint: NSMakePoint(135.99, 151.49) controlPoint1: NSMakePoint(142.43, 151.18) controlPoint2: NSMakePoint(138.92, 151.42)]; - [left2Path curveToPoint: NSMakePoint(131.73, 151.52) controlPoint1: NSMakePoint(134.19, 151.54) controlPoint2: NSMakePoint(132.6, 151.54)]; - [left2Path curveToPoint: NSMakePoint(130, 162.5) controlPoint1: NSMakePoint(130.61, 154.98) controlPoint2: NSMakePoint(130, 158.67)]; - [left2Path curveToPoint: NSMakePoint(131.82, 173.75) controlPoint1: NSMakePoint(130, 166.43) controlPoint2: NSMakePoint(130.64, 170.21)]; - [left2Path curveToPoint: NSMakePoint(136.02, 173.95) controlPoint1: NSMakePoint(132.66, 173.77) controlPoint2: NSMakePoint(134.19, 173.83)]; - [left2Path curveToPoint: NSMakePoint(143.15, 174.7) controlPoint1: NSMakePoint(138.2, 174.09) controlPoint2: NSMakePoint(140.8, 174.33)]; - [left2Path curveToPoint: NSMakePoint(150.21, 178.29) controlPoint1: NSMakePoint(146.04, 175.17) controlPoint2: NSMakePoint(148.43, 176.54)]; - [pressedStroke setStroke]; - [left2Path setLineWidth: 1]; - [left2Path stroke]; - } - } - } - - - //// stickRight - { - if (rightNormalized) - { - CGFloat rightDead = rightDeadzone * 15; - const CGFloat max16 = 15; - CGFloat maxVal = max16 - rightDead; - - if (rightStickPosition.x > 0) - rightStickPosition.x = (fabs(rightStickPosition.x) * maxVal / max16) + rightDead; - else if (rightStickPosition.x < 0) - rightStickPosition.x = -((fabs(rightStickPosition.x) * maxVal / max16) + rightDead); - else - rightStickPosition.x = 0; - - if (rightStickPosition.y > 0) - rightStickPosition.y = (fabs(rightStickPosition.y) * maxVal / max16) + rightDead; - else if (rightStickPosition.y < 0) - rightStickPosition.y = -((fabs(rightStickPosition.y) * maxVal / max16) + rightDead); - else - rightStickPosition.y = 0; - } - [NSGraphicsContext saveGraphicsState]; - CGContextTranslateCTM(context, (rightStickPosition.x + 263), (rightStickPosition.y + 133)); - - - - //// knobRight - { - //// Oval 9 Drawing - NSBezierPath* oval9Path = NSBezierPath.bezierPath; - [oval9Path moveToPoint: NSMakePoint(61, 30.5)]; - [oval9Path curveToPoint: NSMakePoint(30.5, 61) controlPoint1: NSMakePoint(61, 47.34) controlPoint2: NSMakePoint(47.34, 61)]; - [oval9Path curveToPoint: NSMakePoint(0, 30.5) controlPoint1: NSMakePoint(13.66, 61) controlPoint2: NSMakePoint(0, 47.34)]; - [oval9Path curveToPoint: NSMakePoint(30.5, 0) controlPoint1: NSMakePoint(0, 13.66) controlPoint2: NSMakePoint(13.66, 0)]; - [oval9Path curveToPoint: NSMakePoint(61, 30.5) controlPoint1: NSMakePoint(47.34, 0) controlPoint2: NSMakePoint(61, 13.66)]; - [oval9Path closePath]; - [rightStickColor setFill]; - [oval9Path fill]; - [rightStickStroke setStroke]; - [oval9Path setLineWidth: 2]; - [oval9Path stroke]; - - - //// Oval 14 Drawing - NSBezierPath* oval14Path = NSBezierPath.bezierPath; - [oval14Path moveToPoint: NSMakePoint(32.03, 48.8)]; - [oval14Path curveToPoint: NSMakePoint(30.5, 50.33) controlPoint1: NSMakePoint(32.03, 49.64) controlPoint2: NSMakePoint(31.34, 50.33)]; - [oval14Path curveToPoint: NSMakePoint(28.98, 48.8) controlPoint1: NSMakePoint(29.66, 50.33) controlPoint2: NSMakePoint(28.98, 49.64)]; - [oval14Path curveToPoint: NSMakePoint(30.5, 47.27) controlPoint1: NSMakePoint(28.98, 47.96) controlPoint2: NSMakePoint(29.66, 47.27)]; - [oval14Path curveToPoint: NSMakePoint(32.03, 48.8) controlPoint1: NSMakePoint(31.34, 47.27) controlPoint2: NSMakePoint(32.03, 47.96)]; - [oval14Path closePath]; - [NSColor.grayColor setFill]; - [oval14Path fill]; - - - //// Oval 15 Drawing - NSBezierPath* oval15Path = NSBezierPath.bezierPath; - [oval15Path moveToPoint: NSMakePoint(13.73, 30.5)]; - [oval15Path curveToPoint: NSMakePoint(12.2, 32.02) controlPoint1: NSMakePoint(13.73, 31.34) controlPoint2: NSMakePoint(13.04, 32.02)]; - [oval15Path curveToPoint: NSMakePoint(10.68, 30.5) controlPoint1: NSMakePoint(11.36, 32.02) controlPoint2: NSMakePoint(10.68, 31.34)]; - [oval15Path curveToPoint: NSMakePoint(12.2, 28.98) controlPoint1: NSMakePoint(10.68, 29.66) controlPoint2: NSMakePoint(11.36, 28.98)]; - [oval15Path curveToPoint: NSMakePoint(13.73, 30.5) controlPoint1: NSMakePoint(13.04, 28.98) controlPoint2: NSMakePoint(13.73, 29.66)]; - [oval15Path closePath]; - [NSColor.grayColor setFill]; - [oval15Path fill]; - - - //// Oval 16 Drawing - NSBezierPath* oval16Path = NSBezierPath.bezierPath; - [oval16Path moveToPoint: NSMakePoint(50.32, 30.5)]; - [oval16Path curveToPoint: NSMakePoint(48.8, 32.02) controlPoint1: NSMakePoint(50.32, 31.34) controlPoint2: NSMakePoint(49.64, 32.02)]; - [oval16Path curveToPoint: NSMakePoint(47.27, 30.5) controlPoint1: NSMakePoint(47.96, 32.02) controlPoint2: NSMakePoint(47.27, 31.34)]; - [oval16Path curveToPoint: NSMakePoint(48.8, 28.98) controlPoint1: NSMakePoint(47.27, 29.66) controlPoint2: NSMakePoint(47.96, 28.98)]; - [oval16Path curveToPoint: NSMakePoint(50.32, 30.5) controlPoint1: NSMakePoint(49.64, 28.98) controlPoint2: NSMakePoint(50.32, 29.66)]; - [oval16Path closePath]; - [NSColor.grayColor setFill]; - [oval16Path fill]; - - - //// Oval 17 Drawing - NSBezierPath* oval17Path = NSBezierPath.bezierPath; - [oval17Path moveToPoint: NSMakePoint(32.03, 12.2)]; - [oval17Path curveToPoint: NSMakePoint(30.5, 13.72) controlPoint1: NSMakePoint(32.03, 13.04) controlPoint2: NSMakePoint(31.34, 13.72)]; - [oval17Path curveToPoint: NSMakePoint(28.98, 12.2) controlPoint1: NSMakePoint(29.66, 13.72) controlPoint2: NSMakePoint(28.98, 13.04)]; - [oval17Path curveToPoint: NSMakePoint(30.5, 10.68) controlPoint1: NSMakePoint(28.98, 11.36) controlPoint2: NSMakePoint(29.66, 10.68)]; - [oval17Path curveToPoint: NSMakePoint(32.03, 12.2) controlPoint1: NSMakePoint(31.34, 10.68) controlPoint2: NSMakePoint(32.03, 11.36)]; - [oval17Path closePath]; - [NSColor.grayColor setFill]; - [oval17Path fill]; - - - //// Oval 19 Drawing - NSBezierPath* oval19Path = [NSBezierPath bezierPathWithOvalInRect: NSMakeRect(2, 2, 57, 57)]; - [NSGraphicsContext saveGraphicsState]; - [oval19Path addClip]; - [gradient drawFromCenter: NSMakePoint(30.5, 30.5) radius: 4.02 - toCenter: NSMakePoint(30.5, 30.5) radius: 26.54 - options: NSGradientDrawsBeforeStartingLocation | NSGradientDrawsAfterEndingLocation]; - [NSGraphicsContext restoreGraphicsState]; - } - - - - [NSGraphicsContext restoreGraphicsState]; - } - - - //// stickLeft - { - if (leftNormalized) - { - CGFloat leftDead = leftDeadzone * 15; - const CGFloat max16 = 15; - CGFloat maxVal = max16 - leftDead; - - if (leftStickPosition.x > 0) - leftStickPosition.x = (fabs(leftStickPosition.x) * maxVal / max16) + leftDead; - else if (leftStickPosition.x < 0) - leftStickPosition.x = -((fabs(leftStickPosition.x) * maxVal / max16) + leftDead); - else - leftStickPosition.x = 0; - - if (leftStickPosition.y > 0) - leftStickPosition.y = (fabs(leftStickPosition.y) * maxVal / max16) + leftDead; - else if (leftStickPosition.y < 0) - leftStickPosition.y = -((fabs(leftStickPosition.y) * maxVal / max16) + leftDead); - else - leftStickPosition.y = 0; - } - [NSGraphicsContext saveGraphicsState]; - CGContextTranslateCTM(context, (leftStickPosition.x + 104), (leftStickPosition.y + 240)); - - - - //// knobLeft - { - //// Oval 7 Drawing - NSBezierPath* oval7Path = NSBezierPath.bezierPath; - [oval7Path moveToPoint: NSMakePoint(30, 0.5)]; - [oval7Path curveToPoint: NSMakePoint(-0.5, 31) controlPoint1: NSMakePoint(30, 17.34) controlPoint2: NSMakePoint(16.34, 31)]; - [oval7Path curveToPoint: NSMakePoint(-31, 0.5) controlPoint1: NSMakePoint(-17.34, 31) controlPoint2: NSMakePoint(-31, 17.34)]; - [oval7Path curveToPoint: NSMakePoint(-0.5, -30) controlPoint1: NSMakePoint(-31, -16.34) controlPoint2: NSMakePoint(-17.34, -30)]; - [oval7Path curveToPoint: NSMakePoint(30, 0.5) controlPoint1: NSMakePoint(16.34, -30) controlPoint2: NSMakePoint(30, -16.34)]; - [oval7Path closePath]; - [leftStickColor setFill]; - [oval7Path fill]; - [leftStickStroke setStroke]; - [oval7Path setLineWidth: 2]; - [oval7Path stroke]; - - - //// Oval 10 Drawing - NSBezierPath* oval10Path = NSBezierPath.bezierPath; - [oval10Path moveToPoint: NSMakePoint(1.02, 18.8)]; - [oval10Path curveToPoint: NSMakePoint(-0.5, 20.33) controlPoint1: NSMakePoint(1.02, 19.64) controlPoint2: NSMakePoint(0.34, 20.33)]; - [oval10Path curveToPoint: NSMakePoint(-2.03, 18.8) controlPoint1: NSMakePoint(-1.34, 20.33) controlPoint2: NSMakePoint(-2.03, 19.64)]; - [oval10Path curveToPoint: NSMakePoint(-0.5, 17.27) controlPoint1: NSMakePoint(-2.03, 17.96) controlPoint2: NSMakePoint(-1.34, 17.27)]; - [oval10Path curveToPoint: NSMakePoint(1.02, 18.8) controlPoint1: NSMakePoint(0.34, 17.27) controlPoint2: NSMakePoint(1.02, 17.96)]; - [oval10Path closePath]; - [NSColor.grayColor setFill]; - [oval10Path fill]; - - - //// Oval 11 Drawing - NSBezierPath* oval11Path = NSBezierPath.bezierPath; - [oval11Path moveToPoint: NSMakePoint(-17.28, 0.5)]; - [oval11Path curveToPoint: NSMakePoint(-18.8, 2.02) controlPoint1: NSMakePoint(-17.28, 1.34) controlPoint2: NSMakePoint(-17.96, 2.02)]; - [oval11Path curveToPoint: NSMakePoint(-20.33, 0.5) controlPoint1: NSMakePoint(-19.64, 2.02) controlPoint2: NSMakePoint(-20.33, 1.34)]; - [oval11Path curveToPoint: NSMakePoint(-18.8, -1.02) controlPoint1: NSMakePoint(-20.33, -0.34) controlPoint2: NSMakePoint(-19.64, -1.02)]; - [oval11Path curveToPoint: NSMakePoint(-17.28, 0.5) controlPoint1: NSMakePoint(-17.96, -1.02) controlPoint2: NSMakePoint(-17.28, -0.34)]; - [oval11Path closePath]; - [NSColor.grayColor setFill]; - [oval11Path fill]; - - - //// Oval 12 Drawing - NSBezierPath* oval12Path = NSBezierPath.bezierPath; - [oval12Path moveToPoint: NSMakePoint(19.33, 0.5)]; - [oval12Path curveToPoint: NSMakePoint(17.8, 2.02) controlPoint1: NSMakePoint(19.33, 1.34) controlPoint2: NSMakePoint(18.64, 2.02)]; - [oval12Path curveToPoint: NSMakePoint(16.28, 0.5) controlPoint1: NSMakePoint(16.96, 2.02) controlPoint2: NSMakePoint(16.28, 1.34)]; - [oval12Path curveToPoint: NSMakePoint(17.8, -1.02) controlPoint1: NSMakePoint(16.28, -0.34) controlPoint2: NSMakePoint(16.96, -1.02)]; - [oval12Path curveToPoint: NSMakePoint(19.33, 0.5) controlPoint1: NSMakePoint(18.64, -1.02) controlPoint2: NSMakePoint(19.33, -0.34)]; - [oval12Path closePath]; - [NSColor.grayColor setFill]; - [oval12Path fill]; - - - //// Oval 13 Drawing - NSBezierPath* oval13Path = NSBezierPath.bezierPath; - [oval13Path moveToPoint: NSMakePoint(1.02, -17.8)]; - [oval13Path curveToPoint: NSMakePoint(-0.5, -16.27) controlPoint1: NSMakePoint(1.02, -16.96) controlPoint2: NSMakePoint(0.34, -16.27)]; - [oval13Path curveToPoint: NSMakePoint(-2.03, -17.8) controlPoint1: NSMakePoint(-1.34, -16.27) controlPoint2: NSMakePoint(-2.03, -16.96)]; - [oval13Path curveToPoint: NSMakePoint(-0.5, -19.32) controlPoint1: NSMakePoint(-2.03, -18.64) controlPoint2: NSMakePoint(-1.34, -19.32)]; - [oval13Path curveToPoint: NSMakePoint(1.02, -17.8) controlPoint1: NSMakePoint(0.34, -19.32) controlPoint2: NSMakePoint(1.02, -18.64)]; - [oval13Path closePath]; - [NSColor.grayColor setFill]; - [oval13Path fill]; - - - //// Oval 18 Drawing - NSBezierPath* oval18Path = [NSBezierPath bezierPathWithOvalInRect: NSMakeRect(-29, -28, 57, 57)]; - [NSGraphicsContext saveGraphicsState]; - [oval18Path addClip]; - [gradient drawFromCenter: NSMakePoint(-0.5, 0.5) radius: 4.02 - toCenter: NSMakePoint(-0.5, 0.5) radius: 26.54 - options: NSGradientDrawsBeforeStartingLocation | NSGradientDrawsAfterEndingLocation]; - [NSGraphicsContext restoreGraphicsState]; - } - - - - [NSGraphicsContext restoreGraphicsState]; - } - - - //// LEDs - { - //// Bezier Drawing - NSBezierPath* bezierPath = NSBezierPath.bezierPath; - [bezierPath moveToPoint: NSMakePoint(229.47, 261.06)]; - [bezierPath curveToPoint: NSMakePoint(229.47, 259.31) controlPoint1: NSMakePoint(229.47, 260.58) controlPoint2: NSMakePoint(229.47, 259.99)]; - [bezierPath curveToPoint: NSMakePoint(229.47, 256.11) controlPoint1: NSMakePoint(229.47, 258.4) controlPoint2: NSMakePoint(229.47, 257.32)]; - [bezierPath curveToPoint: NSMakePoint(210.46, 237.1) controlPoint1: NSMakePoint(219.29, 255.42) controlPoint2: NSMakePoint(211.15, 247.28)]; - [bezierPath lineToPoint: NSMakePoint(205.51, 237.1)]; - [bezierPath curveToPoint: NSMakePoint(229.47, 261.06) controlPoint1: NSMakePoint(206.21, 250.01) controlPoint2: NSMakePoint(216.56, 260.35)]; - [bezierPath closePath]; - [led1Color setFill]; - [bezierPath fill]; - - - //// Bezier 3 Drawing - NSBezierPath* bezier3Path = NSBezierPath.bezierPath; - [bezier3Path moveToPoint: NSMakePoint(235.47, 261.06)]; - [bezier3Path curveToPoint: NSMakePoint(259.43, 237.1) controlPoint1: NSMakePoint(248.38, 260.35) controlPoint2: NSMakePoint(258.72, 250.01)]; - [bezier3Path curveToPoint: NSMakePoint(254.48, 237.1) controlPoint1: NSMakePoint(258.27, 237.1) controlPoint2: NSMakePoint(256.52, 237.1)]; - [bezier3Path curveToPoint: NSMakePoint(235.47, 256.11) controlPoint1: NSMakePoint(253.78, 247.28) controlPoint2: NSMakePoint(245.65, 255.42)]; - [bezier3Path curveToPoint: NSMakePoint(235.47, 261.06) controlPoint1: NSMakePoint(235.47, 258.24) controlPoint2: NSMakePoint(235.47, 259.95)]; - [bezier3Path closePath]; - [led2Color setFill]; - [bezier3Path fill]; - - - //// Bezier 2 Drawing - NSBezierPath* bezier2Path = NSBezierPath.bezierPath; - [bezier2Path moveToPoint: NSMakePoint(259.43, 231.1)]; - [bezier2Path curveToPoint: NSMakePoint(235.47, 207.14) controlPoint1: NSMakePoint(258.72, 218.19) controlPoint2: NSMakePoint(248.38, 207.85)]; - [bezier2Path curveToPoint: NSMakePoint(235.47, 212.09) controlPoint1: NSMakePoint(235.47, 208.26) controlPoint2: NSMakePoint(235.47, 209.97)]; - [bezier2Path curveToPoint: NSMakePoint(254.48, 231.1) controlPoint1: NSMakePoint(245.65, 212.79) controlPoint2: NSMakePoint(253.78, 220.92)]; - [bezier2Path lineToPoint: NSMakePoint(259.43, 231.1)]; - [bezier2Path closePath]; - [led4Color setFill]; - [bezier2Path fill]; - - - //// Bezier 4 Drawing - NSBezierPath* bezier4Path = NSBezierPath.bezierPath; - [bezier4Path moveToPoint: NSMakePoint(205.51, 231.1)]; - [bezier4Path curveToPoint: NSMakePoint(207.41, 231.1) controlPoint1: NSMakePoint(206.03, 231.1) controlPoint2: NSMakePoint(206.67, 231.1)]; - [bezier4Path curveToPoint: NSMakePoint(210.46, 231.1) controlPoint1: NSMakePoint(208.31, 231.1) controlPoint2: NSMakePoint(209.34, 231.1)]; - [bezier4Path lineToPoint: NSMakePoint(210.48, 230.79)]; - [bezier4Path curveToPoint: NSMakePoint(229.15, 212.12) controlPoint1: NSMakePoint(211.31, 220.87) controlPoint2: NSMakePoint(219.22, 212.95)]; - [bezier4Path lineToPoint: NSMakePoint(229.47, 212.09)]; - [bezier4Path curveToPoint: NSMakePoint(229.47, 207.14) controlPoint1: NSMakePoint(229.47, 209.97) controlPoint2: NSMakePoint(229.47, 208.26)]; - [bezier4Path curveToPoint: NSMakePoint(228.25, 207.24) controlPoint1: NSMakePoint(229.06, 207.17) controlPoint2: NSMakePoint(228.65, 207.2)]; - [bezier4Path curveToPoint: NSMakePoint(206.28, 226.11) controlPoint1: NSMakePoint(217.6, 208.33) controlPoint2: NSMakePoint(208.91, 216)]; - [bezier4Path curveToPoint: NSMakePoint(205.51, 231.1) controlPoint1: NSMakePoint(205.87, 227.72) controlPoint2: NSMakePoint(205.6, 229.39)]; - [bezier4Path closePath]; - [led3Color setFill]; - [bezier4Path fill]; - } - - - //// LEDs - { - //// Bezier Drawing - NSBezierPath* bezierPath = NSBezierPath.bezierPath; - [bezierPath moveToPoint: NSMakePoint(229.47, 261.06)]; - [bezierPath curveToPoint: NSMakePoint(229.47, 259.31) controlPoint1: NSMakePoint(229.47, 260.58) controlPoint2: NSMakePoint(229.47, 259.99)]; - [bezierPath curveToPoint: NSMakePoint(229.47, 256.11) controlPoint1: NSMakePoint(229.47, 258.4) controlPoint2: NSMakePoint(229.47, 257.32)]; - [bezierPath curveToPoint: NSMakePoint(210.46, 237.1) controlPoint1: NSMakePoint(219.29, 255.42) controlPoint2: NSMakePoint(211.15, 247.28)]; - [bezierPath lineToPoint: NSMakePoint(205.51, 237.1)]; - [bezierPath curveToPoint: NSMakePoint(229.47, 261.06) controlPoint1: NSMakePoint(206.21, 250.01) controlPoint2: NSMakePoint(216.56, 260.35)]; - [bezierPath closePath]; - [led1Color setFill]; - [bezierPath fill]; - - - //// Bezier 3 Drawing - NSBezierPath* bezier3Path = NSBezierPath.bezierPath; - [bezier3Path moveToPoint: NSMakePoint(235.47, 261.06)]; - [bezier3Path curveToPoint: NSMakePoint(259.43, 237.1) controlPoint1: NSMakePoint(248.38, 260.35) controlPoint2: NSMakePoint(258.72, 250.01)]; - [bezier3Path curveToPoint: NSMakePoint(254.48, 237.1) controlPoint1: NSMakePoint(258.27, 237.1) controlPoint2: NSMakePoint(256.52, 237.1)]; - [bezier3Path curveToPoint: NSMakePoint(235.47, 256.11) controlPoint1: NSMakePoint(253.78, 247.28) controlPoint2: NSMakePoint(245.65, 255.42)]; - [bezier3Path curveToPoint: NSMakePoint(235.47, 261.06) controlPoint1: NSMakePoint(235.47, 258.24) controlPoint2: NSMakePoint(235.47, 259.95)]; - [bezier3Path closePath]; - [led2Color setFill]; - [bezier3Path fill]; - - - //// Bezier 2 Drawing - NSBezierPath* bezier2Path = NSBezierPath.bezierPath; - [bezier2Path moveToPoint: NSMakePoint(259.43, 231.1)]; - [bezier2Path curveToPoint: NSMakePoint(235.47, 207.14) controlPoint1: NSMakePoint(258.72, 218.19) controlPoint2: NSMakePoint(248.38, 207.85)]; - [bezier2Path curveToPoint: NSMakePoint(235.47, 212.09) controlPoint1: NSMakePoint(235.47, 208.26) controlPoint2: NSMakePoint(235.47, 209.97)]; - [bezier2Path curveToPoint: NSMakePoint(254.48, 231.1) controlPoint1: NSMakePoint(245.65, 212.79) controlPoint2: NSMakePoint(253.78, 220.92)]; - [bezier2Path lineToPoint: NSMakePoint(259.43, 231.1)]; - [bezier2Path closePath]; - [led4Color setFill]; - [bezier2Path fill]; - - - //// Bezier 4 Drawing - NSBezierPath* bezier4Path = NSBezierPath.bezierPath; - [bezier4Path moveToPoint: NSMakePoint(205.51, 231.1)]; - [bezier4Path curveToPoint: NSMakePoint(207.41, 231.1) controlPoint1: NSMakePoint(206.03, 231.1) controlPoint2: NSMakePoint(206.67, 231.1)]; - [bezier4Path curveToPoint: NSMakePoint(210.46, 231.1) controlPoint1: NSMakePoint(208.31, 231.1) controlPoint2: NSMakePoint(209.34, 231.1)]; - [bezier4Path lineToPoint: NSMakePoint(210.48, 230.79)]; - [bezier4Path curveToPoint: NSMakePoint(229.15, 212.12) controlPoint1: NSMakePoint(211.31, 220.87) controlPoint2: NSMakePoint(219.22, 212.95)]; - [bezier4Path lineToPoint: NSMakePoint(229.47, 212.09)]; - [bezier4Path curveToPoint: NSMakePoint(229.47, 207.14) controlPoint1: NSMakePoint(229.47, 209.97) controlPoint2: NSMakePoint(229.47, 208.26)]; - [bezier4Path curveToPoint: NSMakePoint(228.25, 207.24) controlPoint1: NSMakePoint(229.06, 207.17) controlPoint2: NSMakePoint(228.65, 207.2)]; - [bezier4Path curveToPoint: NSMakePoint(206.28, 226.11) controlPoint1: NSMakePoint(217.6, 208.33) controlPoint2: NSMakePoint(208.91, 216)]; - [bezier4Path curveToPoint: NSMakePoint(205.51, 231.1) controlPoint1: NSMakePoint(205.87, 227.72) controlPoint2: NSMakePoint(205.6, 229.39)]; - [bezier4Path closePath]; - [led3Color setFill]; - [bezier4Path fill]; - } -} - -+ (void)drawTriggerMetterWithIntensity: (CGFloat)intensity triggerTitle: (NSString*)triggerTitle -{ - //// General Declarations - CGContextRef context = (CGContextRef)NSGraphicsContext.currentContext.graphicsPort; - - //// Color Declarations - NSColor* controller = [NSColor colorWithCalibratedRed: 0.232 green: 0.232 blue: 0.232 alpha: 1]; - NSColor* darkController = [controller shadowWithLevel: 0.3]; - NSColor* pressed = [NSColor colorWithCalibratedRed: 1 green: 0.432 blue: 0 alpha: 1]; - - //// Variable Declarations - CGFloat expression = 360 - 270 * intensity - 135; - - //// Oval 18 Drawing - NSRect oval18Rect = NSMakeRect(-0, -0, 45, 45); - NSBezierPath* oval18Path = [NSBezierPath bezierPathWithOvalInRect: oval18Rect]; - [controller setFill]; - [oval18Path fill]; - NSMutableParagraphStyle* oval18Style = NSMutableParagraphStyle.defaultParagraphStyle.mutableCopy; - oval18Style.alignment = NSCenterTextAlignment; - - NSDictionary* oval18FontAttributes = @{NSFontAttributeName: [NSFont boldSystemFontOfSize: NSFont.systemFontSize], NSForegroundColorAttributeName: NSColor.whiteColor, NSParagraphStyleAttributeName: oval18Style}; - - CGFloat oval18TextHeight = NSHeight([triggerTitle boundingRectWithSize: oval18Rect.size options: NSStringDrawingUsesLineFragmentOrigin attributes: oval18FontAttributes]); - NSRect oval18TextRect = NSMakeRect(NSMinX(oval18Rect), NSMinY(oval18Rect) + (NSHeight(oval18Rect) - oval18TextHeight) / 2, NSWidth(oval18Rect), oval18TextHeight); - [NSGraphicsContext saveGraphicsState]; - NSRectClip(oval18Rect); - [triggerTitle drawInRect: NSOffsetRect(oval18TextRect, 0, 1) withAttributes: oval18FontAttributes]; - [NSGraphicsContext restoreGraphicsState]; - - - //// Oval 19 Drawing - NSBezierPath* oval19Path = NSBezierPath.bezierPath; - [oval19Path moveToPoint: NSMakePoint(39, 22.5)]; - [oval19Path curveToPoint: NSMakePoint(22.5, 39) controlPoint1: NSMakePoint(39, 31.61) controlPoint2: NSMakePoint(31.61, 39)]; - [oval19Path curveToPoint: NSMakePoint(6, 22.5) controlPoint1: NSMakePoint(13.39, 39) controlPoint2: NSMakePoint(6, 31.61)]; - [oval19Path curveToPoint: NSMakePoint(22.5, 6) controlPoint1: NSMakePoint(6, 13.39) controlPoint2: NSMakePoint(13.39, 6)]; - [oval19Path curveToPoint: NSMakePoint(39, 22.5) controlPoint1: NSMakePoint(31.61, 6) controlPoint2: NSMakePoint(39, 13.39)]; - [oval19Path closePath]; - [darkController setStroke]; - [oval19Path setLineWidth: 1]; - [oval19Path stroke]; - - - //// Oval 20 Drawing - [NSGraphicsContext saveGraphicsState]; - CGContextTranslateCTM(context, 22.5, 22.5); - - NSRect oval20Rect = NSMakeRect(-19.5, -19.5, 39, 39); - NSBezierPath* oval20Path = NSBezierPath.bezierPath; - [oval20Path appendBezierPathWithArcWithCenter: NSMakePoint(NSMidX(oval20Rect), NSMidY(oval20Rect)) radius: NSWidth(oval20Rect) / 2 startAngle: -135 endAngle: expression clockwise: YES]; - - [pressed setStroke]; - [oval20Path setLineWidth: 3]; - [oval20Path stroke]; - - [NSGraphicsContext restoreGraphicsState]; - - - //// Oval Drawing - NSBezierPath* ovalPath = NSBezierPath.bezierPath; - [ovalPath moveToPoint: NSMakePoint(36.29, 8.71)]; - [ovalPath curveToPoint: NSMakePoint(8.71, 8.71) controlPoint1: NSMakePoint(28.67, 1.1) controlPoint2: NSMakePoint(16.33, 1.1)]; - [darkController setStroke]; - [ovalPath setLineWidth: 5.5]; - [ovalPath stroke]; -} - -+ (void)drawBatteryMonitorWithBars: (CGFloat)bars andPercentage: (int)percentage -{ - //// Color Declarations - NSColor* buttonB = [NSColor colorWithCalibratedRed: 1 green: 0.094 blue: 0.072 alpha: 1]; - NSColor* controller = [NSColor colorWithCalibratedRed: 0.232 green: 0.232 blue: 0.232 alpha: 1]; - NSColor* darkController = [controller shadowWithLevel: 0.3]; - - //// Variable Declarations - NSColor* batteryColor = bars > 0 ? darkController : buttonB; - BOOL bar1 = bars > 0; - BOOL bar2 = bars > 1; - BOOL bar3 = bars > 2; - - //// Rectangle 3 Drawing - NSBezierPath* rectangle3Path = NSBezierPath.bezierPath; - [rectangle3Path moveToPoint: NSMakePoint(1, 2.46)]; - [rectangle3Path curveToPoint: NSMakePoint(2.36, 1) controlPoint1: NSMakePoint(1, 1.65) controlPoint2: NSMakePoint(1.61, 1)]; - [rectangle3Path lineToPoint: NSMakePoint(35.64, 1)]; - [rectangle3Path curveToPoint: NSMakePoint(37, 2.46) controlPoint1: NSMakePoint(36.39, 1) controlPoint2: NSMakePoint(37, 1.65)]; - [rectangle3Path lineToPoint: NSMakePoint(37, 18.54)]; - [rectangle3Path curveToPoint: NSMakePoint(35.64, 20) controlPoint1: NSMakePoint(37, 19.35) controlPoint2: NSMakePoint(36.39, 20)]; - [rectangle3Path lineToPoint: NSMakePoint(2.36, 20)]; - [rectangle3Path curveToPoint: NSMakePoint(1, 18.54) controlPoint1: NSMakePoint(1.61, 20) controlPoint2: NSMakePoint(1, 19.35)]; - [rectangle3Path lineToPoint: NSMakePoint(1, 2.46)]; - [rectangle3Path closePath]; - [batteryColor setStroke]; - [rectangle3Path setLineWidth: 2]; - [rectangle3Path stroke]; - - - if (bar1) - { - //// Rectangle Drawing - NSBezierPath* rectanglePath = [NSBezierPath bezierPathWithRect: NSMakeRect(3, 3, 10, 15)]; - [darkController setFill]; - [rectanglePath fill]; - } - - - if (bar2) - { - //// Rectangle 2 Drawing - NSBezierPath* rectangle2Path = [NSBezierPath bezierPathWithRect: NSMakeRect(14, 3, 10, 15)]; - [darkController setFill]; - [rectangle2Path fill]; - } - - - if (bar3) - { - //// Rectangle 4 Drawing - NSBezierPath* rectangle4Path = [NSBezierPath bezierPathWithRect: NSMakeRect(25, 3, 10, 15)]; - [darkController setFill]; - [rectangle4Path fill]; - } - - - //// Rectangle 5 Drawing - NSBezierPath* rectangle5Path = [NSBezierPath bezierPathWithRoundedRect: NSMakeRect(36, 6, 5, 9) xRadius: 1 yRadius: 1]; - [batteryColor setFill]; - [rectangle5Path fill]; - - - //// Battery Text - NSRect batteryTextBoundingRect = NSMakeRect(1, 1, 36, 19); - - NSMutableParagraphStyle* batteryTextStyle = NSMutableParagraphStyle.defaultParagraphStyle.mutableCopy; - batteryTextStyle.alignment = NSCenterTextAlignment; - - NSDictionary* batteryTextFontAttributes = @{NSFontAttributeName: [NSFont boldSystemFontOfSize: NSFont.systemFontSize], NSForegroundColorAttributeName: NSColor.whiteColor, NSParagraphStyleAttributeName: batteryTextStyle, NSStrokeColorAttributeName: NSColor.blackColor, NSStrokeWidthAttributeName: @-6.0 }; - - NSString* percentageString = [NSString stringWithFormat:@"%d%%", percentage]; - CGFloat batteryTextHeight = NSHeight([percentageString boundingRectWithSize: batteryTextBoundingRect.size options: NSStringDrawingUsesLineFragmentOrigin attributes: batteryTextFontAttributes]); - NSRect batteryTextRect = NSMakeRect(NSMinX(batteryTextBoundingRect), NSMinY(batteryTextBoundingRect) + (NSHeight(batteryTextBoundingRect) - batteryTextHeight) / 2, NSWidth(batteryTextBoundingRect), batteryTextHeight); - [NSGraphicsContext saveGraphicsState]; - NSRectClip(batteryTextRect); - [percentageString drawInRect: NSOffsetRect(batteryTextRect, 0, 1) withAttributes: batteryTextFontAttributes]; - [NSGraphicsContext restoreGraphicsState]; -} - -+ (void)drawDeadZoneViewerWithValue: (CGFloat)value linked: (BOOL)linked -{ - //// Color Declarations - NSColor* deadzone = [NSColor colorWithCalibratedRed: 0.922 green: 0 blue: 1 alpha: 1]; - - //// Variable Declarations - CGFloat width = 62 * value; - CGFloat center = 32.5 - width / 2.0; - BOOL circle = linked && value != 0; - BOOL biSquare = !(value == 0 || linked); - - if (biSquare) - { - //// Rectangle Drawing - NSBezierPath* rectanglePath = [NSBezierPath bezierPathWithRect: NSMakeRect(center, 1.5, width, 62)]; - [deadzone setStroke]; - [rectanglePath setLineWidth: 2]; - CGFloat rectanglePattern[] = {2, 2}; - [rectanglePath setLineDash: rectanglePattern count: 2 phase: 0]; - [rectanglePath stroke]; - - - //// Rectangle 2 Drawing - NSBezierPath* rectangle2Path = [NSBezierPath bezierPathWithRect: NSMakeRect(1.5, center, 62, width)]; - [deadzone setStroke]; - [rectangle2Path setLineWidth: 2]; - CGFloat rectangle2Pattern[] = {2, 2}; - [rectangle2Path setLineDash: rectangle2Pattern count: 2 phase: 0]; - [rectangle2Path stroke]; - } - - - if (circle) - { - //// Oval Drawing - NSBezierPath* ovalPath = [NSBezierPath bezierPathWithOvalInRect: NSMakeRect(center, center, width, width)]; - [deadzone setStroke]; - [ovalPath setLineWidth: 2]; - CGFloat ovalPattern[] = {2, 2}; - [ovalPath setLineDash: ovalPattern count: 2 phase: 0]; - [ovalPath stroke]; - } -} - -@end diff --git a/Pref360Control/Resources/artworks.xcassets/AboutTemplate.imageset/AboutTemplate.png b/Pref360Control/Resources/artworks.xcassets/AboutTemplate.imageset/AboutTemplate.png deleted file mode 100644 index f52cbb30..00000000 Binary files a/Pref360Control/Resources/artworks.xcassets/AboutTemplate.imageset/AboutTemplate.png and /dev/null differ diff --git a/Pref360Control/Resources/artworks.xcassets/AboutTemplate.imageset/AboutTemplate@2x.png b/Pref360Control/Resources/artworks.xcassets/AboutTemplate.imageset/AboutTemplate@2x.png deleted file mode 100644 index 15109475..00000000 Binary files a/Pref360Control/Resources/artworks.xcassets/AboutTemplate.imageset/AboutTemplate@2x.png and /dev/null differ diff --git a/Pref360Control/Resources/artworks.xcassets/AboutTemplate.imageset/Contents.json b/Pref360Control/Resources/artworks.xcassets/AboutTemplate.imageset/Contents.json deleted file mode 100644 index 7c9a5abf..00000000 --- a/Pref360Control/Resources/artworks.xcassets/AboutTemplate.imageset/Contents.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "images" : [ - { - "idiom" : "mac", - "scale" : "1x", - "filename" : "AboutTemplate.png" - }, - { - "idiom" : "mac", - "scale" : "2x", - "filename" : "AboutTemplate@2x.png" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/Pref360Control/Resources/artworks.xcassets/PowerOffTemplate.imageset/Contents.json b/Pref360Control/Resources/artworks.xcassets/PowerOffTemplate.imageset/Contents.json deleted file mode 100644 index b1f2d2bd..00000000 --- a/Pref360Control/Resources/artworks.xcassets/PowerOffTemplate.imageset/Contents.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "images" : [ - { - "idiom" : "mac", - "scale" : "1x", - "filename" : "PowerOffTemplate.png" - }, - { - "idiom" : "mac", - "scale" : "2x", - "filename" : "PowerOffTemplate@2x.png" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/Pref360Control/Resources/artworks.xcassets/PowerOffTemplate.imageset/PowerOffTemplate.png b/Pref360Control/Resources/artworks.xcassets/PowerOffTemplate.imageset/PowerOffTemplate.png deleted file mode 100644 index cf77c193..00000000 Binary files a/Pref360Control/Resources/artworks.xcassets/PowerOffTemplate.imageset/PowerOffTemplate.png and /dev/null differ diff --git a/Pref360Control/Resources/artworks.xcassets/PowerOffTemplate.imageset/PowerOffTemplate@2x.png b/Pref360Control/Resources/artworks.xcassets/PowerOffTemplate.imageset/PowerOffTemplate@2x.png deleted file mode 100644 index 3979280a..00000000 Binary files a/Pref360Control/Resources/artworks.xcassets/PowerOffTemplate.imageset/PowerOffTemplate@2x.png and /dev/null differ diff --git a/Pref360Control/Resources/batt0.png b/Pref360Control/Resources/batt0.png deleted file mode 100644 index 611cf2a1..00000000 Binary files a/Pref360Control/Resources/batt0.png and /dev/null differ diff --git a/Pref360Control/Resources/batt0@2x.png b/Pref360Control/Resources/batt0@2x.png deleted file mode 100644 index e6804922..00000000 Binary files a/Pref360Control/Resources/batt0@2x.png and /dev/null differ diff --git a/Pref360Control/Resources/batt1.png b/Pref360Control/Resources/batt1.png deleted file mode 100644 index 01ebdef9..00000000 Binary files a/Pref360Control/Resources/batt1.png and /dev/null differ diff --git a/Pref360Control/Resources/batt1@2x.png b/Pref360Control/Resources/batt1@2x.png deleted file mode 100644 index 9215ef7d..00000000 Binary files a/Pref360Control/Resources/batt1@2x.png and /dev/null differ diff --git a/Pref360Control/Resources/batt2.png b/Pref360Control/Resources/batt2.png deleted file mode 100644 index 7d53c875..00000000 Binary files a/Pref360Control/Resources/batt2.png and /dev/null differ diff --git a/Pref360Control/Resources/batt2@2x.png b/Pref360Control/Resources/batt2@2x.png deleted file mode 100644 index 8f146c4c..00000000 Binary files a/Pref360Control/Resources/batt2@2x.png and /dev/null differ diff --git a/Pref360Control/Resources/batt3.png b/Pref360Control/Resources/batt3.png deleted file mode 100644 index 41ede75c..00000000 Binary files a/Pref360Control/Resources/batt3.png and /dev/null differ diff --git a/Pref360Control/Resources/batt3@2x.png b/Pref360Control/Resources/batt3@2x.png deleted file mode 100644 index 955277ae..00000000 Binary files a/Pref360Control/Resources/batt3@2x.png and /dev/null differ diff --git a/Pref360Control/batt0.tif b/Pref360Control/batt0.tif new file mode 100644 index 00000000..ff3b09c3 Binary files /dev/null and b/Pref360Control/batt0.tif differ diff --git a/Pref360Control/batt1.tif b/Pref360Control/batt1.tif new file mode 100644 index 00000000..42b52186 Binary files /dev/null and b/Pref360Control/batt1.tif differ diff --git a/Pref360Control/batt2.tif b/Pref360Control/batt2.tif new file mode 100644 index 00000000..5475dc41 Binary files /dev/null and b/Pref360Control/batt2.tif differ diff --git a/Pref360Control/batt3.tif b/Pref360Control/batt3.tif new file mode 100644 index 00000000..f0424a7f Binary files /dev/null and b/Pref360Control/batt3.tif differ diff --git a/Pref360Control/battNone.tif b/Pref360Control/battNone.tif new file mode 100644 index 00000000..6f1aa628 Binary files /dev/null and b/Pref360Control/battNone.tif differ diff --git a/Pref360Control/en.lproj/InfoPlist.strings b/Pref360Control/en.lproj/InfoPlist.strings deleted file mode 100644 index f9b04f1b..00000000 --- a/Pref360Control/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,4 +0,0 @@ -/* Localized versions of Info.plist keys */ - -NSHumanReadableCopyright = "Copyright (c) 2006-2013, Colin Munro."; -NSPrefPaneIconLabel = "Xbox 360\nControllers"; diff --git a/Pref360Control/en.lproj/Localizable.strings b/Pref360Control/en.lproj/Localizable.strings deleted file mode 100644 index 24047a12..00000000 --- a/Pref360Control/en.lproj/Localizable.strings +++ /dev/null @@ -1,11 +0,0 @@ -/* - Localizable.strings - 360 Driver - - Created by C.W. Betts on 3/16/14. - Copyright (c) 2014 GitHub. All rights reserved. -*/ - -"Unable to create authorisation request" = "Unable to create authorization request"; -"Unable to acquire authorisation" = "Unable to acquire authorization"; -"Failed to execute the driver tool" = "Failed to execute the driver tool"; diff --git a/Pref360Control/en.lproj/Pref360ControlPref.xib b/Pref360Control/en.lproj/Pref360ControlPref.xib deleted file mode 100644 index d4bb3d94..00000000 --- a/Pref360Control/en.lproj/Pref360ControlPref.xib +++ /dev/null @@ -1,1446 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - You can disable the driver temporarily so your Xbox device can be used in games that access the hardware directly. - -This may be useful when playing some games ported by Aspyr if it supports your device. - -Due to some internal limitations, you need to connect your device once to be able to disable this. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Xbox 360 Controller Driver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Downloaded from: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Project Home: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Cg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Cg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - and various licensed third party controllers from brands like Hori, MadCatz, Logitech, etc. Including access to rumble motors and LEDs, on the Mac OS X platform. It includes a plugin for the Apple Force Feedback Framework so some games will be able to activate them, along with a Preference Pane with which allows you to test everything is installed correctly. Both wire controllers connected via USB, and wireless 360 controllers connected via the Wireless Gaming Receiver for Windows, are supported. -This project is a fork of the - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (kext sign and some scripts) and others (please forgive us if we forgot to include someone). - - - - - - - - - - Licence - - - - - - - - - - Copyright (C) 2006-2013 Colin Munro -This driver is licensed under the GNU Public License. A copy of this license is included in the distribution file, please inspect it before using the binary or source. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Pref360Control/version.plist b/Pref360Control/version.plist new file mode 100644 index 00000000..3c5239fc --- /dev/null +++ b/Pref360Control/version.plist @@ -0,0 +1,18 @@ + + + + + BuildVersion + 328 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + ProductBuildVersion + 7K571 + ProjectName + PreferencePaneTemplate + SourceVersion + 120000 + + diff --git a/Pref360Control/zh-Hans.lproj/InfoPlist.strings b/Pref360Control/zh-Hans.lproj/InfoPlist.strings deleted file mode 100644 index f9b04f1b..00000000 --- a/Pref360Control/zh-Hans.lproj/InfoPlist.strings +++ /dev/null @@ -1,4 +0,0 @@ -/* Localized versions of Info.plist keys */ - -NSHumanReadableCopyright = "Copyright (c) 2006-2013, Colin Munro."; -NSPrefPaneIconLabel = "Xbox 360\nControllers"; diff --git a/Pref360Control/zh-Hans.lproj/Localizable.strings b/Pref360Control/zh-Hans.lproj/Localizable.strings deleted file mode 100644 index c8984513..00000000 --- a/Pref360Control/zh-Hans.lproj/Localizable.strings +++ /dev/null @@ -1,11 +0,0 @@ -/* - Localizable.strings - 360 Driver - - Created by C.W. Betts on 3/16/14. - Copyright (c) 2014 GitHub. All rights reserved. -*/ - -"Unable to create authorisation request" = "无法创建授权请求"; -"Unable to acquire authorisation" = "无法获得授权"; -"Failed to execute the driver tool" = "无法执行驱动程序工具"; diff --git a/Pref360Control/zh-Hans.lproj/Pref360ControlPref.strings b/Pref360Control/zh-Hans.lproj/Pref360ControlPref.strings deleted file mode 100644 index 9fb2c5b6..00000000 --- a/Pref360Control/zh-Hans.lproj/Pref360ControlPref.strings +++ /dev/null @@ -1,178 +0,0 @@ - -/* Class = "NSWindow"; title = "<< do not localize >>"; ObjectID = "3g4-A8-wfV"; */ -"3g4-A8-wfV.title" = "<< do not localize >>"; - -/* Class = "NSSegmentedCell"; 4as-1K-roV.ibShadowedLabels[0] = "Controller Test"; ObjectID = "4as-1K-roV"; */ -"4as-1K-roV.ibShadowedLabels[0]" = "控制器测试"; - -/* Class = "NSSegmentedCell"; 4as-1K-roV.ibShadowedLabels[1] = "Binding"; ObjectID = "4as-1K-roV"; */ -"4as-1K-roV.ibShadowedLabels[1]" = "绑定"; - -/* Class = "NSSegmentedCell"; 4as-1K-roV.ibShadowedLabels[2] = "Advanced"; ObjectID = "4as-1K-roV"; */ -"4as-1K-roV.ibShadowedLabels[2]" = "高级"; - -/* Class = "NSSegmentedCell"; 4as-1K-roV.ibShadowedLabels[3] = "About"; ObjectID = "4as-1K-roV"; */ -"4as-1K-roV.ibShadowedLabels[3]" = "关于"; - -/* Class = "NSMenuItem"; title = "Item 2"; ObjectID = "4up-mH-0Mb"; */ -"4up-mH-0Mb.title" = "Item 2"; - -/* Class = "NSMenuItem"; title = "Item2"; ObjectID = "5Iy-WS-PHG"; */ -"5Iy-WS-PHG.title" = "Item2"; - -/* Class = "NSButtonCell"; title = "Normalize"; ObjectID = "5TH-CS-wl6"; */ -"5TH-CS-wl6.title" = "标准化"; - -/* Class = "NSButtonCell"; title = "Invert X"; ObjectID = "5wf-7e-ekz"; */ -"5wf-7e-ekz.title" = "反转 X"; - -/* Class = "NSTabViewItem"; label = "Tweaking"; ObjectID = "6In-9m-Iqh"; */ -"6In-9m-Iqh.label" = "Tweaking"; - -/* Class = "NSButtonCell"; title = "Invert Y"; ObjectID = "6Kn-lQ-AaB"; */ -"6Kn-lQ-AaB.title" = "反转 Y"; - -/* Class = "NSButtonCell"; title = "Swap Sticks"; ObjectID = "7VQ-hw-19d"; */ -"7VQ-hw-19d.title" = "交换左右遥感"; - -/* Class = "NSButtonCell"; title = "Invert Y"; ObjectID = "8Vm-ce-hhc"; */ -"8Vm-ce-hhc.title" = "反转 Y"; - -/* Class = "NSButtonCell"; title = "Pretend to be an Xbox 360 Controller"; ObjectID = "8Yr-CF-I6K"; */ -"8Yr-CF-I6K.title" = "假装是一个Xbox 360控制器"; - -/* Class = "NSButtonCell"; title = "Invert Y"; ObjectID = "C6W-9e-zqx"; */ -"C6W-9e-zqx.title" = "反转 Y"; - -/* Class = "NSTableColumn"; headerCell.title = "Input"; ObjectID = "CU8-av-rwl"; */ -"CU8-av-rwl.headerCell.title" = "输入"; - -/* Class = "NSMenuItem"; title = "Item 3"; ObjectID = "Dr1-vW-fhR"; */ -"Dr1-vW-fhR.title" = "Item 3"; - -/* Class = "NSButtonCell"; title = "Linked"; ObjectID = "FRy-4y-nnb"; */ -"FRy-4y-nnb.title" = "绑定"; - -/* Class = "NSButtonCell"; title = "Enable Driver"; ObjectID = "FhM-1g-G1s"; */ -"FhM-1g-G1s.title" = "启用驱动"; - -/* Class = "NSMenuItem"; title = "Item1"; ObjectID = "Fqs-9N-l7A"; */ -"Fqs-9N-l7A.title" = "Item1"; - -/* Class = "NSMenuItem"; title = "Item3"; ObjectID = "GKV-5p-R8F"; */ -"GKV-5p-R8F.title" = "Item3"; - -/* Class = "NSBox"; title = "Spoofing Preferences"; ObjectID = "HND-46-X0K"; */ -"HND-46-X0K.title" = "欺骗首选项"; - -/* Class = "NSButtonCell"; title = "Invert X"; ObjectID = "I8N-Ll-Q29"; */ -"I8N-Ll-Q29.title" = "反转 X"; - -/* Class = "NSTextFieldCell"; title = "You can disable the driver temporarily so your Xbox device can be used in games that access the hardware directly.\n\nThis may be useful when playing some games ported by Aspyr if it supports your device.\n\nDue to some internal limitations, you need to connect your device once to be able to disable this."; ObjectID = "IRF-DH-74j"; */ -"IRF-DH-74j.title" = "您可以暂时禁用该驱动程序,以便您的Xbox设备可以在直接访问硬件的游戏中使用。\n\n当游玩由Aspyr移植的某些游戏时,如果它支持您的设备,这可能很有用。\n\n由于某些内部限制,您需要连接一次设备才能禁用此功能。"; - -/* Class = "NSMenuItem"; title = "Item2"; ObjectID = "J5j-fZ-9W4"; */ -"J5j-fZ-9W4.title" = "Item2"; - -/* Class = "NSMenuItem"; title = "Rumble"; ObjectID = "JAa-MJ-QBl"; */ -"JAa-MJ-QBl.title" = "Rumble"; - -/* Class = "NSButtonCell"; title = "Normalize"; ObjectID = "Nbf-a1-ZeT"; */ -"Nbf-a1-ZeT.title" = "标准化"; - -/* Class = "NSMenuItem"; title = "Item2"; ObjectID = "OZ9-jd-gMM"; */ -"OZ9-jd-gMM.title" = "Item2"; - -/* Class = "NSBox"; title = "Options"; ObjectID = "Q4L-nM-vW8"; */ -"Q4L-nM-vW8.title" = "选项"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "Qc5-fW-pcw"; */ -"Qc5-fW-pcw.title" = "OtherViews"; - -/* Class = "NSButtonCell"; title = "Uninstall..."; ObjectID = "QvN-mn-giT"; */ -"QvN-mn-giT.title" = "卸载..."; - -/* Class = "NSButtonCell"; title = "Invert Y"; ObjectID = "RFR-wA-1SW"; */ -"RFR-wA-1SW.title" = "反转 Y"; - -/* Class = "NSTabViewItem"; label = "About"; ObjectID = "SuI-sa-Ula"; */ -"SuI-sa-Ula.label" = "关于"; - -/* Class = "NSBox"; title = "Right Stick"; ObjectID = "TKg-sh-mjm"; */ -"TKg-sh-mjm.title" = "右摇杆"; - -/* Class = "NSButtonCell"; title = "Linked"; ObjectID = "Uce-Uv-Hq5"; */ -"Uce-Uv-Hq5.title" = "绑定"; - -/* Class = "NSTableColumn"; headerCell.title = "Binding"; ObjectID = "VVi-lm-klv"; */ -"VVi-lm-klv.headerCell.title" = "绑定"; - -/* Class = "NSBox"; title = "Left Stick"; ObjectID = "XdF-ba-S8X"; */ -"XdF-ba-S8X.title" = "左摇杆"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "Xzo-Df-CjB"; */ -"Xzo-Df-CjB.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "Item1"; ObjectID = "ZBC-oI-z5d"; */ -"ZBC-oI-z5d.title" = "Item1"; - -/* Class = "NSBox"; title = "Left Stick"; ObjectID = "ZlQ-UU-WB8"; */ -"ZlQ-UU-WB8.title" = "左摇杆"; - -/* Class = "NSButtonCell"; title = "Invert X"; ObjectID = "acH-i4-MwR"; */ -"acH-i4-MwR.title" = "反转 X"; - -/* Class = "NSBox"; title = "Right Stick"; ObjectID = "cqy-WX-TEQ"; */ -"cqy-WX-TEQ.title" = "右摇杆"; - -/* Class = "NSButtonCell"; title = "Invert X"; ObjectID = "elG-G6-ZET"; */ -"elG-G6-ZET.title" = "反转 X"; - -/* Class = "NSTextFieldCell"; title = "Rumble Options:"; ObjectID = "eqi-tt-Lwa"; */ -"eqi-tt-Lwa.title" = "Rumble Options:"; - -/* Class = "NSButtonCell"; title = "Reset Mapping"; ObjectID = "fLu-85-Jz7"; */ -"fLu-85-Jz7.title" = "重置映射"; - -/* Class = "NSTabViewItem"; label = "Advanced"; ObjectID = "fN4-Zi-Mei"; */ -"fN4-Zi-Mei.label" = "Advanced"; - -/* Class = "NSButtonCell"; title = "Linked"; ObjectID = "hyw-2p-8xu"; */ -"hyw-2p-8xu.title" = "绑定"; - -/* Class = "NSTextFieldCell"; title = "Click on this button to completely remove this driver from your computer (you may need to restart):"; ObjectID = "ix8-GT-Crq"; */ -"ix8-GT-Crq.title" = "单击此按钮可从计算机中完全删除此驱动程序(您可能需要重新启动):"; - -/* Class = "NSBox"; title = "Deadzones"; ObjectID = "k7f-mn-n3T"; */ -"k7f-mn-n3T.title" = "死区"; - -/* Class = "NSButtonCell"; title = "Linked"; ObjectID = "k9z-Ya-OO3"; */ -"k9z-Ya-OO3.title" = "绑定"; - -/* Class = "NSMenuItem"; title = "Item1"; ObjectID = "l7B-sk-a7S"; */ -"l7B-sk-a7S.title" = "Item1"; - -/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "mve-gU-Nz5"; */ -"mve-gU-Nz5.title" = "Text Cell"; - -/* Class = "NSTabViewItem"; label = "Controller test"; ObjectID = "nsf-fv-1ul"; */ -"nsf-fv-1ul.label" = "Controller test"; - -/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "qSp-FJ-2fV"; */ -"qSp-FJ-2fV.title" = "Text Cell"; - -/* Class = "NSMenu"; title = "OtherViews"; ObjectID = "rYq-DA-bYc"; */ -"rYq-DA-bYc.title" = "OtherViews"; - -/* Class = "NSMenuItem"; title = "Item3"; ObjectID = "xdj-AB-T4C"; */ -"xdj-AB-T4C.title" = "Item3"; - -/* Class = "NSMenuItem"; title = "Item3"; ObjectID = "yZ7-Jb-sd7"; */ -"yZ7-Jb-sd7.title" = "Item3"; - -/* Class = "NSButtonCell"; alternateTitle = "Cancel Remapping"; ObjectID = "zgp-Mz-PQL"; */ -"zgp-Mz-PQL.alternateTitle" = "取消重新映射"; - -/* Class = "NSButtonCell"; title = "Start Remapping"; ObjectID = "zgp-Mz-PQL"; */ -"zgp-Mz-PQL.title" = "开始重新映射"; - diff --git a/README.md b/README.md new file mode 100644 index 00000000..d6789a6a --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# XBox 360 Controller driver for Mac OS X +###This driver has moved to https://github.com/360Controller/360Controller. +###This repository remains here for reference, but is obsolete. diff --git a/Readme.md b/Readme.md deleted file mode 100644 index dd8c2a38..00000000 --- a/Readme.md +++ /dev/null @@ -1,220 +0,0 @@ -# Xbox Controller Driver for macOS - -## Table of Contents -1. [About](#about) -2. [Installation](#installation) -3. [Uninstallation](#uninstallation) -4. [Usage](#usage) -5. [My controller doesn't work!](#my-controller-doesnt-work) - 1. [I'm using a driver from the Tattiebogle website](#im-using-a-driver-from-the-tattiebogle-website) - 2. [My controller doesn't work with a game!](#my-controller-doesnt-work-with-a-game) - 3. [How do I find my Vendor ID and Product ID?](#how-do-i-find-my-vendor-id-and-product-id) - 4. [Original Xbox Controllers](#original-xbox-controllers) - 5. [Wired Xbox 360 Controllers](#wired-xbox-360-controllers) - 6. [Wireless Xbox 360 Controllers](#wireless-xbox-360-controllers) - 7. [Xbox One Controllers connected with USB](#xbox-one-controllers-connected-with-usb) - 8. [Xbox One Controllers connected with Wireless Adapter](#xbox-one-controllers-connected-with-wireless-adapter) - 9. [Xbox One Controllers connected with Bluetooth](#xbox-one-controllers-connected-with-bluetooth) - 10. [Xbox One Adaptive Controller](#xbox-one-adaptive-controller) -6. [Adding Third Party Controllers](#adding-third-party-controllers) -7. [Developer Info](#developer-info) - 1. [Building](#building) - 2. [Building the .pkg](#building-the-pkg) - 3. [Disabling signing requirements](#disabling-signing-requirements) - 4. [Re-Enabling signing requirements](#re-enabling-signing-requirements) - 5. [Debugging the driver](#debugging-the-driver) - 6. [Debugging the preference pane](#debugging-the-preference-pane) - 7. [A note on Unity mappings](#a-note-on-unity-mappings) -8. [Licence](#licence) - -## About - -**As of December 28, 2020, there are not plans to add Big Sur support, including Apple Silicon support. It will most likely not work on Big Sur.** - -This driver supports the Microsoft Xbox series of controllers including: - -1. Original Xbox - - Original Xbox controllers are supported by using a USB adapter. - -2. Xbox 360 - - Wired Xbox 360 controllers are supported directly. - - **As of macOS 10.11, Wireless Xbox 360 controller support causes kernel panics. This issue cannot be resolved with minor changes to the driver, and requires that the driver be re-written from scratch to resolve the issue. Due to an excess of caution, we have disabled Wireless Xbox 360 controller support as of 0.16.6. If you want to use a wireless controller, download 0.16.5 or earlier and disable the driver before the computer enters a "sleep" state in order to prevent kernel panics. Alternatively, you can revert to a macOS version before 10.11 to avoid this issue.** - -3. Xbox One - - Xbox One controllers are supported when connected with a micro USB cable. Using the controller with the Wireless Adapter is not currently supported. - - Bluetooth capable Xbox One controllers (released after August 2016) are natively supported by macOS without the use of this driver. However, installing this driver will allow you to use the controller via USB. - -The driver provides developers with access to both force feedback and the LEDs of the controllers. Additionally, a preference pane has been provided so that users can configure their controllers and ensure that the driver has been installed properly. - -Controller support includes ALL devices that work with an Xbox series piece of hardware. All wheels, fight sticks, and controllers should work. This includes things like the Xbox One Elite controller. If your hardware does not work with an Xbox console we cannot support it. Sorry. - -This project is a fork of the [Xbox360Controller project](http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller) originally created by Colin Munro. - -## Installation -See the [releases page](https://github.com/360Controller/360Controller/releases) for the latest compiled and signed version of the driver. Most users will want to run this installer. If you are using macOS 10.13.4 or later, then you will have to allow the signing certificate of "Drew Mills" in order for the software to run. Usually, the installer will prompt you to complete this process: -![System prompt: System Extension Blocked](https://imgur.com/zXM5JlU.png) -You can either click "Open Security Preferences" to quickly fix this. If you didn't see this prompt, you can navigate to the same window using the Apple menu in the top left hand corner of your screen, navigating the "System Preferences" and then clicking on "Security & Privacy." This will open up the following page. All you need to do is click the "Allow" button near the bottom right. -![Security & Privacy Preference Pane displaying prompt to user: System software from user "Drew Mills" was blocked from loading](https://imgur.com/HrL77Ii.png) -This prompt has been known to have issues with software or hardware that interferes with mouse movement. If you are using software that impacts the movement of your mouse, such as MagicKeys, or are using a special interface device, such as a Wacom tablet, please using a standard input device, such as a mouse, to click this button. This is a security feature of macOS and is out of our control. - -## Uninstallation -In order to uninstall the driver: navigate to the preference pane by opening your "System Preferences," navigating to the "Xbox 360 Controllers" pane, clicking on the "Advanced" tab and pressing the "Uninstall" button. This will prompt you to enter your password so that the uninstaller can remove all of the bundled software from your machine. - -## Usage -The driver exposes a standard game pad with a number of standard controls, so any game that supports gaming devices should work. In some cases, this may require an update from the developer of the game. The preference pane uses the standard macOS frameworks for accessing HID devices in addition to access of Force Feedback capabilities. This means that the preference pane is a good indicator that the driver is functional for other programs. - -It is important to note that this driver does not work, and can never work, with Apple's "Game Controller Framework." This GCController framework corresponds to physical gamepads that have been offically reviewed by Apple and accepted into the mFi program. Due to the fact that we are not Microsoft, we cannot get their gamepad certified to be a GCController. This is an unfortunate oversight on Apple's part. If you would like to discuss this, please do so at [this location.](https://github.com/360Controller/360Controller/issues/55) - -Users have been maintaining a [partial list of working and non-working games.](https://github.com/360Controller/360Controller/wiki/Games) Please contribute your findings so that you can help others debug their controller issues. - -## My controller doesn't work! - -### I'm using a driver from the Tattiebogle website -The Tattiebogle driver is NOT the same driver as this Github project. We do NOT support that driver. Under NO circumstances will we support that driver. If you download the latest version of this driver from the [releases page](https://github.com/360Controller/360Controller/releases) we will do our best to help you out. This driver will install over the Tattiebogle driver. You don't have to worry about uninstalling the Tattiebogle driver first. - -### My controller doesn't work with a game! -We cannot fix game specific issues. This driver does its absolute best to put out a standardized format for games to use. If they don't take advantage of that, there is **ABSOLUTELY NOTHING** we can do. The best we can do for you is give you the "Pretend to be an Xbox 360 Controller" option in the "Advanced" tab. This will make any wired Xbox 360 or wired Xbox One controller appear to games as if it were an official Microsoft Xbox 360 Controller. That way if the game is only looking for Xbox 360 controllers and isn't looking for other devices like third party Xbox 360 controllers or Xbox One controllers, you should be able to trick the game. If you experience an issue with a game that this toggle does not fix, we cannot help you, sorry. That is just the nature of drivers. - -### How do I find my Vendor ID and Product ID? -Navigate to the Apple menu at the top left corner of your screen. Select the `About This Mac` option. This will open a new window, where you need to select `System Report...` in the `Overview` tab. This will open another new window. On the left hand side of this window, there will be a number of options. Select `USB`. It will be somewhere near the bottom of the `Hardware` section. This will show you the USB device tree. Find and click on the entry that corresponds to your controller. This will provide you with the information needed at the bottom of the window. If you cannot find your device, make sure that all devices are properly connected to the computer. Try different cables if the controller still is not found. - -### Original Xbox Controllers -Make an issue describing your problem. - -### Wired Xbox 360 Controllers -Always check your controller with the preference pane found at: `Apple Menu -> System Preferences -> Xbox 360 Controllers` before creating an issue. If the controller works in this menu, then the driver is operating as intended. If your controller works with this menu, but not with a specific game, then read the [My controller doesn't work with a game!](#my-controller-doesnt-work-with-a-game) section. -If you have a third party controller, make an issue following the template with the "Product ID" and "Vendor ID" of the controller. Follow [How do I find my Vendor ID and Product ID?](#how-do-i-find-my-vendor-id-and-product-id) for instructions on how to find this information. - -### Wireless Xbox 360 Controllers -**As of macOS 10.11, Wireless Xbox 360 controller support causes kernel panics. This issue cannot be resolved with minor changes to the driver, and requires that the driver be re-written from scratch to resolve the issue. Due to an excess of caution, we have disabled Wireless Xbox 360 controller support as of 0.16.6. If you want to use a wireless controller, download 0.16.5 or earlier and disable the driver before the computer enters a "sleep" state in order to prevent kernel panics. Alternatively, you can revert to a macOS version before 10.11 to avoid this issue.** - -### Xbox One Controllers connected with USB -Always check your controller with the preference pane found at: `Apple Menu -> System Preferences -> Xbox 360 Controllers` before creating an issue. If the controller works in this menu, then the driver is operating as intended. If your controller works with this menu, but not with a specific game, then read the [My controller doesn't work with a game!](#my-controller-doesnt-work-with-a-game) section. -If your controller is recognized by the preference pane, but you aren't getting any response from button presses, this is likely due to an issue with macOS 10.11 and later. Apple changed some of the underlying USB code with this release and broke compatibility with some controllers. This is specifically found in controllers from PDP and PowerA. If you revert to macOS 10.10 or earlier, these controllers will work. -If the preference pane can't find your controller, make sure that it is listed in `Apple Menu -> About this Mac -> System Report -> Overview -> Hardware -> USB`. This menu should list a device called "Controller." If it isn't listed there, then you likely have a "charge" Micro USB cable instead of a "data" cable. If the cable isn't sending data, then you can't use the driver. Try a different cable. -If you have a third party controller, make an issue following the template with the "Product ID" and "Vendor ID" of the controller. Follow [How do I find my Vendor ID and Product ID?](#how-do-i-find-my-vendor-id-and-product-id) for instructions on how to find this information. -**At this time, PDP and PowerA controllers are unsupported by this driver as of macOS 10.11+ thanks to a rewrite of the macOS USB kernel. We cannot resolve this issue. It is a bug in Apple's core OS code.** - -### Xbox One Controllers connected with Wireless Adapter -Xbox One controllers connected with the Wireless Adapter are currently not supported. Please be patient as we figure out this complicated protocol. - -### Xbox One Controllers connected with Bluetooth -The Xbox One controller works with macOS automatically when connected over Bluetooth via System Preferences. Only specific Xbox One controllers released after August 2016 have Bluetooth capability. See [Microsoft's support page](https://support.xbox.com/en-US/xbox-on-windows/accessories/connect-and-troubleshoot-xbox-one-bluetooth-issues-windows-10) for determining if your controller supports Bluetooth. Due to the fact that this controller works by default, it will not be supported by this driver. If you choose to plug this controller in via USB, you will need this driver. If you do not wish to connect the controller via USB, then you do not need this driver. Any problems with game compatibility in Bluetooth mode are completely out of our control and are up to you to solve in conjunction with the game developer. - -### Xbox One Adaptive Controller -The Xbox One adaptive controller can connect to your macOS machine through either a Bluetooth or wired connection. In Bluetooth mode, it is not controlled by the driver in any way, and will not show up in the "Xbox 360 Controllers" preference pane. If you are having issues with a wired connection, where the preference pane is recognizing your controller, but isn't recieving inputs, please connect it to a PC or VM running Windows in order to recieve a crucial firmware update. This update may also be possible through an Xbox One console. - -## Adding Third Party Controllers -First, [disable signing requirements](#disabling-signing-requirements) so that you can run your custom build with your third party controller added. Then edit `360Controller/360Controller/Info.plist`. Add your controller following the pattern of pre-existing controllers by adding your vendor and product IDs to a new entry. After this, follow the information in the [building](#building) section, following the "If you don't have a signing certificate" path to build your new .kext. Then, place your shiny new `360Controller.kext` in to `/Library/Extensions` over the old one. You may need to take ownership of the driver in order for it to operate properly. You can do this with `sudo chown -R root:wheel /Library/Extensions/360Controller.kext`. Then, to make sure everything went according to plan, run `sudo kextutil /Library/Extensions/360Controller.kext`. This will load your kext into the OS and you should be able to use your controller. Once you reboot, your custom driver should be loaded automatically. - -## Developer Info -Drivers inherently modify the core operating system kernel. Using the driver as a developer can lead to dangerous kernel panics that can cause data loss or other permanent damage to your computer. Be very careful about how you use this information. We are not responsible for anything this driver does to your computer, or any loss it may incur. Normal users will never have to worry about the developer section of this README. - -### Building - -##### Apple has recently changed how drivers work in Xcode 7. In order to build the driver, you will need Xcode 6.4 or earlier. -Additionally, to use the included build scripts, you will need to change your preferred Xcode installation using `xcode-select`. - -##### You must have a signing certificate to install a locally built driver. Alternatively, you can disable driver signing on your machine, however this is a major security hole and the decision should not be taken lightly. - -You will need a full installation of Xcode to build this project. The command line tools are not enough. - -The project consists of three main parts: The driver (implemented in C++, as an I/O Kit C++ class), the force feedback plugin (implemented in C, as an I/O Kit COM plugin) and the preference pane (implemented in Objective C as a preference pane plugin). To build, use the standard Xcode build for Deployment on each of the 3 projects. Build Feedback360 before 360Controller, as the 360Controller project includes a script to copy the Feedback360 bundle to the correct place in the .kext to make it work. - -To debug the driver, `sudo cp -R 360Controller.kext /tmp/` to assign the correct properties - note that the Force Feedback plugin only seems to be found by OSX if the driver is in /System/Library/Extensions so it can only be debugged in place. Due to the fact that drivers are now stored in /Library/Extenions, this means that you must create a symlink between the location of the driver and /System/Library/Extensions so that the force feedback plugin can operate properly. - -### Building the .pkg - -In order to build the .pkg, you will need to install [Packages.app](http://s.sudre.free.fr/Software/Packages/about.html). - -#### If you don't have a signing certificate - -* Open `360 Driver.xcodeproj` using Xcode. -* Select the `360 Driver` project in the Navigator. -* Select the `360Daemon` target from the top right corner. -* Select the `Build Settings` tab from the top of the screen. -* In the `Code Signing` section, find `Code Signing Identity` section and expand it. -* In the `Release` section, change the selection to `Don't Code Sign`. -* Set the code signing identity for `360Daemon`, `Feedback360`, `360Controller`, `DriverTool`, `Pref360Control`, `Wireless360Controller`, `WirelessGamingReceiver` and `Whole Driver`. -* Run `./build.sh` to build the .pkg. This .pkg can be found in the `Install360Controller` directory. - -#### If you have a signing certificate - -* Create a file named `DeveloperSettings.xcconfig` -* Select the `360 Driver` project in the Navigator. -* In this file, add the following lines: - * `DEVELOPMENT_TEAM = XXXXXXXXXX` where `XXXXXXXXXX` is the development team on your Developer ID Application and Installer certificates. - * `DEVELOPER_NAME = First Last` where `First Last` is the name on the Developer ID Installer certificate. - * `DEVELOPER_EMAIL = my.address@email.com` where `my.address@email.com` is the email address of your Apple account that has your Developer ID Application and Installer certificates. - * `NOTARIZATION_PASSWORD = abcd-efgh-ijkl-mnop` where `abcd-efgh-ijkl-mnop` is a temporary password that you have generated for your Apple account for the purposes of notarization. - -### Disabling signing requirements - -Since Yosemite (macOS 10.10) all global kexts are required to be signed. This means if you want to build the drivers and install locally, you need a very specific signing certificate that Apple closely controls. If you want to disable the signing requirement from macOS, you will need to do several things. - -First, execute these commands in your terminal: -``` -sudo nvram boot-args="kext-dev-mode=1" -sudo kextcache -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions -``` - -Next, you must disable System Integrity Protection. To do this, boot into recovery mode by holding down `CMD + R` while the computer is starting. Once recovery mode has been loaded, open the terminal from the `Utilites` menu item. Execute the following command: -``` -csrutil disable -``` - -### Re-Enabling signing requirements - -From recovery mode, execute the following command: -``` -csrutil enable -``` - -Reboot into macOS like normal. You can reset the boot arguments by executing this command: -``` -sudo nvram -d boot-args -``` -This will remove ALL boot-args. If you have previously manipulated your boot-args, those changes will be erased as well! - -### Notarization of the driver - -This is only possible if you have a signing certificate, but it is a relatively straightforward process. - -* Build the driver as previously instructed and make sure to include the necessary information in your `DeveloperSettings.xcconfig` file, as they will be used during this process. -* Make sure to `cd` into the `Install360Controller` directory and run `./makedmg.sh` -* Run `./notarize.sh` -* This should finish with the message: `The validate action worked!` - -Then you can distribute the notarized and stapled version of the driver. - -### Debugging the driver - -Debugging the driver depends on which part you intend to debug. For the 360Controller driver itself, it uses `IOLog` to output to the `system.log` which can be accessed using Console.app. Feedback360 uses `fprintf(stderr, ...)`, which should appear within the console of the program attempting to use force feedback. - -### Debugging the preference pane - -Most of these instructions are pulled directly from [this blog post.](http://www.condition-alpha.com/blog/?p=1314) Please visit it for futher information. - -First, create a copy of `System Preferences.app` called `System Preferences (signed).app`. Then sign this new System Preferences with the command: - -```codesign -s "Developer ID Application: First Last (XXXXXXXXXX)" -f /Applications/System\ Preferences\ \(signed\).app/``` - -where `Developer ID Application: First Last (XXXXXXXXXX)` is the name of your Developer ID Application signing certificate. - -Edit your build scheme for Pref360Control, and select the "Run" scheme, and make sure you are editing "Debug" (A). In the environment variables section, click on "+" to add a new environment variable (B). Name the new variable OBJC_DISABLE_GC, and set its value to YES. - -Next, click the little disclosure triangle for the run scheme to reveal its detailed settings. Then select pre-actions. Click the "+" at the bottom to add a run script action. Enter /bin/sh as the shell, make sure that your target is selected to provide build settings, and type a shell command line to install the newly compiled pref pane in your personal Library folder: - -```cp -Rf ${CONFIGURATION_BUILD_DIR}/Pref360Control.prefPane ~/Library/PreferencePanes``` - -Finally, select the run step, choose "other" from the executable drop-down menu, and select `System Preferences (signed)` in the Applications folder. Verify that "Debug executable" and "Automatically" are both checked. - -### A note on Unity mappings - -The issues with the button and axis mappings in the Unity game engine are outside of our control. Unity mangles the button and axis values provided by the controller and remaps them to different values. There is absolutely no way that we can introduce a shim to fix it. Complaints about this should be directed at Unity, not at us. - -## Licence - -Copyright (C) 2006-2013 Colin Munro - -This driver is licensed under the GNU Public License. A copy of this license is included in the distribution file, please inspect it before using the binary or source. diff --git a/Readme.rtf b/Readme.rtf new file mode 100644 index 00000000..d59c4a4b --- /dev/null +++ b/Readme.rtf @@ -0,0 +1,86 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1} +{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2}} +{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}} +\paperw12240\paperh15840\margl1440\margr1440\vieww9000\viewh8400\viewkind0 +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural + +\f0\b\fs36 \cf0 XBox 360 Controller driver for Mac OS X +\b0\fs24 \ +Copyright (C) 2006-2013 Colin Munro\ +{\field{\*\fldinst{HYPERLINK "http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller"}}{\fldrslt http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller}}\ +\ + +\b About +\b0 \ +This driver supports the Microsoft Xbox 360 controller, including access to rumble motors and LEDs, on the Mac OS X platform. It includes a plugin for the Apple Force Feedback Framework so some games will be able to activate them, along with a Preference Pane with which allows you to test everything is installed correctly. Both wired 360 controllers connected via USB, and wireless 360 controllers connected via the Wireless Gaming Receiver for Windows, are supported.\ +\ + +\b Licence +\b0 \ +This driver is licensed under the GNU Public License. A copy of this license is included in the distribution file, please inspect it before using the binary or source.\ +\ + +\b Installation +\b0 \ +Simply complete the installer package to install the driver. The driver will recommend you restart - if you do not, the driver will only be usable if the controller is already connected or connected within a minute after the installer completes. If you are interested in installing as a developer please see below.\ +\ + +\b Usage +\b0 \ +The driver exposes a standard game pad with a number of standard controls, so any game that supports gaming devices should work. In some cases this may need an update from the manufacturer of the game or a patched version. The Preference Pane uses the standard Mac OS X Frameworks for accessing HID devices and accessing Force Feedback capabilities, so should be a good test that the installation is functional.\ +\ + +\b Known Problems/Todo +\b0 \ +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls1\ilvl0\cf0 {\listtext \'95 }The rumble motor test on the triggers of the Preference Pane bypasses the Force Feedback Framework functionality, so isn't actually testing it. It really should, for completeness (and it'd help adding support for more complex effects) - this test is now disabled in the normal release anyway\ +{\listtext \'95 }Force Feedback plugin may make effects run slower (e.g. longer time) than they should\ +{\listtext \'95 }Driver probably needs to be more resilient to errors and odd cases\ +{\listtext \'95 }Better Force Feedback "emulation"\ +{\listtext \'95 }Extra settings? E.g. trigger deadzones, control remapping.\ +{\listtext \'95 }Someone has requested old Xbox Controller support too.\ +\pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\pardirnatural +\ls2\ilvl0 +\b \cf0 \ +Contact me +\b0 \ +\pard\tx0\tx220\tx660\tx720\tx740\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural +\ls2\ilvl0\cf0 Please feel free to contact me with any comments, questions and so on using the form at the URL at the top of the file.\ +\ +\pard\tx0\tx220\tx660\tx720\tx740\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural +\ls2\ilvl0 +\b \cf0 Developer info +\b0 \ +Anything below this probably doesn't affect end users, so you can stop reading now if you just want to use the driver.\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural +\cf0 \ + +\b Building +\b0 \ +(This section does not yet discuss the source of the wireless drivers)\ +The distribution currently consists of 3 projects - one for the driver (implemented in C++, as an I/O Kit C++ class), one for the force feedback support plugin (implemented in C, as an I/O Kit COM plugin) and one for the Preference Pane (implemented in Objective C as a preference pane plugin). Ideally these 3 targets should be in the same project, but I've not worked on this yet.\ +\ +To build, use the standard Xcode build for Deployment on each of the 3 projects. Build Feedback360 before 360Controller, as the 360Controller project includes a script to copy the Feedback360 bundle to the correct place in the .kext to make it work.\ +\ +To debug the driver, sudo cp -R 360Controller.kext /tmp/ to assign the correct properties - note that the Force Feedback plugin only seems to be found by OSX if the driver is in /System/Library/Extensions so I could only debug it in place.\ +\ +To test the Preference Pane, just double-click the resulting file.\ +\ + +\b Debugging +\b0 \ +Most of the debugging I did was via printing out text. In 360Controller, you can use IOLog(), and the output will appear in system.log. In Feedback360 normal fprintf(stderr,...), and the output will appear on the console of whatever application is attempting to use Force Feedback. In Pref360Control NSLog() works as it's an Objective C program, and will output to the console of the Preferences application.\ +\ + +\b Installer +\b0 \ +Included is an installer project for Iceberg. Download Iceberg at {\field{\*\fldinst{HYPERLINK "http://s.sudre.free.fr/Software/Iceberg.html"}}{\fldrslt http://s.sudre.free.fr/Software/Iceberg.html}}\ +\ + +\b Other information +\b0 \ +I wrote the driver from scratch, using Apple documentation and drivers simply as a reference and not basing it upon any existing source. As such, some things may be done strangely or incorrectly, so excuse any weirdness. I've also tried to include comments to explain generally what's going on :)\ +} \ No newline at end of file diff --git a/Wireless360Controller/English.lproj/InfoPlist.strings b/Wireless360Controller/English.lproj/InfoPlist.strings index e15e7bbd..21684541 100644 Binary files a/Wireless360Controller/English.lproj/InfoPlist.strings and b/Wireless360Controller/English.lproj/InfoPlist.strings differ diff --git a/Wireless360Controller/IOKitDriver.pbproj/project.pbxproj b/Wireless360Controller/IOKitDriver.pbproj/project.pbxproj new file mode 100644 index 00000000..d24a1a05 --- /dev/null +++ b/Wireless360Controller/IOKitDriver.pbproj/project.pbxproj @@ -0,0 +1,311 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 39; + objects = { + 06AA1265FFB2107B11CA28AA = { + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + OPTIMIZATION_CFLAGS = "-O0"; + ZERO_LINK = YES; + }; + isa = PBXBuildStyle; + name = Development; + }; + 06AA1266FFB2107B11CA28AA = { + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + ZERO_LINK = NO; + }; + isa = PBXBuildStyle; + name = Deployment; + }; +//060 +//061 +//062 +//063 +//064 +//080 +//081 +//082 +//083 +//084 + 089C1669FE841209C02AAC07 = { + buildSettings = { + }; + buildStyles = ( + 06AA1265FFB2107B11CA28AA, + 06AA1266FFB2107B11CA28AA, + ); + hasScannedForEncodings = 1; + isa = PBXProject; + mainGroup = 089C166AFE841209C02AAC07; + projectDirPath = ""; + targets = ( + 32D94FC30562CBF700B6AF17, + ); + }; + 089C166AFE841209C02AAC07 = { + children = ( + 247142CAFF3F8F9811CA285C, + 8DA80CCF06AD972A00E5AC22, + 089C167CFE841241C02AAC07, + 19C28FB6FE9D52B211CA2CBB, + ); + isa = PBXGroup; + name = "«PROJECTNAME»"; + refType = 4; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 = { + children = ( + 32D94FCF0562CBF700B6AF17, + 089C167DFE841241C02AAC07, + ); + isa = PBXGroup; + name = Resources; + refType = 4; + sourceTree = ""; + }; + 089C167DFE841241C02AAC07 = { + children = ( + 089C167EFE841241C02AAC07, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + 089C167EFE841241C02AAC07 = { + fileEncoding = 10; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = English; + path = English.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; +//080 +//081 +//082 +//083 +//084 +//190 +//191 +//192 +//193 +//194 + 19C28FB6FE9D52B211CA2CBB = { + children = ( + 32D94FD00562CBF700B6AF17, + ); + isa = PBXGroup; + name = Products; + refType = 4; + sourceTree = ""; + }; +//190 +//191 +//192 +//193 +//194 +//1A0 +//1A1 +//1A2 +//1A3 +//1A4 + 1A224C3EFF42367911CA2CB7 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = file; + path = "«PROJECTNAMEASIDENTIFIER».h"; + refType = 4; + sourceTree = ""; + }; + 1A224C3FFF42367911CA2CB7 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = file; + path = "«PROJECTNAMEASIDENTIFIER».cpp"; + refType = 4; + sourceTree = ""; + }; +//1A0 +//1A1 +//1A2 +//1A3 +//1A4 +//240 +//241 +//242 +//243 +//244 + 247142CAFF3F8F9811CA285C = { + children = ( + 1A224C3EFF42367911CA2CB7, + 1A224C3FFF42367911CA2CB7, + ); + isa = PBXGroup; + name = Source; + path = ""; + refType = 4; + sourceTree = ""; + }; +//240 +//241 +//242 +//243 +//244 +//320 +//321 +//322 +//323 +//324 + 32D94FC30562CBF700B6AF17 = { + buildPhases = ( + 32D94FC40562CBF700B6AF17, + 32D94FC50562CBF700B6AF17, + 32D94FC70562CBF700B6AF17, + 32D94FC90562CBF700B6AF17, + 32D94FCB0562CBF700B6AF17, + 32D94FCC0562CBF700B6AF17, + 32D94FCD0562CBF700B6AF17, + ); + buildRules = ( + ); + buildSettings = { + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + MODULE_NAME = "com.yourcompany.driver.«PROJECTNAMEASIDENTIFIER»"; + MODULE_VERSION = 1.0.0d1; + PRODUCT_NAME = "«PROJECTNAME»"; + WRAPPER_EXTENSION = kext; + }; + dependencies = ( + ); + isa = PBXNativeTarget; + name = "«PROJECTNAME»"; + productInstallPath = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + productName = "«PROJECTNAME»"; + productReference = 32D94FD00562CBF700B6AF17; + productType = "com.apple.product-type.kernel-extension.iokit"; + }; + 32D94FC40562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXShellScriptBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "script=\"${SYSTEM_DEVELOPER_DIR}/ProjectBuilder Extras/Kernel Extension Support/KEXTPreprocess\";\nif [ -x \"$script\" ]; then\n . \"$script\"\nfi"; + }; + 32D94FC50562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + 32D94FC60562CBF700B6AF17, + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 32D94FC60562CBF700B6AF17 = { + fileRef = 1A224C3EFF42367911CA2CB7; + isa = PBXBuildFile; + settings = { + }; + }; + 32D94FC70562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + 32D94FC80562CBF700B6AF17, + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 32D94FC80562CBF700B6AF17 = { + fileRef = 089C167DFE841241C02AAC07; + isa = PBXBuildFile; + settings = { + }; + }; + 32D94FC90562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + 32D94FCA0562CBF700B6AF17, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 32D94FCA0562CBF700B6AF17 = { + fileRef = 1A224C3FFF42367911CA2CB7; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + ); + }; + }; + 32D94FCB0562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 32D94FCC0562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 32D94FCD0562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXShellScriptBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "script=\"${SYSTEM_DEVELOPER_DIR}/ProjectBuilder Extras/Kernel Extension Support/KEXTPostprocess\";\nif [ -x \"$script\" ]; then\n . \"$script\"\nfi"; + }; + 32D94FCF0562CBF700B6AF17 = { + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = Info.plist; + refType = 4; + sourceTree = ""; + }; + 32D94FD00562CBF700B6AF17 = { + explicitFileType = wrapper.cfbundle; + includeInIndex = 0; + isa = PBXFileReference; + path = "«PROJECTNAME».kext"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; +//320 +//321 +//322 +//323 +//324 +//8D0 +//8D1 +//8D2 +//8D3 +//8D4 + 8DA80CCF06AD972A00E5AC22 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = Kernel.framework; + path = /System/Library/Frameworks/Kernel.framework; + refType = 0; + sourceTree = ""; + }; + }; + rootObject = 089C1669FE841209C02AAC07; +} diff --git a/Wireless360Controller/Info.plist b/Wireless360Controller/Info.plist index 82b41461..1164471b 100644 --- a/Wireless360Controller/Info.plist +++ b/Wireless360Controller/Info.plist @@ -6,6 +6,8 @@ English CFBundleExecutable ${EXECUTABLE_NAME} + CFBundleIconFile + CFBundleIdentifier com.mice.driver.Wireless360Controller CFBundleInfoDictionaryVersion @@ -14,14 +16,10 @@ ${PRODUCT_NAME} CFBundlePackageType KEXT - CFBundleShortVersionString - $(CURRENT_PROJECT_VERSION) CFBundleSignature ???? CFBundleVersion - ${CURRENT_PROJECT_VERSION} - LSMinimumSystemVersion - ${MIN_MACOS_VERSION} + 1.0.0d12 IOKitPersonalities Wireless360Controller diff --git a/Wireless360Controller/Wireless360Controller.cpp b/Wireless360Controller/Wireless360Controller.cpp index 2577ce36..88d06712 100644 --- a/Wireless360Controller/Wireless360Controller.cpp +++ b/Wireless360Controller/Wireless360Controller.cpp @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + Wireless360Controller.cpp - main source of the standard wireless controller driver - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -26,15 +26,15 @@ #include "../360Controller/ControlStruct.h" #include "../360Controller/xbox360hid.h" -#define kDriverSettingKey "DeviceData" +#define kDriverSettingKey "DeviceData" OSDefineMetaClassAndStructors(Wireless360Controller, WirelessHIDDevice) #define super WirelessHIDDevice -static inline Xbox360_SShort getAbsolute(Xbox360_SShort value) +static inline XBox360_SShort getAbsolute(XBox360_SShort value) { - Xbox360_SShort reverse; - + XBox360_SShort reverse; + #ifdef __LITTLE_ENDIAN__ reverse=value; #elif __BIG_ENDIAN__ @@ -48,24 +48,14 @@ static inline Xbox360_SShort getAbsolute(Xbox360_SShort value) bool Wireless360Controller::init(OSDictionary *propTable) { bool res = super::init(propTable); - + // Default settings - invertLeftX = invertLeftY = false; - invertRightX = invertRightY = false; - deadzoneLeft = deadzoneRight = 0; - relativeLeft = relativeRight = false; + invertLeftX=invertLeftY=FALSE; + invertRightX=invertRightY=FALSE; + deadzoneLeft=deadzoneRight=0; + relativeLeft=relativeRight=FALSE; readSettings(); - // Bindings - noMapping = true; - for (int i = 0; i < 11; i++) - { - mapping[i] = i; - } - for (int i = 12; i < 16; i++) - { - mapping[i-1] = i; - } - + // Done return res; } @@ -73,286 +63,112 @@ bool Wireless360Controller::init(OSDictionary *propTable) // Read the settings from the registry void Wireless360Controller::readSettings(void) { + OSDictionary *dataDictionary; OSBoolean *value; OSNumber *number; - OSDictionary *dataDictionary = OSDynamicCast(OSDictionary, getProperty(kDriverSettingKey)); - + + dataDictionary=OSDynamicCast(OSDictionary,getProperty(kDriverSettingKey)); if(dataDictionary==NULL) return; - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("InvertLeftX")); - if (value != NULL) invertLeftX = value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("InvertLeftY")); - if (value != NULL) invertLeftY = value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("InvertRightX")); - if (value != NULL) invertRightX = value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("InvertRightY")); - if (value != NULL) invertRightY = value->getValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("DeadzoneLeft")); - if (number != NULL) deadzoneLeft = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("DeadzoneRight")); - if (number != NULL) deadzoneRight = number->unsigned32BitValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("RelativeLeft")); - if (value != NULL) relativeLeft = value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("RelativeRight")); - if (value != NULL) relativeRight=value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("DeadOffLeft")); - if (value != NULL) deadOffLeft = value->getValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("DeadOffRight")); - if (value != NULL) deadOffRight = value->getValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("RumbleType")); - if (number != NULL) rumbleType = number->unsigned8BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingUp")); - if (number != NULL) mapping[0] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingDown")); - if (number != NULL) mapping[1] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingLeft")); - if (number != NULL) mapping[2] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingRight")); - if (number != NULL) mapping[3] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingStart")); - if (number != NULL) mapping[4] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingBack")); - if (number != NULL) mapping[5] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingLSC")); - if (number != NULL) mapping[6] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingRSC")); - if (number != NULL) mapping[7] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingLB")); - if (number != NULL) mapping[8] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingRB")); - if (number != NULL) mapping[9] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingGuide")); - if (number != NULL) mapping[10] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingA")); - if (number != NULL) mapping[11] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingB")); - if (number != NULL) mapping[12] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingX")); - if (number != NULL) mapping[13] = number->unsigned32BitValue(); - number = OSDynamicCast(OSNumber, dataDictionary->getObject("BindingY")); - if (number != NULL) mapping[14] = number->unsigned32BitValue(); - value = OSDynamicCast(OSBoolean, dataDictionary->getObject("SwapSticks")); - if (value != NULL) swapSticks = value->getValue(); - - noMapping = true; - UInt8 normalMapping[15] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15 }; - for (int i = 0; i < 15; i++) - { - if (normalMapping[i] != mapping[i]) - { - noMapping = false; - break; - } - } -#if 0 + value=OSDynamicCast(OSBoolean,dataDictionary->getObject("InvertLeftX")); + if(value!=NULL) invertLeftX=value->getValue(); + value=OSDynamicCast(OSBoolean,dataDictionary->getObject("InvertLeftY")); + if(value!=NULL) invertLeftY=value->getValue(); + value=OSDynamicCast(OSBoolean,dataDictionary->getObject("InvertRightX")); + if(value!=NULL) invertRightX=value->getValue(); + value=OSDynamicCast(OSBoolean,dataDictionary->getObject("InvertRightY")); + if(value!=NULL) invertRightY=value->getValue(); + number=OSDynamicCast(OSNumber,dataDictionary->getObject("DeadzoneLeft")); + if(number!=NULL) deadzoneLeft=number->unsigned32BitValue(); + number=OSDynamicCast(OSNumber,dataDictionary->getObject("DeadzoneRight")); + if(number!=NULL) deadzoneRight=number->unsigned32BitValue(); + value=OSDynamicCast(OSBoolean,dataDictionary->getObject("RelativeLeft")); + if(value!=NULL) relativeLeft=value->getValue(); + value=OSDynamicCast(OSBoolean,dataDictionary->getObject("RelativeRight")); + if(value!=NULL) relativeRight=value->getValue(); + /* IOLog("Xbox360ControllerClass preferences loaded:\n invertLeft X: %s, Y: %s\n invertRight X: %s, Y:%s\n deadzone Left: %d, Right: %d\n\n", invertLeftX?"True":"False",invertLeftY?"True":"False", invertRightX?"True":"False",invertRightY?"True":"False", deadzoneLeft,deadzoneRight); -#endif + */ } // Adjusts the report for any settings specified by the user void Wireless360Controller::fiddleReport(unsigned char *data, int length) { - XBOX360_IN_REPORT *report=(XBOX360_IN_REPORT*)data; - if(invertLeftX) report->left.x=~report->left.x; - if(!invertLeftY) report->left.y=~report->left.y; - if(invertRightX) report->right.x=~report->right.x; - if(!invertRightY) report->right.y=~report->right.y; - if(deadzoneLeft!=0) { - if(relativeLeft) { - if((getAbsolute(report->left.x)left.y)left.x=0; - report->left.y=0; - } - else if(deadOffLeft) { - const UInt16 max16=32767; - float maxVal=max16-deadzoneLeft; - float valX=getAbsolute(report->left.x); - if (valX>deadzoneLeft) { - if (report->left.x<0) { - report->left.x=max16*(valX-deadzoneLeft)/maxVal; - report->left.x=~report->left.x; - } else { - report->left.x=max16*(valX-deadzoneLeft)/maxVal; - } - } else { - report->left.x=0; - } - float valY=getAbsolute(report->left.y); - if (valY>deadzoneLeft) { - if (report->left.y<0) { - report->left.y=max16*(valY-deadzoneLeft)/maxVal; - report->left.y=~report->left.y; - } else { - report->left.y=max16*(valY-deadzoneLeft)/maxVal; - } - } else { - report->left.y=0; - } - } - } else { - if(getAbsolute(report->left.x)left.x=0; - else if (deadOffLeft) - { - const UInt16 max16=32767; - float maxVal=max16-deadzoneLeft; - if (report->left.x<0) { - float valX=getAbsolute(report->left.x); - report->left.x=max16*(valX-deadzoneLeft)/maxVal; - report->left.x=~report->left.x; - } else { - float valX=getAbsolute(report->left.x); - report->left.x=max16*(valX-deadzoneLeft)/maxVal; - } - } - if(getAbsolute(report->left.y)left.y=0; - else if (deadOffLeft) + XBOX360_IN_REPORT *report = (XBOX360_IN_REPORT*)data; + + if (invertLeftX) + report->left.x = ~report->left.x; + if (!invertLeftY) + report->left.y = ~report->left.y; + if (invertRightX) + report->right.x = ~report->right.x; + if (!invertRightY) + report->right.y = ~report->right.y; + + if (deadzoneLeft != 0) + { + if (relativeLeft) + { + if ((getAbsolute(report->left.x) < deadzoneLeft) && (getAbsolute(report->left.y) < deadzoneLeft)) { - const UInt16 max16=32767; - float maxVal = max16-deadzoneLeft; - if (report->left.y<0) { - float valY=getAbsolute(report->left.y); - report->left.y=max16*(valY-deadzoneLeft)/maxVal; - report->left.y=~report->left.y; - } else { - float valY=getAbsolute(report->left.y); - report->left.y=max16*(valY-deadzoneLeft)/maxVal; - } + report->left.x = 0; + report->left.y = 0; } } + else + { + if (getAbsolute(report->left.x) < deadzoneLeft) + report->left.x = 0; + if (getAbsolute(report->left.y) < deadzoneLeft) + report->left.y = 0; + } } - if(deadzoneRight!=0) { - if(relativeRight) { - if((getAbsolute(report->right.x)right.y)right.x=0; - report->right.y=0; - } - else if(deadOffRight) { - const UInt16 max16=32767; - float maxVal=max16-deadzoneRight; - float valX=getAbsolute(report->right.x); - if (valX>deadzoneRight) { - if (report->right.x<0) { - report->right.x=max16*(valX-deadzoneRight)/maxVal; - report->right.x=~report->right.x; - } else { - report->right.x=max16*(valX-deadzoneRight)/maxVal; - } - } else { - report->right.x = 0; - } - float valY=getAbsolute(report->right.y); - if (valY>deadzoneRight) { - if (report->right.y<0) { - report->right.y=max16*(valY-deadzoneRight)/maxVal; - report->right.y=~report->right.y; - } else { - report->right.y=max16*(valY-deadzoneRight)/maxVal; - } - } else { - report->right.y = 0; - } - } - } else { - if(getAbsolute(report->right.x)right.x=0; - else if (deadOffRight) - { - const UInt16 max16=32767; - float maxVal=max16-deadzoneRight; - if (report->right.x<0) { - float valX=getAbsolute(report->right.x); - report->right.x=max16*(valX-deadzoneRight)/maxVal; - report->right.x=~report->right.x; - } else { - float valX=getAbsolute(report->right.x); - report->right.x=max16*(valX-deadzoneRight)/maxVal; - } - } - if(getAbsolute(report->right.y)right.y=0; - else if (deadOffRight) + if (deadzoneRight != 0) + { + if (relativeRight) + { + if ((getAbsolute(report->right.x) < deadzoneRight) && (getAbsolute(report->right.y) < deadzoneRight)) { - const UInt16 max16=32767; - float maxVal=max16-deadzoneRight; - if (report->right.y<0) { - float valY=getAbsolute(report->right.y); - report->right.y=max16*(valY-deadzoneRight)/maxVal; - report->right.y=~report->right.y; - } else { - float valY=getAbsolute(report->right.y); - report->right.y=max16*(valY-deadzoneRight)/maxVal; - } + report->right.x = 0; + report->right.y = 0; } } + else + { + if (getAbsolute(report->right.x) < deadzoneRight) + report->right.x = 0; + if (getAbsolute(report->right.y) < deadzoneRight) + report->right.y = 0; + } } } -void Wireless360Controller::remapButtons(void *buffer) -{ - XBOX360_IN_REPORT *report360 = (XBOX360_IN_REPORT*)buffer; - UInt16 new_buttons = 0; - - new_buttons |= ((report360->buttons & 1) == 1) << mapping[0]; - new_buttons |= ((report360->buttons & 2) == 2) << mapping[1]; - new_buttons |= ((report360->buttons & 4) == 4) << mapping[2]; - new_buttons |= ((report360->buttons & 8) == 8) << mapping[3]; - new_buttons |= ((report360->buttons & 16) == 16) << mapping[4]; - new_buttons |= ((report360->buttons & 32) == 32) << mapping[5]; - new_buttons |= ((report360->buttons & 64) == 64) << mapping[6]; - new_buttons |= ((report360->buttons & 128) == 128) << mapping[7]; - new_buttons |= ((report360->buttons & 256) == 256) << mapping[8]; - new_buttons |= ((report360->buttons & 512) == 512) << mapping[9]; - new_buttons |= ((report360->buttons & 1024) == 1024) << mapping[10]; - new_buttons |= ((report360->buttons & 4096) == 4096) << mapping[11]; - new_buttons |= ((report360->buttons & 8192) == 8192) << mapping[12]; - new_buttons |= ((report360->buttons & 16384) == 16384) << mapping[13]; - new_buttons |= ((report360->buttons & 32768) == 32768) << mapping[14]; - -// IOLog("BUTTON PACKET - %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n", mapping[0], mapping[1], mapping[2], mapping[3], mapping[4], mapping[5], mapping[6], mapping[7], mapping[8], mapping[9], mapping[10], mapping[11], mapping[12], mapping[13], mapping[14]); - - report360->buttons = new_buttons; -} - -void Wireless360Controller::remapAxes(void *buffer) -{ - XBOX360_IN_REPORT *report360 = (XBOX360_IN_REPORT*)buffer; - - XBOX360_HAT temp = report360->left; - report360->left = report360->right; - report360->right = temp; -} - void Wireless360Controller::receivedHIDupdate(unsigned char *data, int length) { fiddleReport(data, length); - if (!noMapping) - remapButtons(data); - if (swapSticks) - remapAxes(data); super::receivedHIDupdate(data, length); } void Wireless360Controller::SetRumbleMotors(unsigned char large, unsigned char small) { - unsigned char buf[] = {0x00, 0x01, 0x0f, 0xc0, 0x00, large, small, 0x00, 0x00, 0x00, 0x00, 0x00}; - WirelessDevice *device = OSDynamicCast(WirelessDevice, getProvider()); - + char buf[] = {0x00, 0x01, 0x0f, 0xc0, 0x00, large, small, 0x00, 0x00, 0x00, 0x00, 0x00}; + WirelessDevice *device; + + device = OSDynamicCast(WirelessDevice, getProvider()); if (device != NULL) device->SendPacket(buf, sizeof(buf)); } - + IOReturn Wireless360Controller::setReport(IOMemoryDescriptor *report, IOHIDReportType reportType, IOOptionBits options) { char data[2]; - - // IOLog("setReport(%p, %d, %d)\n", report, reportType, options); + +// IOLog("setReport(%p, %d, %d)\n", report, reportType, options); if (report->readBytes(0, data, 2) < 2) return kIOReturnUnsupported; - + // Rumble if (data[0] == 0x00) { @@ -362,14 +178,15 @@ IOReturn Wireless360Controller::setReport(IOMemoryDescriptor *report, IOHIDRepor SetRumbleMotors(data[0], data[1]); return kIOReturnSuccess; } - + return super::setReport(report, reportType, options); } IOReturn Wireless360Controller::newReportDescriptor(IOMemoryDescriptor ** descriptor ) const { - IOBufferMemoryDescriptor *buffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, kIODirectionOut, sizeof(ReportDescriptor)); - + IOBufferMemoryDescriptor *buffer; + + buffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, 0, sizeof(ReportDescriptor)); if (buffer == NULL) return kIOReturnNoResources; buffer->writeBytes(0, ReportDescriptor, sizeof(ReportDescriptor)); @@ -380,8 +197,9 @@ IOReturn Wireless360Controller::newReportDescriptor(IOMemoryDescriptor ** descri // Called by the userspace IORegistryEntrySetCFProperties function IOReturn Wireless360Controller::setProperties(OSObject *properties) { - OSDictionary *dictionary = OSDynamicCast(OSDictionary,properties); - + OSDictionary *dictionary; + + dictionary=OSDynamicCast(OSDictionary,properties); if(dictionary!=NULL) { setProperty(kDriverSettingKey,dictionary); readSettings(); @@ -427,3 +245,4 @@ OSNumber* Wireless360Controller::newVendorIDNumber() const { return OSNumber::withNumber((unsigned long long)0x45e, 16); } + diff --git a/Wireless360Controller/Wireless360Controller.h b/Wireless360Controller/Wireless360Controller.h index af38494e..cd2616d7 100644 --- a/Wireless360Controller/Wireless360Controller.h +++ b/Wireless360Controller/Wireless360Controller.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + Wireless360Controller.h - declaration of the wireless controller driver class - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -32,7 +32,7 @@ class Wireless360Controller : public WirelessHIDDevice bool init(OSDictionary *propTable = NULL); void SetRumbleMotors(unsigned char large, unsigned char small); - + IOReturn setReport(IOMemoryDescriptor *report, IOHIDReportType reportType, IOOptionBits options); IOReturn newReportDescriptor(IOMemoryDescriptor ** descriptor ) const; @@ -54,18 +54,8 @@ class Wireless360Controller : public WirelessHIDDevice bool invertRightX,invertRightY; short deadzoneLeft,deadzoneRight; bool relativeLeft,relativeRight; - bool deadOffLeft, deadOffRight; - - UInt8 rumbleType; - - bool swapSticks; - UInt8 mapping[15]; - bool noMapping = true; - private: void fiddleReport(unsigned char *data, int length); - void remapButtons(void *buffer); - void remapAxes(void *buffer); }; #endif // __WIRELESS360CONTROLLER_H__ diff --git a/Wireless360Controller/Wireless360Controller.xcodeproj/project.pbxproj b/Wireless360Controller/Wireless360Controller.xcodeproj/project.pbxproj new file mode 100644 index 00000000..4a3d9346 --- /dev/null +++ b/Wireless360Controller/Wireless360Controller.xcodeproj/project.pbxproj @@ -0,0 +1,259 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 32D94FC60562CBF700B6AF17 /* Wireless360Controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A224C3EFF42367911CA2CB7 /* Wireless360Controller.h */; }; + 32D94FC80562CBF700B6AF17 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; + 32D94FCA0562CBF700B6AF17 /* Wireless360Controller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A224C3FFF42367911CA2CB7 /* Wireless360Controller.cpp */; settings = {ATTRIBUTES = (); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1A224C3EFF42367911CA2CB7 /* Wireless360Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Wireless360Controller.h; sourceTree = ""; }; + 1A224C3FFF42367911CA2CB7 /* Wireless360Controller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Wireless360Controller.cpp; sourceTree = ""; }; + 32D94FCF0562CBF700B6AF17 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 32D94FD00562CBF700B6AF17 /* Wireless360Controller.kext */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Wireless360Controller.kext; sourceTree = BUILT_PRODUCTS_DIR; }; + 8DA8362C06AD9B9200E5AC22 /* Kernel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kernel.framework; path = /System/Library/Frameworks/Kernel.framework; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 32D94FCB0562CBF700B6AF17 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* Wireless360Controller */ = { + isa = PBXGroup; + children = ( + 247142CAFF3F8F9811CA285C /* Source */, + 8DA8362C06AD9B9200E5AC22 /* Kernel.framework */, + 089C167CFE841241C02AAC07 /* Resources */, + 19C28FB6FE9D52B211CA2CBB /* Products */, + ); + name = Wireless360Controller; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 32D94FCF0562CBF700B6AF17 /* Info.plist */, + 089C167DFE841241C02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 19C28FB6FE9D52B211CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 32D94FD00562CBF700B6AF17 /* Wireless360Controller.kext */, + ); + name = Products; + sourceTree = ""; + }; + 247142CAFF3F8F9811CA285C /* Source */ = { + isa = PBXGroup; + children = ( + 1A224C3EFF42367911CA2CB7 /* Wireless360Controller.h */, + 1A224C3FFF42367911CA2CB7 /* Wireless360Controller.cpp */, + ); + name = Source; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 32D94FC50562CBF700B6AF17 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 32D94FC60562CBF700B6AF17 /* Wireless360Controller.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 32D94FC30562CBF700B6AF17 /* Wireless360Controller */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB91D908733DB10010E9CD /* Build configuration list for PBXNativeTarget "Wireless360Controller" */; + buildPhases = ( + 32D94FC50562CBF700B6AF17 /* Headers */, + 32D94FC70562CBF700B6AF17 /* Resources */, + 32D94FC90562CBF700B6AF17 /* Sources */, + 32D94FCB0562CBF700B6AF17 /* Frameworks */, + 32D94FCC0562CBF700B6AF17 /* Rez */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Wireless360Controller; + productInstallPath = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + productName = Wireless360Controller; + productReference = 32D94FD00562CBF700B6AF17 /* Wireless360Controller.kext */; + productType = "com.apple.product-type.kernel-extension.iokit"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB91DD08733DB10010E9CD /* Build configuration list for PBXProject "Wireless360Controller" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 089C166AFE841209C02AAC07 /* Wireless360Controller */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 32D94FC30562CBF700B6AF17 /* Wireless360Controller */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 32D94FC70562CBF700B6AF17 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 32D94FC80562CBF700B6AF17 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 32D94FCC0562CBF700B6AF17 /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 32D94FC90562CBF700B6AF17 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 32D94FCA0562CBF700B6AF17 /* Wireless360Controller.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 1DEB91DA08733DB10010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1.0.0d12; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + MODULE_NAME = com.mice.driver.Wireless360Controller; + MODULE_VERSION = 1.0.0d11; + PRODUCT_NAME = Wireless360Controller; + WRAPPER_EXTENSION = kext; + ZERO_LINK = YES; + }; + name = Debug; + }; + 1DEB91DB08733DB10010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CURRENT_PROJECT_VERSION = 1.0.0d12; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + MODULE_NAME = com.mice.driver.Wireless360Controller; + MODULE_VERSION = 1.0.0d11; + PRODUCT_NAME = Wireless360Controller; + WRAPPER_EXTENSION = kext; + }; + name = Release; + }; + 1DEB91DE08733DB10010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Debug; + }; + 1DEB91DF08733DB10010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + PROVISIONING_PROFILE = ""; + SDKROOT = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB91D908733DB10010E9CD /* Build configuration list for PBXNativeTarget "Wireless360Controller" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB91DA08733DB10010E9CD /* Debug */, + 1DEB91DB08733DB10010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB91DD08733DB10010E9CD /* Build configuration list for PBXProject "Wireless360Controller" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB91DE08733DB10010E9CD /* Debug */, + 1DEB91DF08733DB10010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/Wireless360Controller/version.plist b/Wireless360Controller/version.plist new file mode 100644 index 00000000..53bf3a3f --- /dev/null +++ b/Wireless360Controller/version.plist @@ -0,0 +1,16 @@ + + + + + BuildVersion + 12 + CFBundleVersion + 1.0 + ProductBuildVersion + 7K571 + ProjectName + DevToolsWizardTemplates + SourceVersion + 3870000 + + diff --git a/Wireless360Controller/zh-Hans.lproj/InfoPlist.strings b/Wireless360Controller/zh-Hans.lproj/InfoPlist.strings deleted file mode 100644 index e15e7bbd..00000000 --- a/Wireless360Controller/zh-Hans.lproj/InfoPlist.strings +++ /dev/null @@ -1,3 +0,0 @@ -/* Localized versions of Info.plist keys */ - -NSHumanReadableCopyright = "© Colin Munro, 2007-13"; diff --git a/WirelessGamingReceiver/English.lproj/InfoPlist.strings b/WirelessGamingReceiver/English.lproj/InfoPlist.strings index e85e4cf7..f180ed5a 100644 --- a/WirelessGamingReceiver/English.lproj/InfoPlist.strings +++ b/WirelessGamingReceiver/English.lproj/InfoPlist.strings @@ -1,3 +1,3 @@ /* Localized versions of Info.plist keys */ -NSHumanReadableCopyright = "© Colin Munro, 2007-11"; +NSHumanReadableCopyright = "© Colin Munro, 2007-11"; \ No newline at end of file diff --git a/WirelessGamingReceiver/IOKitDriver.pbproj/project.pbxproj b/WirelessGamingReceiver/IOKitDriver.pbproj/project.pbxproj new file mode 100644 index 00000000..d24a1a05 --- /dev/null +++ b/WirelessGamingReceiver/IOKitDriver.pbproj/project.pbxproj @@ -0,0 +1,311 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 39; + objects = { + 06AA1265FFB2107B11CA28AA = { + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + OPTIMIZATION_CFLAGS = "-O0"; + ZERO_LINK = YES; + }; + isa = PBXBuildStyle; + name = Development; + }; + 06AA1266FFB2107B11CA28AA = { + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + ZERO_LINK = NO; + }; + isa = PBXBuildStyle; + name = Deployment; + }; +//060 +//061 +//062 +//063 +//064 +//080 +//081 +//082 +//083 +//084 + 089C1669FE841209C02AAC07 = { + buildSettings = { + }; + buildStyles = ( + 06AA1265FFB2107B11CA28AA, + 06AA1266FFB2107B11CA28AA, + ); + hasScannedForEncodings = 1; + isa = PBXProject; + mainGroup = 089C166AFE841209C02AAC07; + projectDirPath = ""; + targets = ( + 32D94FC30562CBF700B6AF17, + ); + }; + 089C166AFE841209C02AAC07 = { + children = ( + 247142CAFF3F8F9811CA285C, + 8DA80CCF06AD972A00E5AC22, + 089C167CFE841241C02AAC07, + 19C28FB6FE9D52B211CA2CBB, + ); + isa = PBXGroup; + name = "«PROJECTNAME»"; + refType = 4; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 = { + children = ( + 32D94FCF0562CBF700B6AF17, + 089C167DFE841241C02AAC07, + ); + isa = PBXGroup; + name = Resources; + refType = 4; + sourceTree = ""; + }; + 089C167DFE841241C02AAC07 = { + children = ( + 089C167EFE841241C02AAC07, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + 089C167EFE841241C02AAC07 = { + fileEncoding = 10; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = English; + path = English.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; +//080 +//081 +//082 +//083 +//084 +//190 +//191 +//192 +//193 +//194 + 19C28FB6FE9D52B211CA2CBB = { + children = ( + 32D94FD00562CBF700B6AF17, + ); + isa = PBXGroup; + name = Products; + refType = 4; + sourceTree = ""; + }; +//190 +//191 +//192 +//193 +//194 +//1A0 +//1A1 +//1A2 +//1A3 +//1A4 + 1A224C3EFF42367911CA2CB7 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = file; + path = "«PROJECTNAMEASIDENTIFIER».h"; + refType = 4; + sourceTree = ""; + }; + 1A224C3FFF42367911CA2CB7 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = file; + path = "«PROJECTNAMEASIDENTIFIER».cpp"; + refType = 4; + sourceTree = ""; + }; +//1A0 +//1A1 +//1A2 +//1A3 +//1A4 +//240 +//241 +//242 +//243 +//244 + 247142CAFF3F8F9811CA285C = { + children = ( + 1A224C3EFF42367911CA2CB7, + 1A224C3FFF42367911CA2CB7, + ); + isa = PBXGroup; + name = Source; + path = ""; + refType = 4; + sourceTree = ""; + }; +//240 +//241 +//242 +//243 +//244 +//320 +//321 +//322 +//323 +//324 + 32D94FC30562CBF700B6AF17 = { + buildPhases = ( + 32D94FC40562CBF700B6AF17, + 32D94FC50562CBF700B6AF17, + 32D94FC70562CBF700B6AF17, + 32D94FC90562CBF700B6AF17, + 32D94FCB0562CBF700B6AF17, + 32D94FCC0562CBF700B6AF17, + 32D94FCD0562CBF700B6AF17, + ); + buildRules = ( + ); + buildSettings = { + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + MODULE_NAME = "com.yourcompany.driver.«PROJECTNAMEASIDENTIFIER»"; + MODULE_VERSION = 1.0.0d1; + PRODUCT_NAME = "«PROJECTNAME»"; + WRAPPER_EXTENSION = kext; + }; + dependencies = ( + ); + isa = PBXNativeTarget; + name = "«PROJECTNAME»"; + productInstallPath = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + productName = "«PROJECTNAME»"; + productReference = 32D94FD00562CBF700B6AF17; + productType = "com.apple.product-type.kernel-extension.iokit"; + }; + 32D94FC40562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXShellScriptBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "script=\"${SYSTEM_DEVELOPER_DIR}/ProjectBuilder Extras/Kernel Extension Support/KEXTPreprocess\";\nif [ -x \"$script\" ]; then\n . \"$script\"\nfi"; + }; + 32D94FC50562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + 32D94FC60562CBF700B6AF17, + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 32D94FC60562CBF700B6AF17 = { + fileRef = 1A224C3EFF42367911CA2CB7; + isa = PBXBuildFile; + settings = { + }; + }; + 32D94FC70562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + 32D94FC80562CBF700B6AF17, + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 32D94FC80562CBF700B6AF17 = { + fileRef = 089C167DFE841241C02AAC07; + isa = PBXBuildFile; + settings = { + }; + }; + 32D94FC90562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + 32D94FCA0562CBF700B6AF17, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 32D94FCA0562CBF700B6AF17 = { + fileRef = 1A224C3FFF42367911CA2CB7; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + ); + }; + }; + 32D94FCB0562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 32D94FCC0562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 32D94FCD0562CBF700B6AF17 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXShellScriptBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "script=\"${SYSTEM_DEVELOPER_DIR}/ProjectBuilder Extras/Kernel Extension Support/KEXTPostprocess\";\nif [ -x \"$script\" ]; then\n . \"$script\"\nfi"; + }; + 32D94FCF0562CBF700B6AF17 = { + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = Info.plist; + refType = 4; + sourceTree = ""; + }; + 32D94FD00562CBF700B6AF17 = { + explicitFileType = wrapper.cfbundle; + includeInIndex = 0; + isa = PBXFileReference; + path = "«PROJECTNAME».kext"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; +//320 +//321 +//322 +//323 +//324 +//8D0 +//8D1 +//8D2 +//8D3 +//8D4 + 8DA80CCF06AD972A00E5AC22 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = Kernel.framework; + path = /System/Library/Frameworks/Kernel.framework; + refType = 0; + sourceTree = ""; + }; + }; + rootObject = 089C1669FE841209C02AAC07; +} diff --git a/WirelessGamingReceiver/Info.plist b/WirelessGamingReceiver/Info.plist index a94ffe96..819f678f 100644 --- a/WirelessGamingReceiver/Info.plist +++ b/WirelessGamingReceiver/Info.plist @@ -6,6 +6,8 @@ English CFBundleExecutable ${EXECUTABLE_NAME} + CFBundleIconFile + CFBundleIdentifier com.mice.driver.WirelessGamingReceiver CFBundleInfoDictionaryVersion @@ -14,60 +16,41 @@ ${PRODUCT_NAME} CFBundlePackageType KEXT - CFBundleShortVersionString - $(CURRENT_PROJECT_VERSION) CFBundleSignature ???? CFBundleVersion - ${CURRENT_PROJECT_VERSION} - LSMinimumSystemVersion - ${MIN_MACOS_VERSION} + 1.0.0d12 IOKitPersonalities WirelessGamingReceiverForWindows CFBundleIdentifier com.mice.driver.WirelessGamingReceiver + idProduct + 1817 + idVendor + 1118 IOClass WirelessGamingReceiver IOKitDebug 65535 IOProviderClass IOUSBDevice - idProduct - 1817 - idVendor - 1118 WirelessGamingReceiverForWindowsAlternate CFBundleIdentifier com.mice.driver.WirelessGamingReceiver - IOClass - WirelessGamingReceiver - IOKitDebug - 65535 - IOProviderClass - IOUSBDevice idProduct 657 idVendor 1118 - - WirelessGamingReceiverForWindowsAlternateAlternate - - CFBundleIdentifier - com.mice.driver.WirelessGamingReceiver IOClass WirelessGamingReceiver IOKitDebug 65535 IOProviderClass IOUSBDevice - idProduct - 681 - idVendor - 1118 OSBundleCompatibleVersion diff --git a/WirelessGamingReceiver/WirelessDevice.cpp b/WirelessGamingReceiver/WirelessDevice.cpp index 0a3790f9..ddad5101 100644 --- a/WirelessGamingReceiver/WirelessDevice.cpp +++ b/WirelessGamingReceiver/WirelessDevice.cpp @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + WirelessDevice.cpp - generic Wireless 360 device driver - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -97,7 +97,7 @@ OSNumber* WirelessDevice::newLocationIDNumber() const { OSNumber *owner; UInt32 location = 0; - + if (index == -1) return NULL; WirelessGamingReceiver *receiver = OSDynamicCast(WirelessGamingReceiver, getProvider()); diff --git a/WirelessGamingReceiver/WirelessDevice.h b/WirelessGamingReceiver/WirelessDevice.h index 348114f0..83dee634 100644 --- a/WirelessGamingReceiver/WirelessDevice.h +++ b/WirelessGamingReceiver/WirelessDevice.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + WirelessDevice.h - declaration of the base wireless 360 device driver class - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -32,24 +32,23 @@ typedef void (*WirelessDeviceWatcher)(void *target, WirelessDevice *sender, void class WirelessDevice : public IOService { OSDeclareDefaultStructors(WirelessDevice); - public: bool init(OSDictionary *dictionary = 0); // Controller interface bool IsDataAvailable(void); IOMemoryDescriptor* NextPacket(void); - + void SendPacket(const void *data, size_t length); - + void RegisterWatcher(void *target, WirelessDeviceWatcher function, void *parameter); OSNumber* newLocationIDNumber() const; - private: friend class WirelessGamingReceiver; void SetIndex(int i); void NewData(void); +private: int index; // callback void *target, *parameter; diff --git a/WirelessGamingReceiver/WirelessGamingReceiver.cpp b/WirelessGamingReceiver/WirelessGamingReceiver.cpp index 4ed9b001..188745b9 100644 --- a/WirelessGamingReceiver/WirelessGamingReceiver.cpp +++ b/WirelessGamingReceiver/WirelessGamingReceiver.cpp @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + WirelessGamingReceiver.cpp - main source of the wireless receiver driver - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -29,18 +29,20 @@ OSDefineMetaClassAndStructors(WirelessGamingReceiver, IOService) // Holds data for asynchronous reads -typedef struct WGRREAD +typedef struct { int index; IOBufferMemoryDescriptor *buffer; -} WGRREAD; +} +WGRREAD; // Get maximum packet size for a pipe static UInt32 GetMaxPacketSize(IOUSBPipe *pipe) { - const IOUSBEndpointDescriptor *ed = pipe->GetEndpointDescriptor(); - - if (ed == NULL) return 0; + const IOUSBEndpointDescriptor *ed; + + ed=pipe->GetEndpointDescriptor(); + if(ed==NULL) return 0; else return ed->wMaxPacketSize; } @@ -52,17 +54,17 @@ bool WirelessGamingReceiver::start(IOService *provider) IOUSBFindEndpointRequest pipeRequest; IOUSBInterface *interface; int iConnection, iOther, i; - + if (!IOService::start(provider)) { - // IOLog("start - superclass failed\n"); +// IOLog("start - superclass failed\n"); return false; } device = OSDynamicCast(IOUSBDevice, provider); if (device == NULL) { - // IOLog("start - invalid provider\n"); +// IOLog("start - invalid provider\n"); goto fail; } @@ -70,31 +72,31 @@ bool WirelessGamingReceiver::start(IOService *provider) if (device->GetNumConfigurations() < 1) { device = NULL; - // IOLog("start - device has no configurations!\n"); +// IOLog("start - device has no configurations!\n"); goto fail; } - + // Set configuration cd = device->GetFullConfigurationDescriptor(0); if (cd == NULL) { device = NULL; - // IOLog("start - couldn't get configuration descriptor\n"); +// IOLog("start - couldn't get configuration descriptor\n"); goto fail; } - + if (!device->open(this)) { device = NULL; - // IOLog("start - failed to open device\n"); +// IOLog("start - failed to open device\n"); goto fail; } if (device->SetConfiguration(this, cd->bConfigurationValue, true) != kIOReturnSuccess) { - // IOLog("start - unable to set configuration\n"); +// IOLog("start - unable to set configuration\n"); goto fail; } - + for (i = 0; i < WIRELESS_CONNECTIONS; i++) { connections[i].controller = NULL; @@ -107,7 +109,7 @@ bool WirelessGamingReceiver::start(IOService *provider) connections[i].service = NULL; connections[i].controllerStarted = false; } - + pipeRequest.interval = 0; pipeRequest.maxPacketSize = 0; pipeRequest.type = kUSBInterrupt; @@ -120,12 +122,12 @@ bool WirelessGamingReceiver::start(IOService *provider) iOther = 0; while ((interface = device->FindNextInterface(interface, &interfaceRequest)) != NULL) { - switch (interface->GetInterfaceProtocol()) + switch(interface->GetInterfaceProtocol()) { case 129: // Controller if (!interface->open(this)) { - // IOLog("start: Failed to open control interface\n"); +// IOLog("start: Failed to open control interface\n"); goto fail; } connections[iConnection].controller = interface; @@ -133,7 +135,7 @@ bool WirelessGamingReceiver::start(IOService *provider) connections[iConnection].controllerIn = interface->FindNextPipe(NULL, &pipeRequest); if (connections[iConnection].controllerIn == NULL) { - // IOLog("start: Failed to open control input pipe\n"); +// IOLog("start: Failed to open control input pipe\n"); goto fail; } else @@ -142,18 +144,17 @@ bool WirelessGamingReceiver::start(IOService *provider) connections[iConnection].controllerOut = interface->FindNextPipe(NULL, &pipeRequest); if (connections[iConnection].controllerOut == NULL) { - // IOLog("start: Failed to open control output pipe\n"); +// IOLog("start: Failed to open control output pipe\n"); goto fail; } else connections[iConnection].controllerOut->retain(); iConnection++; break; - case 130: // It is a mystery if (!interface->open(this)) { - // IOLog("start: Failed to open mystery interface\n"); +// IOLog("start: Failed to open mystery interface\n"); goto fail; } connections[iOther].other = interface; @@ -161,7 +162,7 @@ bool WirelessGamingReceiver::start(IOService *provider) connections[iOther].otherIn = interface->FindNextPipe(NULL, &pipeRequest); if (connections[iOther].otherIn == NULL) { - // IOLog("start: Failed to open mystery input pipe\n"); +// IOLog("start: Failed to open mystery input pipe\n"); goto fail; } else @@ -170,42 +171,41 @@ bool WirelessGamingReceiver::start(IOService *provider) connections[iOther].otherOut = interface->FindNextPipe(NULL, &pipeRequest); if (connections[iOther].otherOut == NULL) { - // IOLog("start: Failed to open mystery output pipe\n"); +// IOLog("start: Failed to open mystery output pipe\n"); goto fail; } else connections[iOther].otherOut->retain(); iOther++; break; - default: - // IOLog("start: Ignoring interface (protocol %d)\n", interface->GetInterfaceProtocol()); +// IOLog("start: Ignoring interface (protocol %d)\n", interface->GetInterfaceProtocol()); break; } } - + if (iConnection != iOther) IOLog("start - interface mismatch?\n"); connectionCount = iConnection; - + for (i = 0; i < connectionCount; i++) { connections[i].inputArray = OSArray::withCapacity(5); if (connections[i].inputArray == NULL) { - // IOLog("start: Failed to allocate packet buffer %d\n", i); +// IOLog("start: Failed to allocate packet buffer %d\n", i); goto fail; } if (!QueueRead(i)) { - // IOLog("start: Failed to start read %d\n", i); +// IOLog("start: Failed to start read %d\n", i); goto fail; } } - - // IOLog("start: Transform and roll out (%d interfaces)\n", connectionCount); + +// IOLog("start: Transform and roll out (%d interfaces)\n", connectionCount); return true; - + fail: ReleaseAll(); return false; @@ -218,31 +218,20 @@ void WirelessGamingReceiver::stop(IOService *provider) IOService::stop(provider); } -// Handle termination -bool WirelessGamingReceiver::didTerminate(IOService *provider, IOOptionBits options, bool *defer) -{ - // release all objects used and close the device - ReleaseAll(); - return IOService::didTerminate(provider, options, defer); -} - - // Handle message from provider IOReturn WirelessGamingReceiver::message(UInt32 type,IOService *provider,void *argument) { - // IOLog("Message\n"); -#if 0 +// IOLog("Message\n"); +/* switch(type) { case kIOMessageServiceIsTerminated: case kIOMessageServiceIsRequestingClose: if(device->isOpen(this)) ReleaseAll(); return kIOReturnSuccess; default: + */ return IOService::message(type,provider,argument); - } -#else - return IOService::message(type,provider,argument); -#endif +// } } // Queue a read on a controller @@ -250,12 +239,13 @@ bool WirelessGamingReceiver::QueueRead(int index) { IOUSBCompletion complete; IOReturn err; - WGRREAD *data = (WGRREAD*)IOMalloc(sizeof(WGRREAD)); - + WGRREAD *data; + + data = (WGRREAD*)IOMalloc(sizeof(WGRREAD)); if (data == NULL) return false; data->index = index; - data->buffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, kIODirectionIn, GetMaxPacketSize(connections[index].controllerIn)); + data->buffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, 0, GetMaxPacketSize(connections[index].controllerIn)); if (data->buffer == NULL) { IOFree(data, sizeof(WGRREAD)); @@ -265,15 +255,15 @@ bool WirelessGamingReceiver::QueueRead(int index) complete.target = this; complete.action = _ReadComplete; complete.parameter = data; - + err = connections[index].controllerIn->Read(data->buffer, 0, 0, data->buffer->getLength(), &complete); if (err == kIOReturnSuccess) return true; - + data->buffer->release(); IOFree(data, sizeof(WGRREAD)); - - // IOLog("read - failed to start (0x%.8x)\n", err); + +// IOLog("read - failed to start (0x%.8x)\n", err); return false; } @@ -282,29 +272,28 @@ void WirelessGamingReceiver::ReadComplete(void *parameter, IOReturn status, UInt { WGRREAD *data = (WGRREAD*)parameter; bool reread = true; - + switch (status) { case kIOReturnOverrun: - // IOLog("read - kIOReturnOverrun, clearing stall\n"); +// IOLog("read - kIOReturnOverrun, clearing stall\n"); connections[data->index].controllerIn->ClearStall(); // fall through case kIOReturnSuccess: ProcessMessage(data->index, (unsigned char*)data->buffer->getBytesNoCopy(), (int)data->buffer->getLength() - bufferSizeRemaining); break; - case kIOReturnNotResponding: - // IOLog("read - kIOReturnNotResponding\n"); +// IOLog("read - kIOReturnNotResponding\n"); // fall through default: reread = false; break; } - + int newIndex = data->index; data->buffer->release(); IOFree(data, sizeof(WGRREAD)); - + if (reread) QueueRead(newIndex); } @@ -315,25 +304,25 @@ bool WirelessGamingReceiver::QueueWrite(int index, const void *bytes, UInt32 len IOBufferMemoryDescriptor *outBuffer; IOUSBCompletion complete; IOReturn err; - - outBuffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, kIODirectionOut, length); + + outBuffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, 0, length); if (outBuffer == NULL) { - // IOLog("send - unable to allocate buffer\n"); +// IOLog("send - unable to allocate buffer\n"); return false; } outBuffer->writeBytes(0, bytes, length); - + complete.target = this; complete.action = _WriteComplete; complete.parameter = outBuffer; - + err = connections[index].controllerOut->Write(outBuffer, 0, 0, length, &complete); if (err == kIOReturnSuccess) return true; else { - // IOLog("send - failed to start (0x%.8x)\n",err); +// IOLog("send - failed to start (0x%.8x)\n",err); return false; } } @@ -351,7 +340,9 @@ void WirelessGamingReceiver::WriteComplete(void *parameter,IOReturn status,UInt3 // Release any allocated objects void WirelessGamingReceiver::ReleaseAll(void) { - for (int i = 0; i < connectionCount; i++) + int i; + + for (i = 0; i < connectionCount; i++) { if (connections[i].service != NULL) { @@ -428,7 +419,7 @@ void WirelessGamingReceiver::ProcessMessage(int index, const unsigned char *data #ifdef PROTOCOL_DEBUG char s[1024]; int i; - + for (i = 0; i < length; i++) { s[(i * 2) + 0] = "0123456789ABCDEF"[(data[i] & 0xF0) >> 4]; @@ -469,7 +460,7 @@ void WirelessGamingReceiver::ProcessMessage(int index, const unsigned char *data int i, j; IOMemoryDescriptor *data; char c; - + ready = false; j = connections[index].inputArray->getCount(); for (i = 0; !ready && (i < j); i++) @@ -480,7 +471,7 @@ void WirelessGamingReceiver::ProcessMessage(int index, const unsigned char *data ready = true; } InstantiateService(index); - if (ready && connections[index].service != NULL) + if (ready) { #ifdef PROTOCOL_DEBUG IOLog("Registering wireless device"); @@ -492,9 +483,9 @@ void WirelessGamingReceiver::ProcessMessage(int index, const unsigned char *data } return; } - + // Add anything else to the queue - IOMemoryDescriptor *copy = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, kIODirectionOut, length); + IOMemoryDescriptor *copy = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, 0, length); copy->writeBytes(0, data, length); connections[index].inputArray->setObject(copy); if (connections[index].service == NULL) @@ -505,7 +496,7 @@ void WirelessGamingReceiver::ProcessMessage(int index, const unsigned char *data if (!connections[index].controllerStarted) { char c; - + copy->readBytes(1, &c, 1); if (c == 0x0f) { @@ -537,17 +528,17 @@ void WirelessGamingReceiver::InstantiateService(int index) { connections[index].service->attach(this); connections[index].service->SetIndex(index); - // connections[index].service->registerService(); - // IOLog("process: Device attached\n"); +// connections[index].service->registerService(); +// IOLog("process: Device attached\n"); if (IsDataQueued(index)) connections[index].service->NewData(); - connections[index].service->start(this); + connections[index].service->start(this); } else { connections[index].service->release(); connections[index].service = NULL; - // IOLog("process: Device attach failure\n"); +// IOLog("process: Device attach failure\n"); } } } @@ -562,7 +553,7 @@ bool WirelessGamingReceiver::IsDataQueued(int index) IOMemoryDescriptor* WirelessGamingReceiver::ReadBuffer(int index) { IOMemoryDescriptor *data; - + data = OSDynamicCast(IOMemoryDescriptor, connections[index].inputArray->getObject(0)); if (data != NULL) data->retain(); @@ -575,23 +566,23 @@ OSNumber* WirelessGamingReceiver::newLocationIDNumber() const { OSNumber *number; UInt32 location = 0; - + if (device) { if ((number = OSDynamicCast(OSNumber, device->getProperty("locationID")))) { location = number->unsigned32BitValue(); } - else + else { // Make up an address if ((number = OSDynamicCast(OSNumber, device->getProperty("USB Address")))) location |= number->unsigned8BitValue() << 24; - + if ((number = OSDynamicCast(OSNumber, device->getProperty("idProduct")))) location |= number->unsigned8BitValue() << 16; } } - + return OSNumber::withNumber(location, 32); } diff --git a/WirelessGamingReceiver/WirelessGamingReceiver.h b/WirelessGamingReceiver/WirelessGamingReceiver.h index afb0e72d..41c65d68 100644 --- a/WirelessGamingReceiver/WirelessGamingReceiver.h +++ b/WirelessGamingReceiver/WirelessGamingReceiver.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + WirelessGamingReceiver.h - declaration of the wireless receiver driver - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -31,16 +31,16 @@ class WirelessDevice; -typedef struct WIRELESS_CONNECTION +typedef struct { // Controller IOUSBInterface *controller; IOUSBPipe *controllerIn, *controllerOut; - + // Mystery IOUSBInterface *other; IOUSBPipe *otherIn, *otherOut; - + // Runtime data OSArray *inputArray; WirelessDevice *service; @@ -59,31 +59,29 @@ class WirelessGamingReceiver : public IOService // For WirelessDevice to use OSNumber* newLocationIDNumber() const; - + private: friend class WirelessDevice; bool IsDataQueued(int index); IOMemoryDescriptor* ReadBuffer(int index); bool QueueWrite(int index, const void *bytes, UInt32 length); - + private: IOUSBDevice *device; WIRELESS_CONNECTION connections[WIRELESS_CONNECTIONS]; int connectionCount; - + void InstantiateService(int index); - + void ProcessMessage(int index, const unsigned char *data, int length); - + bool QueueRead(int index); void ReadComplete(void *parameter, IOReturn status, UInt32 bufferSizeRemaining); - + void WriteComplete(void *parameter, IOReturn status, UInt32 bufferSizeRemaining); - + void ReleaseAll(void); - - bool didTerminate(IOService *provider, IOOptionBits options, bool *defer); - + static void _ReadComplete(void *target, void *parameter, IOReturn status, UInt32 bufferSizeRemaining); static void _WriteComplete(void *target, void *parameter, IOReturn status, UInt32 bufferSizeRemaining); }; diff --git a/WirelessGamingReceiver/WirelessGamingReceiver.xcodeproj/colin.mode1 b/WirelessGamingReceiver/WirelessGamingReceiver.xcodeproj/colin.mode1 new file mode 100644 index 00000000..6405cf09 --- /dev/null +++ b/WirelessGamingReceiver/WirelessGamingReceiver.xcodeproj/colin.mode1 @@ -0,0 +1,1564 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXRunSessionModule + Name + Run Log + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1 + FavBarConfig + + PBXProjectModuleGUID + 3B21EBD60B8CEAED00B5CACA + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1 + MajorVersion + 31 + MinorVersion + 1 + Name + Default + Notifications + + OpenEditors + + + Content + + PBXProjectModuleGUID + 3BE527360BDC379700984E1F + PBXProjectModuleLabel + WirelessGamingReceiver.cpp + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 3BE527370BDC379700984E1F + PBXProjectModuleLabel + WirelessGamingReceiver.cpp + _historyCapacity + 0 + bookmark + 3BD5A2FD0C56D76C005B4E24 + history + + 3BD5A2FC0C56D76C005B4E24 + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {806, 677}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 38 258 806 718 0 0 1280 1002 + + + + Content + + PBXProjectModuleGUID + 3B54B4630BDA9ECF00329AC0 + PBXProjectModuleLabel + WirelessHIDDevice.cpp + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 3B54B4640BDA9ECF00329AC0 + PBXProjectModuleLabel + WirelessHIDDevice.cpp + _historyCapacity + 0 + bookmark + 3BD5A2FE0C56D76C005B4E24 + history + + 3B4FC9F60C49C3B3007CF491 + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {1059, 503}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 34 458 1059 544 0 0 1280 1002 + + + + Content + + PBXProjectModuleGUID + 3BD1A9390C49BC33006510F7 + PBXProjectModuleLabel + WirelessHIDDevice.h + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 3BD1A93A0C49BC33006510F7 + PBXProjectModuleLabel + WirelessHIDDevice.h + _historyCapacity + 0 + bookmark + 3BD5A2FF0C56D76C005B4E24 + history + + 3B4FC9F70C49C3B3007CF491 + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {1059, 503}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 155 150 1059 544 0 0 1280 1002 + + + + Content + + PBXProjectModuleGUID + 3B216B380C08E9A4000BE7F3 + PBXProjectModuleLabel + WirelessGamingReceiver.h + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 3B216B390C08E9A4000BE7F3 + PBXProjectModuleLabel + WirelessGamingReceiver.h + _historyCapacity + 0 + bookmark + 3BD5A3000C56D76C005B4E24 + history + + 3B4FC9F80C49C3B3007CF491 + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {688, 361}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 481 168 688 402 0 0 1280 1002 + + + + Content + + PBXProjectModuleGUID + 3B216B3B0C08E9A4000BE7F3 + PBXProjectModuleLabel + IOUSBDevice.cpp + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 3B216B3C0C08E9A4000BE7F3 + PBXProjectModuleLabel + IOUSBDevice.cpp + _historyCapacity + 0 + bookmark + 3BD5A3010C56D76C005B4E24 + history + + 3B4FC9F90C49C3B3007CF491 + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {806, 677}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 61 237 806 718 0 0 1280 1002 + + + + Content + + PBXProjectModuleGUID + 3B216B410C08E9A4000BE7F3 + PBXProjectModuleLabel + WirelessDevice.h + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 3B216B420C08E9A4000BE7F3 + PBXProjectModuleLabel + WirelessDevice.h + _historyCapacity + 0 + bookmark + 3BD5A3030C56D76C005B4E24 + history + + 3B4FC9FB0C49C3B3007CF491 + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {1059, 503}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 175 169 1059 544 0 0 1280 1002 + + + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-target-popup + active-buildstyle-popup + action + NSToolbarFlexibleSpaceItem + buildOrClean + build-and-runOrDebug + com.apple.ide.PBXToolbarStopButton + get-info + toggle-editor + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 089C166AFE841209C02AAC07 + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 338}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 356}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 7 576 690 397 0 0 1280 1002 + + Module + PBXSmartGroupTreeModule + Proportion + 203pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + MyNewFile14.java + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + MyNewFile14.java + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {482, 0}} + RubberWindowFrame + 7 576 690 397 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 5}, {482, 351}} + RubberWindowFrame + 7 576 690 397 0 0 1280 1002 + + Module + XCDetailModule + Proportion + 351pt + + + Proportion + 482pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + 3BD5A2FA0C56D76C005B4E24 + 1CE0B1FE06471DED0097A5F4 + 3BD5A2FB0C56D76C005B4E24 + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.short + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 1 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + 3B21ED2D0B8E33A000B5CACA + 3B216B410C08E9A4000BE7F3 + 3B216B3B0C08E9A4000BE7F3 + 3B216B380C08E9A4000BE7F3 + 3BD1A9390C49BC33006510F7 + 3B54B4630BDA9ECF00329AC0 + /Users/colin/Projects2/OSX/360 Controller/WirelessGamingReceiver/WirelessGamingReceiver.xcodeproj + 3BE527360BDC379700984E1F + + WindowString + 7 576 690 397 0 0 1280 1002 + WindowTools + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {668, 312}} + RubberWindowFrame + 36 380 668 594 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 312pt + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 317}, {668, 236}} + RubberWindowFrame + 36 380 668 594 0 0 1280 1002 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 553pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + 3B21ED2D0B8E33A000B5CACA + 3BD5A3040C56D76C005B4E24 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.build + WindowString + 36 380 668 594 0 0 1280 1002 + WindowToolGUID + 3B21ED2D0B8E33A000B5CACA + WindowToolIsVisible + + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debug + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.find + IsVertical + + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {781, 212}} + RubberWindowFrame + 53 509 781 470 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 212pt + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{0, 217}, {781, 212}} + RubberWindowFrame + 53 509 781 470 0 0 1280 1002 + + Module + PBXProjectFindModule + Proportion + 212pt + + + Proportion + 429pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + + TableOfContents + + 1C530D57069F1CE1000CFCEE + 3BCC40340BDA6D7200B1619B + 3BCC40350BDA6D7200B1619B + 1CDD528C0622207200134675 + 1CD0528E0623707200166675 + + WindowString + 53 509 781 470 0 0 1280 1002 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + + + + Identifier + MENUSEPARATOR + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {440, 358}} + RubberWindowFrame + 650 41 440 400 0 0 1280 1002 + + Module + PBXDebugCLIModule + Proportion + 358pt + + + Proportion + 358pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAAD065D492600B07095 + 1C78EAAE065D492600B07095 + 1C78EAAC065D492600B07095 + + WindowString + 650 41 440 400 0 0 1280 1002 + + + Identifier + windowTool.run + Layout + + + Dock + + + ContentConfiguration + + LauncherConfigVersion + 3 + PBXProjectModuleGUID + 1CD0528B0623707200166675 + PBXProjectModuleLabel + Run + Runner + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {493, 167}} + {{0, 176}, {493, 267}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {405, 443}} + {{414, 0}, {514, 443}} + + + + + GeometryConfiguration + + Frame + {{0, 0}, {460, 159}} + RubberWindowFrame + 316 696 459 200 0 0 1280 1002 + + Module + PBXRunSessionModule + Proportion + 159pt + + + Proportion + 159pt + + + Name + Run Log + ServiceClasses + + PBXRunSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C0AD2B3069F1EA900FABCE6 + 1C0AD2B4069F1EA900FABCE6 + 1CD0528B0623707200166675 + 1C0AD2B5069F1EA900FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.run + WindowString + 316 696 459 200 0 0 1280 1002 + WindowToolGUID + 1C0AD2B3069F1EA900FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.09500122070312 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 2 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpoints + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimator + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + + diff --git a/WirelessGamingReceiver/WirelessGamingReceiver.xcodeproj/project.pbxproj b/WirelessGamingReceiver/WirelessGamingReceiver.xcodeproj/project.pbxproj new file mode 100644 index 00000000..cefc6790 --- /dev/null +++ b/WirelessGamingReceiver/WirelessGamingReceiver.xcodeproj/project.pbxproj @@ -0,0 +1,280 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 32D94FC60562CBF700B6AF17 /* WirelessGamingReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A224C3EFF42367911CA2CB7 /* WirelessGamingReceiver.h */; }; + 32D94FC80562CBF700B6AF17 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; + 32D94FCA0562CBF700B6AF17 /* WirelessGamingReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A224C3FFF42367911CA2CB7 /* WirelessGamingReceiver.cpp */; settings = {ATTRIBUTES = (); }; }; + 3B21ED670B8E688A00B5CACA /* WirelessDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B21ED660B8E688A00B5CACA /* WirelessDevice.h */; }; + 3B21ED6C0B8E690F00B5CACA /* WirelessDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3B21ED6B0B8E690F00B5CACA /* WirelessDevice.cpp */; }; + 3BE667180B9109C5009679FC /* WirelessHIDDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BE667170B9109C5009679FC /* WirelessHIDDevice.h */; }; + 3BE6671C0B910A02009679FC /* WirelessHIDDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3BE6671B0B910A02009679FC /* WirelessHIDDevice.cpp */; }; + 3BE6677B0B91DC55009679FC /* devices.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BE6677A0B91DC55009679FC /* devices.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1A224C3EFF42367911CA2CB7 /* WirelessGamingReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WirelessGamingReceiver.h; sourceTree = ""; }; + 1A224C3FFF42367911CA2CB7 /* WirelessGamingReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WirelessGamingReceiver.cpp; sourceTree = ""; }; + 32D94FCF0562CBF700B6AF17 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 32D94FD00562CBF700B6AF17 /* WirelessGamingReceiver.kext */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WirelessGamingReceiver.kext; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B21ED660B8E688A00B5CACA /* WirelessDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WirelessDevice.h; sourceTree = ""; }; + 3B21ED6B0B8E690F00B5CACA /* WirelessDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WirelessDevice.cpp; sourceTree = ""; }; + 3BE667170B9109C5009679FC /* WirelessHIDDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WirelessHIDDevice.h; sourceTree = ""; }; + 3BE6671B0B910A02009679FC /* WirelessHIDDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WirelessHIDDevice.cpp; sourceTree = ""; }; + 3BE6677A0B91DC55009679FC /* devices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = devices.h; sourceTree = ""; }; + 8DA8362C06AD9B9200E5AC22 /* Kernel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kernel.framework; path = /System/Library/Frameworks/Kernel.framework; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 32D94FCB0562CBF700B6AF17 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* WirelessGamingReceiver */ = { + isa = PBXGroup; + children = ( + 247142CAFF3F8F9811CA285C /* Source */, + 8DA8362C06AD9B9200E5AC22 /* Kernel.framework */, + 089C167CFE841241C02AAC07 /* Resources */, + 19C28FB6FE9D52B211CA2CBB /* Products */, + ); + name = WirelessGamingReceiver; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 32D94FCF0562CBF700B6AF17 /* Info.plist */, + 089C167DFE841241C02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 19C28FB6FE9D52B211CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 32D94FD00562CBF700B6AF17 /* WirelessGamingReceiver.kext */, + ); + name = Products; + sourceTree = ""; + }; + 247142CAFF3F8F9811CA285C /* Source */ = { + isa = PBXGroup; + children = ( + 3BE6677A0B91DC55009679FC /* devices.h */, + 3BE6671B0B910A02009679FC /* WirelessHIDDevice.cpp */, + 3BE667170B9109C5009679FC /* WirelessHIDDevice.h */, + 3B21ED6B0B8E690F00B5CACA /* WirelessDevice.cpp */, + 3B21ED660B8E688A00B5CACA /* WirelessDevice.h */, + 1A224C3FFF42367911CA2CB7 /* WirelessGamingReceiver.cpp */, + 1A224C3EFF42367911CA2CB7 /* WirelessGamingReceiver.h */, + ); + name = Source; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 32D94FC50562CBF700B6AF17 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 32D94FC60562CBF700B6AF17 /* WirelessGamingReceiver.h in Headers */, + 3B21ED670B8E688A00B5CACA /* WirelessDevice.h in Headers */, + 3BE667180B9109C5009679FC /* WirelessHIDDevice.h in Headers */, + 3BE6677B0B91DC55009679FC /* devices.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 32D94FC30562CBF700B6AF17 /* WirelessGamingReceiver */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB91D908733DB10010E9CD /* Build configuration list for PBXNativeTarget "WirelessGamingReceiver" */; + buildPhases = ( + 32D94FC50562CBF700B6AF17 /* Headers */, + 32D94FC70562CBF700B6AF17 /* Resources */, + 32D94FC90562CBF700B6AF17 /* Sources */, + 32D94FCB0562CBF700B6AF17 /* Frameworks */, + 32D94FCC0562CBF700B6AF17 /* Rez */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = WirelessGamingReceiver; + productInstallPath = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + productName = WirelessGamingReceiver; + productReference = 32D94FD00562CBF700B6AF17 /* WirelessGamingReceiver.kext */; + productType = "com.apple.product-type.kernel-extension.iokit"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB91DD08733DB10010E9CD /* Build configuration list for PBXProject "WirelessGamingReceiver" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 089C166AFE841209C02AAC07 /* WirelessGamingReceiver */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 32D94FC30562CBF700B6AF17 /* WirelessGamingReceiver */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 32D94FC70562CBF700B6AF17 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 32D94FC80562CBF700B6AF17 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 32D94FCC0562CBF700B6AF17 /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 32D94FC90562CBF700B6AF17 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 32D94FCA0562CBF700B6AF17 /* WirelessGamingReceiver.cpp in Sources */, + 3B21ED6C0B8E690F00B5CACA /* WirelessDevice.cpp in Sources */, + 3BE6671C0B910A02009679FC /* WirelessHIDDevice.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 1DEB91DA08733DB10010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1.0.0d12; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + MODULE_NAME = com.mice.driver.WirelessGamingReceiver; + MODULE_VERSION = 1.0.0d11; + PRODUCT_NAME = WirelessGamingReceiver; + PROVISIONING_PROFILE = ""; + WRAPPER_EXTENSION = kext; + ZERO_LINK = YES; + }; + name = Debug; + }; + 1DEB91DB08733DB10010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "Developer ID Application: Colin Munro"; + CURRENT_PROJECT_VERSION = 1.0.0d12; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions"; + MODULE_NAME = com.mice.driver.WirelessGamingReceiver; + MODULE_VERSION = 1.0.0d11; + PRODUCT_NAME = WirelessGamingReceiver; + PROVISIONING_PROFILE = ""; + WRAPPER_EXTENSION = kext; + }; + name = Release; + }; + 1DEB91DE08733DB10010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = ""; + PREBINDING = NO; + SDKROOT = ""; + }; + name = Debug; + }; + 1DEB91DF08733DB10010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + SDKROOT = ""; + SYMROOT = build; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB91D908733DB10010E9CD /* Build configuration list for PBXNativeTarget "WirelessGamingReceiver" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB91DA08733DB10010E9CD /* Debug */, + 1DEB91DB08733DB10010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB91DD08733DB10010E9CD /* Build configuration list for PBXProject "WirelessGamingReceiver" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB91DE08733DB10010E9CD /* Debug */, + 1DEB91DF08733DB10010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/WirelessGamingReceiver/WirelessHIDDevice.cpp b/WirelessGamingReceiver/WirelessHIDDevice.cpp index 9aa8a532..db7a1d00 100644 --- a/WirelessGamingReceiver/WirelessHIDDevice.cpp +++ b/WirelessGamingReceiver/WirelessHIDDevice.cpp @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + WirelessHIDDevice.cpp - generic wireless 360 device driver with HID support - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -26,7 +26,7 @@ #include "WirelessDevice.h" #include "devices.h" -#define POWEROFF_TIMEOUT (15 * 60) +#define POWEROFF_TIMEOUT (2 * 60) OSDefineMetaClassAndAbstractStructors(WirelessHIDDevice, IOHIDDevice) #define super IOHIDDevice @@ -36,8 +36,9 @@ const char weirdStart[] = {0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, void WirelessHIDDevice::ChatPadTimerActionWrapper(OSObject *owner, IOTimerEventSource *sender) { - WirelessHIDDevice *device = OSDynamicCast(WirelessHIDDevice, owner); - + WirelessHIDDevice *device; + + device = OSDynamicCast(WirelessHIDDevice, owner); // Automatic shutoff device->serialTimerCount++; if (device->serialTimerCount > POWEROFF_TIMEOUT) @@ -49,9 +50,10 @@ void WirelessHIDDevice::ChatPadTimerActionWrapper(OSObject *owner, IOTimerEventS // Sets the LED with the same format as the wired controller void WirelessHIDDevice::SetLEDs(int mode) { - unsigned char buf[] = {0x00, 0x00, 0x08, (unsigned char)(0x40 + (mode % 0x0e)), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - WirelessDevice *device = OSDynamicCast(WirelessDevice, getProvider()); + char buf[] = {0x00, 0x00, 0x08, 0x40 + (mode % 0x0e), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + WirelessDevice *device; + device = OSDynamicCast(WirelessDevice, getProvider()); if (device != NULL) { device->SendPacket(buf, sizeof(buf)); @@ -67,13 +69,14 @@ unsigned char WirelessHIDDevice::GetBatteryLevel(void) void WirelessHIDDevice::PowerOff(void) { - static const unsigned char buf[] = {0x00, 0x00, 0x08, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - WirelessDevice *device = OSDynamicCast(WirelessDevice, getProvider()); - + char buf[] = {0x00, 0x00, 0x08, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + WirelessDevice *device; + + device = OSDynamicCast(WirelessDevice, getProvider()); if (device != NULL) { device->SendPacket(buf, sizeof(buf)); - // device->SendPacket(weirdStart, sizeof(weirdStart)); +// device->SendPacket(weirdStart, sizeof(weirdStart)); } } @@ -84,7 +87,7 @@ IOReturn WirelessHIDDevice::setReport(IOMemoryDescriptor *report, IOHIDReportTyp if (report->readBytes(0, data, 2) < 2) return kIOReturnUnsupported; - + switch (data[0]) { case 0x01: // LED if ((data[1] != report->getLength()) || (data[1] != 0x03)) @@ -105,16 +108,16 @@ bool WirelessHIDDevice::handleStart(IOService *provider) { WirelessDevice *device; IOWorkLoop *workloop; - + if (!super::handleStart(provider)) goto fail; device = OSDynamicCast(WirelessDevice, provider); if (device == NULL) goto fail; - + serialTimerCount = 0; - + serialTimer = IOTimerEventSource::timerEventSource(this, ChatPadTimerActionWrapper); if (serialTimer == NULL) { @@ -127,15 +130,15 @@ bool WirelessHIDDevice::handleStart(IOService *provider) IOLog("start - failed to connect timer for chatpad\n"); goto fail; } - + device->RegisterWatcher(this, _receivedData, NULL); - + device->SendPacket(weirdStart, sizeof(weirdStart)); serialTimer->setTimeoutMS(1000); return true; - + fail: return false; } @@ -143,8 +146,9 @@ bool WirelessHIDDevice::handleStart(IOService *provider) // Shut down the driver void WirelessHIDDevice::handleStop(IOService *provider) { - WirelessDevice *device = OSDynamicCast(WirelessDevice, provider); + WirelessDevice *device; + device = OSDynamicCast(WirelessDevice, provider); if (device != NULL) device->RegisterWatcher(NULL, NULL, NULL); @@ -156,7 +160,7 @@ void WirelessHIDDevice::handleStop(IOService *provider) serialTimer->release(); serialTimer = NULL; } - + super::handleStop(provider); } @@ -167,7 +171,7 @@ void WirelessHIDDevice::receivedData(void) WirelessDevice *device = OSDynamicCast(WirelessDevice, getProvider()); if (device == NULL) return; - + while ((data = device->NextPacket()) != NULL) { receivedMessage(data); @@ -181,12 +185,12 @@ const char *HexData = "0123456789ABCDEF"; void WirelessHIDDevice::receivedMessage(IOMemoryDescriptor *data) { unsigned char buf[29]; - + if (data->getLength() != 29) return; - + data->readBytes(0, buf, 29); - + switch (buf[1]) { case 0x0f: // Initial info @@ -203,16 +207,16 @@ void WirelessHIDDevice::receivedMessage(IOMemoryDescriptor *data) serialString[8] = '\0'; IOLog("Got serial number: %s", serialString); break; - + case 0x01: // HID info update if (buf[3] == 0xf0) receivedHIDupdate(buf + 4, buf[5]); break; - + case 0x00: // Info update receivedUpdate(buf[3], buf + 4); break; - + default: break; } @@ -234,7 +238,7 @@ void WirelessHIDDevice::receivedUpdate(unsigned char type, unsigned char *data) } } break; - + default: break; } @@ -245,10 +249,10 @@ void WirelessHIDDevice::receivedHIDupdate(unsigned char *data, int length) { IOReturn err; IOMemoryDescriptor *report; - + serialTimerCount = 0; report = IOMemoryDescriptor::withAddress(data, length, kIODirectionNone); - err = handleReport(report); + err = handleReport(report, kIOHIDReportTypeInput); report->release(); if (err != kIOReturnSuccess) IOLog("handleReport return: 0x%.8x\n", err); diff --git a/WirelessGamingReceiver/WirelessHIDDevice.h b/WirelessGamingReceiver/WirelessHIDDevice.h index 24231f74..b2f3521f 100644 --- a/WirelessGamingReceiver/WirelessHIDDevice.h +++ b/WirelessGamingReceiver/WirelessHIDDevice.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + WirelessHIDDevice.h - declaration of generic wireless HID device - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify @@ -34,7 +34,7 @@ class WirelessHIDDevice : public IOHIDDevice void SetLEDs(int mode); void PowerOff(void); unsigned char GetBatteryLevel(void); - + IOReturn setReport(IOMemoryDescriptor *report, IOHIDReportType reportType, IOOptionBits options); OSNumber* newLocationIDNumber() const; @@ -49,10 +49,10 @@ class WirelessHIDDevice : public IOHIDDevice private: static void _receivedData(void *target, WirelessDevice *sender, void *parameter); static void ChatPadTimerActionWrapper(OSObject *owner, IOTimerEventSource *sender); - + IOTimerEventSource *serialTimer; int serialTimerCount; - + unsigned char battery; char serialString[10]; }; diff --git a/WirelessGamingReceiver/devices.h b/WirelessGamingReceiver/devices.h index ccaabcb3..81045194 100644 --- a/WirelessGamingReceiver/devices.h +++ b/WirelessGamingReceiver/devices.h @@ -1,9 +1,9 @@ /* MICE Xbox 360 Controller driver for Mac OS X Copyright (C) 2006-2013 Colin Munro - + devics.h - contains constants for the wireless driver - + This file is part of Xbox360Controller. Xbox360Controller is free software; you can redistribute it and/or modify diff --git a/WirelessGamingReceiver/version.plist b/WirelessGamingReceiver/version.plist new file mode 100644 index 00000000..53bf3a3f --- /dev/null +++ b/WirelessGamingReceiver/version.plist @@ -0,0 +1,16 @@ + + + + + BuildVersion + 12 + CFBundleVersion + 1.0 + ProductBuildVersion + 7K571 + ProjectName + DevToolsWizardTemplates + SourceVersion + 3870000 + + diff --git a/WirelessGamingReceiver/zh-Hans.lproj/InfoPlist.strings b/WirelessGamingReceiver/zh-Hans.lproj/InfoPlist.strings deleted file mode 100644 index e85e4cf7..00000000 --- a/WirelessGamingReceiver/zh-Hans.lproj/InfoPlist.strings +++ /dev/null @@ -1,3 +0,0 @@ -/* Localized versions of Info.plist keys */ - -NSHumanReadableCopyright = "© Colin Munro, 2007-11"; diff --git a/XBOBTFF/FFDriver.cpp b/XBOBTFF/FFDriver.cpp deleted file mode 100644 index 32f5fbe7..00000000 --- a/XBOBTFF/FFDriver.cpp +++ /dev/null @@ -1,799 +0,0 @@ -// -// FFDriver.c -// XBoxBTFFPlug -// -// Created by C.W. Betts on 9/20/17. -// Copyright © 2017 C.W. Betts. All rights reserved. -// - -#include -#include -#include "FFDriver.h" -#include "XBoxOneBTHID.h" -#include -#include -using std::max; -using std::min; - -static bool goodProbe(io_service_t theService) -{ - if (!IOObjectConformsTo(theService, kIOHIDDeviceKey)) { - return false; - } - CFMutableDictionaryRef dict; - - IORegistryEntryCreateCFProperties(theService, &dict, kCFAllocatorDefault, 0); - CFTypeRef aNum = CFDictionaryGetValue(dict, CFSTR(kIOHIDProductIDKey)); - int tmpNum; - ::CFNumberGetValue((CFNumberRef)aNum, kCFNumberIntType, &tmpNum); - if (tmpNum != 765) { - CFRelease(dict); - return false; - } - aNum = CFDictionaryGetValue(dict, CFSTR(kIOHIDVendorIDKey)); - ::CFNumberGetValue((CFNumberRef)aNum, kCFNumberIntType, &tmpNum); - if (tmpNum != 1118) { - CFRelease(dict); - return false; - } - - CFRelease(dict); - return true; -} - -#define LoopGranularity 10000 // Microseconds - -double CurrentTimeUsingMach() -{ - static mach_timebase_info_data_t info = {0}; - if (!info.denom) - { - if (mach_timebase_info(&info) != KERN_SUCCESS) - { - //Generally it can't fail here. Look at XNU sources //FIXME - info.denom = 0; - return -1.0; - } - } - - uint64_t start = mach_absolute_time(); - - uint64_t nanos = start * info.numer / info.denom; - return (double)nanos / NSEC_PER_SEC; -} - -static IOCFPlugInInterface functionMapXBOBT_IOCFPlugInInterface = { - // Padding required for COM - NULL, - // IUnknown - &FeedbackXBOBT::sQueryInterface, - &FeedbackXBOBT::sAddRef, - &FeedbackXBOBT::sRelease, - // IOCFPlugInInterface - 1,0, // Version - &FeedbackXBOBT::sProbe, - &FeedbackXBOBT::sStart, - &FeedbackXBOBT::sStop -}; - - -static IOForceFeedbackDeviceInterface functionMapXBOBT_IOForceFeedbackDeviceInterface = { - // Padding required for COM - NULL, - // IUnknown - &FeedbackXBOBT::sQueryInterface, - &FeedbackXBOBT::sAddRef, - &FeedbackXBOBT::sRelease, - // IOForceFeedbackDevice - &FeedbackXBOBT::sGetVersion, - &FeedbackXBOBT::sInitializeTerminate, - &FeedbackXBOBT::sDestroyEffect, - &FeedbackXBOBT::sDownloadEffect, - &FeedbackXBOBT::sEscape, - &FeedbackXBOBT::sGetEffectStatus, - &FeedbackXBOBT::sGetForceFeedbackCapabilities, - &FeedbackXBOBT::sGetForceFeedbackState, - &FeedbackXBOBT::sSendForceFeedbackCommand, - &FeedbackXBOBT::sSetProperty, - &FeedbackXBOBT::sStartEffect, - &FeedbackXBOBT::sStopEffect -}; - -FeedbackXBOBT::FeedbackXBOBT() : fRefCount(1), EffectIndex(1), Stopped(true), -Paused(false), PausedTime(0), LastTime(0), Gain(10000), PrvLeftLevel(0), -PrvRightLevel(0), Actuator(true), Manual(false) -{ - EffectList = FeedbackXBOEffectVector(); - - iIOCFPlugInInterface.pseudoVTable = (IUnknownVTbl *) &functionMapXBOBT_IOCFPlugInInterface; - iIOCFPlugInInterface.obj = this; - - iIOForceFeedbackDeviceInterface.pseudoVTable = (IUnknownVTbl *) &functionMapXBOBT_IOForceFeedbackDeviceInterface; - iIOForceFeedbackDeviceInterface.obj = this; - - FactoryID = BTFFPLUGINTERFACE; - CFRetain(FactoryID); - CFPlugInAddInstanceForFactory(FactoryID); -} - -FeedbackXBOBT::~FeedbackXBOBT() -{ - CFPlugInRemoveInstanceForFactory(FactoryID); - CFRelease(FactoryID); -} - -HRESULT FeedbackXBOBT::QueryInterface(REFIID iid, LPVOID *ppv) -{ - CFUUIDRef interface = CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault, iid); - - if(CFEqual(interface, kIOForceFeedbackDeviceInterfaceID)) - *ppv = &this->iIOForceFeedbackDeviceInterface; - // IUnknown || IOCFPlugInInterface - else if(CFEqual(interface, IUnknownUUID) || CFEqual(interface, kIOCFPlugInInterfaceID)) - *ppv = &this->iIOCFPlugInInterface; - else - *ppv = NULL; - - // Done - CFRelease(interface); - if ((*ppv) == NULL) return E_NOINTERFACE; - else { - this->iIOCFPlugInInterface.pseudoVTable->AddRef(*ppv); - } - return FF_OK; -} - -ULONG FeedbackXBOBT::AddRef() -{ - return ++fRefCount; -} - -ULONG FeedbackXBOBT::Release() -{ - ULONG returnValue = fRefCount - 1; - if(returnValue > 0) { - fRefCount = returnValue; - } else if(returnValue == 0) { - fRefCount = returnValue; - delete this; - } else { - returnValue = 0; - } - return returnValue; -} - -void** FeedbackXBOBT::Alloc(void) -{ - FeedbackXBOBT *me = new FeedbackXBOBT(); - if (!me) { - return NULL; - } - return (void **)(&me->iIOCFPlugInInterface.pseudoVTable); -} - -IOReturn FeedbackXBOBT::Probe(CFDictionaryRef propertyTable, io_service_t service, SInt32 *order) -{ - if (service == 0) { - return kIOReturnBadArgument; - } - if (goodProbe(service)) { - return 0; - } else { - return kIOReturnBadArgument; - } -} - -IOReturn FeedbackXBOBT::Start(CFDictionaryRef propertyTable,io_service_t service) -{ - return FF_OK; -} - -IOReturn FeedbackXBOBT::Stop(void) -{ - return FF_OK; -} - -HRESULT FeedbackXBOBT::SetProperty(FFProperty property, void *value) -{ - if(property != FFPROP_FFGAIN) { - return FFERR_UNSUPPORTED; - } - - UInt32 NewGain = *((UInt32*)value); - __block HRESULT Result = FF_OK; - - dispatch_sync(Queue, ^{ - if (1 <= NewGain && NewGain <= 10000) - { - Gain = NewGain; - } else { - Gain = max((UInt32)1, min(NewGain, (UInt32)10000)); - Result = FF_TRUNCATED; - } - }); - - return Result; -} - -HRESULT FeedbackXBOBT::StartEffect(FFEffectDownloadID EffectHandle, FFEffectStartFlag Mode, UInt32 Count) -{ - dispatch_sync(Queue, ^{ - for (FeedbackXBOEffectIterator effectIterator = EffectList.begin() ; effectIterator != EffectList.end(); ++effectIterator) - { - if (effectIterator->Handle == EffectHandle) - { - effectIterator->Status = FFEGES_PLAYING; - effectIterator->PlayCount = Count; - effectIterator->StartTime = CurrentTimeUsingMach(); - Stopped = false; - } else { - if (Mode & FFES_SOLO) { - effectIterator->Status = NULL; - } - } - } - }); - return FF_OK; -} - -HRESULT FeedbackXBOBT::StopEffect(UInt32 EffectHandle) -{ - dispatch_sync(Queue, ^{ - for (FeedbackXBOEffectIterator effectIterator = EffectList.begin() ; effectIterator != EffectList.end(); ++effectIterator) - { - if (effectIterator->Handle == EffectHandle) - { - effectIterator->Status = NULL; - break; - } - } - }); - return FF_OK; -} - -HRESULT FeedbackXBOBT::DownloadEffect(CFUUIDRef EffectType, FFEffectDownloadID *EffectHandle, FFEFFECT *DiEffect, FFEffectParameterFlag Flags) -{ - __block HRESULT Result = FF_OK; - - if (Flags & FFEP_NODOWNLOAD) - { - return FF_OK; - } - - dispatch_sync(Queue, ^{ - FeedbackXBOEffect *Effect = NULL; - if (*EffectHandle == 0) { - EffectList.push_back(FeedbackXBOEffect(EffectIndex++)); - Effect = &(EffectList.back()); - *EffectHandle = Effect->Handle; - } else { - for (LONG Index = 0; Index < EffectList.size(); Index++) { - if (EffectList[Index].Handle == *EffectHandle) { - Effect = &(EffectList[Index]); - break; - } - } - } - - if (Effect == NULL || Result == -1) { - Result = FFERR_INTERNAL; - } - else { - Effect->Type = EffectType; - Effect->DiEffect.dwFlags = DiEffect->dwFlags; - - if( Flags & FFEP_DURATION ) - { - Effect->DiEffect.dwDuration = DiEffect->dwDuration; - } - - if( Flags & FFEP_SAMPLEPERIOD ) - { - Effect->DiEffect.dwSamplePeriod = DiEffect->dwSamplePeriod; - } - - if( Flags & FFEP_GAIN ) - { - Effect->DiEffect.dwGain = DiEffect->dwGain; - } - - if( Flags & FFEP_TRIGGERBUTTON ) - { - Effect->DiEffect.dwTriggerButton = DiEffect->dwTriggerButton; - } - - if( Flags & FFEP_TRIGGERREPEATINTERVAL ) - { - Effect->DiEffect.dwTriggerRepeatInterval = DiEffect->dwTriggerRepeatInterval; - } - - if( Flags & FFEP_AXES ) - { - Effect->DiEffect.cAxes = DiEffect->cAxes; - Effect->DiEffect.rgdwAxes = NULL; - } - - if( Flags & FFEP_DIRECTION ) - { - Effect->DiEffect.cAxes = DiEffect->cAxes; - Effect->DiEffect.rglDirection = NULL; - } - - if( ( Flags & FFEP_ENVELOPE ) && DiEffect->lpEnvelope != NULL ) - { - memcpy( &Effect->DiEnvelope, DiEffect->lpEnvelope, sizeof( FFENVELOPE ) ); - if( Effect->DiEffect.dwDuration - Effect->DiEnvelope.dwFadeTime - < Effect->DiEnvelope.dwAttackTime ) - { - Effect->DiEnvelope.dwFadeTime = Effect->DiEnvelope.dwAttackTime; - } - Effect->DiEffect.lpEnvelope = &Effect->DiEnvelope; - } - - Effect->DiEffect.cbTypeSpecificParams = DiEffect->cbTypeSpecificParams; - - if( Flags & FFEP_TYPESPECIFICPARAMS ) - { - if(CFEqual(EffectType, kFFEffectType_CustomForce_ID)) { - memcpy( - &Effect->DiCustomForce - ,DiEffect->lpvTypeSpecificParams - ,DiEffect->cbTypeSpecificParams ); - Effect->DiEffect.lpvTypeSpecificParams = &Effect->DiCustomForce; - } - - else if(CFEqual(EffectType, kFFEffectType_ConstantForce_ID)) { - memcpy( - &Effect->DiConstantForce - ,DiEffect->lpvTypeSpecificParams - ,DiEffect->cbTypeSpecificParams ); - Effect->DiEffect.lpvTypeSpecificParams = &Effect->DiConstantForce; - } - else if(CFEqual(EffectType, kFFEffectType_Square_ID) || CFEqual(EffectType, kFFEffectType_Sine_ID) || CFEqual(EffectType, kFFEffectType_Triangle_ID) || CFEqual(EffectType, kFFEffectType_SawtoothUp_ID) || CFEqual(EffectType, kFFEffectType_SawtoothDown_ID) ) { - memcpy( - &Effect->DiPeriodic - ,DiEffect->lpvTypeSpecificParams - ,DiEffect->cbTypeSpecificParams ); - Effect->DiEffect.lpvTypeSpecificParams = &Effect->DiPeriodic; - } - else if(CFEqual(EffectType, kFFEffectType_RampForce_ID)) { - memcpy( - &Effect->DiRampforce - ,DiEffect->lpvTypeSpecificParams - ,DiEffect->cbTypeSpecificParams ); - Effect->DiEffect.lpvTypeSpecificParams = &Effect->DiRampforce; - } - } - - if( Flags & FFEP_STARTDELAY ) - { - Effect->DiEffect.dwStartDelay = DiEffect->dwStartDelay; - } - - if( Flags & FFEP_START ) - { - Effect->Status = FFEGES_PLAYING; - Effect->PlayCount = 1; - Effect->StartTime = CurrentTimeUsingMach(); - } - - if( Flags & FFEP_NORESTART ) - { - ; - } - Result = FF_OK; - } - }); - return Result; -} - -HRESULT FeedbackXBOBT::GetForceFeedbackState(ForceFeedbackDeviceState *DeviceState) -{ - if (DeviceState->dwSize != sizeof(FFDEVICESTATE)) - { - return FFERR_INVALIDPARAM; - } - - dispatch_sync(Queue, ^{ - DeviceState->dwState = NULL; - if( EffectList.size() == 0 ) - { - DeviceState->dwState |= FFGFFS_EMPTY; - } - if( Stopped == true ) - { - DeviceState->dwState |= FFGFFS_STOPPED; - } - if( Paused == true ) - { - DeviceState->dwState |= FFGFFS_PAUSED; - } - if (Actuator == true) - { - DeviceState->dwState |= FFGFFS_ACTUATORSON; - } else { - DeviceState->dwState |= FFGFFS_ACTUATORSOFF; - } - DeviceState->dwState |= FFGFFS_POWERON; - DeviceState->dwState |= FFGFFS_SAFETYSWITCHOFF; - DeviceState->dwState |= FFGFFS_USERFFSWITCHON; - - DeviceState->dwLoad = 0; - }); - - return FF_OK; -} - -HRESULT FeedbackXBOBT::GetForceFeedbackCapabilities(FFCAPABILITIES *capabilities) -{ - capabilities->ffSpecVer.majorRev=kFFPlugInAPIMajorRev; - capabilities->ffSpecVer.minorAndBugRev=kFFPlugInAPIMinorAndBugRev; - capabilities->ffSpecVer.stage=kFFPlugInAPIStage; - capabilities->ffSpecVer.nonRelRev=kFFPlugInAPINonRelRev; - capabilities->supportedEffects=FFCAP_ET_CUSTOMFORCE|FFCAP_ET_CONSTANTFORCE|FFCAP_ET_RAMPFORCE|FFCAP_ET_SQUARE|FFCAP_ET_SINE|FFCAP_ET_TRIANGLE|FFCAP_ET_SAWTOOTHUP|FFCAP_ET_SAWTOOTHDOWN; - capabilities->emulatedEffects=0; - capabilities->subType=FFCAP_ST_VIBRATION; - capabilities->numFfAxes=4; - capabilities->ffAxes[0]=FFJOFS_X; - capabilities->ffAxes[1]=FFJOFS_Y; - capabilities->ffAxes[2]=FFJOFS_Z; - capabilities->ffAxes[3]=FFJOFS_RZ; - capabilities->storageCapacity=256; - capabilities->playbackCapacity=1; - capabilities->driverVer.majorRev=FeedbackDriverVersionMajor; - capabilities->driverVer.minorAndBugRev=FeedbackDriverVersionMinor; - capabilities->driverVer.stage=FeedbackDriverVersionStage; - capabilities->driverVer.nonRelRev=FeedbackDriverVersionNonRelRev; - capabilities->firmwareVer.majorRev=1; - capabilities->firmwareVer.minorAndBugRev=0; - capabilities->firmwareVer.stage=developStage; - capabilities->firmwareVer.nonRelRev=0; - capabilities->hardwareVer.majorRev=1; - capabilities->hardwareVer.minorAndBugRev=0; - capabilities->hardwareVer.stage=developStage; - capabilities->hardwareVer.nonRelRev=0; - return FF_OK; -} - -HRESULT FeedbackXBOBT::SendForceFeedbackCommand(FFCommandFlag state) -{ - __block HRESULT Result = FF_OK; - - dispatch_sync(Queue, ^{ - switch (state) { - case FFSFFC_RESET: - EffectList.clear(); - Stopped = true; - Paused = false; - break; - - case FFSFFC_STOPALL: - for (FeedbackXBOEffectIterator effectIterator = EffectList.begin() ; effectIterator != EffectList.end(); ++effectIterator) - { - effectIterator->Status = NULL; - } - Stopped = true; - Paused = false; - break; - - case FFSFFC_PAUSE: - Paused = true; - PausedTime = CurrentTimeUsingMach(); - break; - - case FFSFFC_CONTINUE: - for (FeedbackXBOEffectIterator effectIterator = EffectList.begin() ; effectIterator != EffectList.end(); ++effectIterator) - { - effectIterator->StartTime += ( CurrentTimeUsingMach() - PausedTime ); - } - Paused = false; - break; - - case FFSFFC_SETACTUATORSON: - Actuator = true; - break; - - case FFSFFC_SETACTUATORSOFF: - Actuator = false; - break; - - default: - Result = FFERR_INVALIDPARAM; - break; - } - }); - //return Result; - return FF_OK; -} - -HRESULT FeedbackXBOBT::InitializeTerminate(NumVersion APIversion, io_object_t hidDevice, boolean_t begin) -{ - if(begin) { - if (APIversion.majorRev != kFFPlugInAPIMajorRev) - { - // fprintf(stderr,"Feedback: Invalid version\n"); - return FFERR_INVALIDPARAM; - } - // From probe - if( (hidDevice==0) - || !goodProbe(hidDevice) ) - { - // fprintf(stderr,"Feedback: Invalid device\n"); - return FFERR_INVALIDPARAM; - } - this->device = IOHIDDeviceCreate(kCFAllocatorDefault, hidDevice); - if(!this->device) { - // fprintf(stderr,"Feedback: Failed to initialise\n"); - return FFERR_NOINTERFACE; - } - IOHIDDeviceOpen(this->device, 0); - Queue = dispatch_queue_create("com.mice.driver.FeedbackXBOBT", NULL); - Timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, Queue); - dispatch_source_set_timer(Timer, dispatch_walltime(NULL, 0), LoopGranularity*1000, 10); - dispatch_set_context(Timer, this); - dispatch_source_set_event_handler_f(Timer, EffectProc); - dispatch_resume(Timer); - } - else { - dispatch_sync(Queue, ^{ - dispatch_source_cancel(Timer); - SetForce(0, 0, 0, 0); - IOHIDDeviceClose(this->device, 0); - CFRelease(this->device); - }); - - } - return FF_OK; -} - -HRESULT FeedbackXBOBT::DestroyEffect(FFEffectDownloadID EffectHandle) -{ - __block HRESULT Result = FF_OK; - dispatch_sync(Queue, ^{ - for (FeedbackXBOEffectIterator effectIterator = EffectList.begin() ; effectIterator != EffectList.end(); ++effectIterator) - { - if (effectIterator->Handle == EffectHandle) - { - EffectList.erase(effectIterator); - break; - } - } - }); - return Result; -} - -HRESULT FeedbackXBOBT::Escape(FFEffectDownloadID downloadID, FFEFFESCAPE *escape) -{ - if (downloadID!=0) return FFERR_UNSUPPORTED; - if (escape->dwSize < sizeof(FFEFFESCAPE)) return FFERR_INVALIDPARAM; - escape->cbOutBuffer=0; - switch (escape->dwCommand) { -#if 0 - case 0x00: // Control motors - if(escape->cbInBuffer!=1) return FFERR_INVALIDPARAM; - dispatch_sync(Queue, ^{ - Manual=((unsigned char*)escape->lpvInBuffer)[0]!=0x00; - }); - break; - - case 0x01: // Set motors - if (escape->cbInBuffer!=2) return FFERR_INVALIDPARAM; - dispatch_sync(Queue, ^{ - if(Manual) { - unsigned char *data=(unsigned char *)escape->lpvInBuffer; - unsigned char buf[]={0x00,0x04,data[0],data[1]}; - Device_Send(&this->device,buf,sizeof(buf)); - } - }); - break; - - case 0x02: // Set LED - if (escape->cbInBuffer!=1) return FFERR_INVALIDPARAM; - { - dispatch_sync(Queue, ^{ - unsigned char *data=(unsigned char *)escape->lpvInBuffer; - unsigned char buf[]={0x01,0x03,data[0]}; - Device_Send(&this->device,buf,sizeof(buf)); - }); - } - break; - - case 0x03: // Power off - { - dispatch_sync(Queue, ^{ - unsigned char buf[] = {0x02, 0x02}; - Device_Send(&this->device, buf, sizeof(buf)); - }); - } - break; -#endif - default: - fprintf(stderr, "XboxOneBTController FF plugin: Unknown escape (%i)\n", (int)escape->dwCommand); - return FFERR_UNSUPPORTED; - } - return FF_OK; -} - -void FeedbackXBOBT::SetForce(LONG LeftLevel, LONG RightLevel, LONG ltLevel, LONG rtLevel) -{ - //fprintf(stderr, "LS: %d; RS: %d\n", (unsigned char)MIN( 255, LeftLevel * Gain / 10000 ), (unsigned char)MIN( 255, RightLevel * Gain / 10000 )); - XboxOneBluetoothReport_t report = {0}; - report.reportID = 0x03; - report.activationMask = 0x0f; - report.ltMagnitude = (unsigned char)min(SCALE_MAX, ltLevel * (LONG)Gain / 10000 ); - report.rtMagnitude = (unsigned char)min(SCALE_MAX, rtLevel * (LONG)Gain / 10000 ); - report.leftMagnitude = (unsigned char)min(SCALE_MAX, LeftLevel * (LONG)Gain / 10000 ); - report.rightMagnitude = (unsigned char)min(SCALE_MAX, RightLevel * (LONG)Gain / 10000 ); - report.duration = 0x7f; - report.loopCount = 10; - - if (!Manual) { - IOReturn retVal = IOHIDDeviceSetReport(device, kIOHIDReportTypeOutput, report.reportID, (const uint8_t*)&report, sizeof(XboxOneBluetoothReport_t)); - if (retVal != 0) { - printf("IOHIDDeviceSetReport returned %d (system %d, subsystem %d, code %d)\n", retVal, err_get_system(retVal), err_get_sub(retVal), err_get_code(retVal)); - } - } -} - -void FeedbackXBOBT::EffectProc( void *params ) -{ - FeedbackXBOBT *cThis = (FeedbackXBOBT *)params; - - LONG LeftLevel = 0; - LONG RightLevel = 0; - LONG ltLevel = 0; - LONG rtLevel = 0; - LONG Gain = cThis->Gain; - LONG CalcResult = 0; - - if (cThis->Actuator == true) - { - for (FeedbackXBOEffectIterator effectIterator = cThis->EffectList.begin(); effectIterator != cThis->EffectList.end(); ++effectIterator) - { - if(((CurrentTimeUsingMach() - cThis->LastTime)*1000*1000) >= effectIterator->DiEffect.dwSamplePeriod) { - CalcResult = effectIterator->Calc(&LeftLevel, &RightLevel, <Level, &rtLevel); - } - } - } - - if ((cThis->PrvLeftLevel != LeftLevel || cThis->PrvRightLevel != RightLevel) && (CalcResult != -1)) - { - //fprintf(stderr, "PL: %d, PR: %d; L: %d, R: %d; \n", cThis->PrvLeftLevel, cThis->PrvRightLevel, LeftLevel, RightLevel); - cThis->SetForce((unsigned char)min(SCALE_MAX, LeftLevel * Gain / 10000),(unsigned char)min(SCALE_MAX, RightLevel * Gain / 10000 ), (unsigned char)min(SCALE_MAX, ltLevel * Gain / 10000), (unsigned char)min(SCALE_MAX, rtLevel * Gain / 10000)); - - cThis->PrvLeftLevel = LeftLevel; - cThis->PrvRightLevel = RightLevel; - } -} - -HRESULT FeedbackXBOBT::GetEffectStatus(FFEffectDownloadID EffectHandle, FFEffectStatusFlag *Status) -{ - dispatch_sync(Queue, ^{ - for (FeedbackXBOEffectIterator effectIterator = EffectList.begin() ; effectIterator != EffectList.end(); ++effectIterator) - { - if (effectIterator->Handle == EffectHandle) - { - *Status = effectIterator->Status; - break; - } - } - }); - return FF_OK; -} - -HRESULT FeedbackXBOBT::GetVersion(ForceFeedbackVersion *version) -{ - version->apiVersion.majorRev = kFFPlugInAPIMajorRev; - version->apiVersion.minorAndBugRev = kFFPlugInAPIMinorAndBugRev; - version->apiVersion.stage = kFFPlugInAPIStage; - version->apiVersion.nonRelRev = kFFPlugInAPINonRelRev; - version->plugInVersion.majorRev = FeedbackDriverVersionMajor; - version->plugInVersion.minorAndBugRev = FeedbackDriverVersionMinor; - version->plugInVersion.stage = FeedbackDriverVersionStage; - version->plugInVersion.nonRelRev = FeedbackDriverVersionNonRelRev; - return FF_OK; -} - -// static c->c++ glue functions -HRESULT FeedbackXBOBT::sQueryInterface(void *self, REFIID iid, LPVOID *ppv) -{ - FeedbackXBOBT *obj = ((XboxOneBTInterfaceMap *)self)->obj; - return obj->QueryInterface(iid, ppv); -} - -ULONG FeedbackXBOBT::sAddRef(void *self) -{ - FeedbackXBOBT *obj = ( (XboxOneBTInterfaceMap *) self)->obj; - return obj->AddRef(); -} - -ULONG FeedbackXBOBT::sRelease(void *self) -{ - FeedbackXBOBT *obj = ( (XboxOneBTInterfaceMap *) self)->obj; - return obj->Release(); -} - -IOReturn FeedbackXBOBT::sProbe(void *self, CFDictionaryRef propertyTable, io_service_t service, SInt32 *order) -{ - return getThis(self)->Probe(propertyTable, service, order); -} - -IOReturn FeedbackXBOBT::sStart(void *self, CFDictionaryRef propertyTable, io_service_t service) -{ - return getThis(self)->Start(propertyTable, service); -} - -IOReturn FeedbackXBOBT::sStop(void *self) -{ - return getThis(self)->Stop(); -} - -HRESULT FeedbackXBOBT::sGetVersion(void * self, ForceFeedbackVersion * version) -{ - return FeedbackXBOBT::getThis(self)->GetVersion(version); -} - -HRESULT FeedbackXBOBT::sInitializeTerminate(void * self, NumVersion forceFeedbackAPIVersion, io_object_t hidDevice, boolean_t begin) -{ - return FeedbackXBOBT::getThis(self)->InitializeTerminate(forceFeedbackAPIVersion, hidDevice, begin); -} - -HRESULT FeedbackXBOBT::sDestroyEffect(void * self, FFEffectDownloadID downloadID) -{ - return FeedbackXBOBT::getThis(self)->DestroyEffect(downloadID); -} - -HRESULT FeedbackXBOBT::sDownloadEffect(void * self, CFUUIDRef effectType, FFEffectDownloadID *pDownloadID, FFEFFECT * pEffect, FFEffectParameterFlag flags) -{ - return FeedbackXBOBT::getThis(self)->DownloadEffect(effectType, pDownloadID, pEffect, flags); -} - -HRESULT FeedbackXBOBT::sEscape(void * self, FFEffectDownloadID downloadID, FFEFFESCAPE * pEscape) -{ - return FeedbackXBOBT::getThis(self)->Escape(downloadID, pEscape); -} - -HRESULT FeedbackXBOBT::sGetEffectStatus(void * self, FFEffectDownloadID downloadID, FFEffectStatusFlag * pStatusCode) -{ - return FeedbackXBOBT::getThis(self)->GetEffectStatus(downloadID, pStatusCode); -} - -HRESULT FeedbackXBOBT::sGetForceFeedbackState(void * self, ForceFeedbackDeviceState * pDeviceState) -{ - return FeedbackXBOBT::getThis(self)->GetForceFeedbackState(pDeviceState); -} - -HRESULT FeedbackXBOBT::sGetForceFeedbackCapabilities(void * self, FFCAPABILITIES * capabilities) -{ - return FeedbackXBOBT::getThis(self)->GetForceFeedbackCapabilities(capabilities); -} - -HRESULT FeedbackXBOBT::sSendForceFeedbackCommand(void * self, FFCommandFlag state) -{ - return FeedbackXBOBT::getThis(self)->SendForceFeedbackCommand(state); -} - -HRESULT FeedbackXBOBT::sSetProperty(void * self, FFProperty property, void * pValue) -{ - return FeedbackXBOBT::getThis(self)->SetProperty(property, pValue); -} - -HRESULT FeedbackXBOBT::sStartEffect(void * self, FFEffectDownloadID downloadID, FFEffectStartFlag mode, UInt32 iterations) -{ - return FeedbackXBOBT::getThis(self)->StartEffect(downloadID, mode, iterations); -} - -HRESULT FeedbackXBOBT::sStopEffect(void * self, UInt32 downloadID) -{ - return FeedbackXBOBT::getThis(self)->StopEffect(downloadID); -} - -// External factory function -extern "C" void* FeedbackXBOBTFactory(CFAllocatorRef allocator, CFUUIDRef typeID) -{ - void* result = NULL; - if (CFEqual(typeID, kIOForceFeedbackLibTypeID)) - result = (void*)FeedbackXBOBT::Alloc(); - return result; -} - diff --git a/XBOBTFF/FFDriver.h b/XBOBTFF/FFDriver.h deleted file mode 100644 index ac7a5361..00000000 --- a/XBOBTFF/FFDriver.h +++ /dev/null @@ -1,131 +0,0 @@ -// -// FFDriver.h -// XBoxBTFFPlug -// -// Created by C.W. Betts on 9/20/17. -// Copyright © 2017 C.W. Betts. All rights reserved. -// - -#ifndef FFDriver_h -#define FFDriver_h - -#include -#include -#include -#include -#include -#include "FeedbackXBOEffect.hpp" - -// 0F793F56-8C17-4BA0-9201-D52FEC6C2702 -#define BTFFPLUGINTERFACE CFUUIDGetConstantUUIDWithBytes(kCFAllocatorSystemDefault, 0x0F, 0x79, 0x3F, 0x56, 0x8C, 0x17, 0x4B, 0xA0, 0x92, 0x01, 0xD5, 0x2F, 0xEC, 0x6C, 0x27, 0x02) - -#define FeedbackDriverVersionMajor 1 -#define FeedbackDriverVersionMinor 0 -#define FeedbackDriverVersionStage developStage -#define FeedbackDriverVersionNonRelRev 0 - -class FeedbackXBOBT : IUnknown -{ -public: - // constructor/destructor - FeedbackXBOBT(void); - virtual ~FeedbackXBOBT(void); - -private: - //disable copy constructor - FeedbackXBOBT(FeedbackXBOBT &src); - void operator = (FeedbackXBOBT &src); - - UInt32 fRefCount; - - typedef struct _Xbox360InterfaceMap - { - IUnknownVTbl *pseudoVTable; - FeedbackXBOBT *obj; - } XboxOneBTInterfaceMap; - - // IOCFPlugin interfacing variables and functions -public: - static void** Alloc(void); - - // static functions called by the ForceFeedback API - static HRESULT sQueryInterface(void *self, REFIID iid, LPVOID *ppv); - static ULONG sAddRef(void *self); - static ULONG sRelease(void *self); - - static IOReturn sProbe ( void * self, CFDictionaryRef propertyTable, io_service_t service, SInt32 * order ); - static IOReturn sStart ( void * self, CFDictionaryRef propertyTable, io_service_t service ); - static IOReturn sStop ( void * self ); - - static HRESULT sGetVersion(void * interface, ForceFeedbackVersion * version); - static HRESULT sInitializeTerminate(void * interface, NumVersion forceFeedbackAPIVersion, io_object_t hidDevice, boolean_t begin ); - static HRESULT sDestroyEffect(void * interface, FFEffectDownloadID downloadID ); - static HRESULT sDownloadEffect( void * interface, CFUUIDRef effectType, FFEffectDownloadID *pDownloadID, FFEFFECT * pEffect, FFEffectParameterFlag flags ); - static HRESULT sEscape( void * interface, FFEffectDownloadID downloadID, FFEFFESCAPE * pEscape ); - static HRESULT sGetEffectStatus( void * interface, FFEffectDownloadID downloadID, FFEffectStatusFlag * pStatusCode ); - static HRESULT sGetForceFeedbackState( void * interface, ForceFeedbackDeviceState * pDeviceState ); - static HRESULT sGetForceFeedbackCapabilities( void * interface, FFCAPABILITIES *capabilities ); - static HRESULT sSendForceFeedbackCommand( void * interface, FFCommandFlag state ); - static HRESULT sSetProperty( void * interface, FFProperty property, void * pValue ); - static HRESULT sStartEffect( void * interface, FFEffectDownloadID downloadID, FFEffectStartFlag mode, UInt32 iterations ); - static HRESULT sStopEffect( void * interface, UInt32 downloadID ); - - virtual HRESULT QueryInterface(REFIID iid, LPVOID* ppv); - virtual ULONG AddRef(void); - virtual ULONG Release(void); - -private: - typedef std::vector FeedbackXBOEffectVector; - typedef FeedbackXBOEffectVector::iterator FeedbackXBOEffectIterator; - // helper function - static inline FeedbackXBOBT *getThis (void *self) { return (FeedbackXBOBT *) ((XboxOneBTInterfaceMap *) self)->obj; } - - // interfacing - XboxOneBTInterfaceMap iIOCFPlugInInterface; - XboxOneBTInterfaceMap iIOForceFeedbackDeviceInterface; - IOHIDDeviceRef device; - - // GCD queue and timer - dispatch_queue_t Queue; - dispatch_source_t Timer; - - // effects handling - FeedbackXBOEffectVector EffectList; - UInt32 EffectIndex; - - DWORD Gain; - bool Actuator; - - LONG PrvLeftLevel, PrvRightLevel; - bool Stopped; - bool Paused; - bool Manual; - double LastTime; - double PausedTime; - CFUUIDRef FactoryID; - - void SetForce(LONG LeftLevel, LONG RightLevel, LONG ltLevel, LONG rtLevel); - - // event loop func - static void EffectProc( void *params ); - - // actual member functions ultimately called by the FF API (through the static functions) - virtual IOReturn Probe ( CFDictionaryRef propertyTable, io_service_t service, SInt32 * order ); - virtual IOReturn Start ( CFDictionaryRef propertyTable, io_service_t service ); - virtual IOReturn Stop ( void ); - - virtual HRESULT GetVersion(ForceFeedbackVersion * version); - virtual HRESULT InitializeTerminate(NumVersion forceFeedbackAPIVersion, io_object_t hidDevice, boolean_t begin); - virtual HRESULT DestroyEffect(FFEffectDownloadID downloadID); - virtual HRESULT DownloadEffect(CFUUIDRef effectType, FFEffectDownloadID *pDownloadID, FFEFFECT * pEffect, FFEffectParameterFlag flags); - virtual HRESULT Escape(FFEffectDownloadID downloadID, FFEFFESCAPE * pEscape); - virtual HRESULT GetEffectStatus(FFEffectDownloadID downloadID, FFEffectStatusFlag * pStatusCode); - virtual HRESULT GetForceFeedbackState(ForceFeedbackDeviceState * pDeviceState); - virtual HRESULT GetForceFeedbackCapabilities(FFCAPABILITIES *capabilities); - virtual HRESULT SendForceFeedbackCommand(FFCommandFlag state); - virtual HRESULT SetProperty(FFProperty property, void * pValue); - virtual HRESULT StartEffect(FFEffectDownloadID downloadID, FFEffectStartFlag mode, UInt32 iterations); - virtual HRESULT StopEffect(UInt32 downloadID); -}; - -#endif /* FFDriver_h */ diff --git a/XBOBTFF/FeedbackXBOEffect.cpp b/XBOBTFF/FeedbackXBOEffect.cpp deleted file mode 100644 index ddb0b138..00000000 --- a/XBOBTFF/FeedbackXBOEffect.cpp +++ /dev/null @@ -1,281 +0,0 @@ -// -// FeedbackXBOEffect.cpp -// XBOBTFF -// -// Created by C.W. Betts on 9/20/17. -// Copyright © 2017 GitHub. All rights reserved. -// - -#include "FeedbackXBOEffect.hpp" - -using std::max; -using std::min; - -//---------------------------------------------------------------------------------------------- -// CEffect -//---------------------------------------------------------------------------------------------- -FeedbackXBOEffect::FeedbackXBOEffect() : Type(NULL), Status(0), PlayCount(0), -StartTime(0), Index(0), LastTime(0), Handle(0), DiEffect({0}), DiEnvelope({0}), -DiCustomForce({0}), DiConstantForce({0}), DiPeriodic({0}), DiRampforce({0}) -{ - -} - -FeedbackXBOEffect::FeedbackXBOEffect(FFEffectDownloadID theHand) : FeedbackXBOEffect() -{ - Handle = theHand; -} - -FeedbackXBOEffect::FeedbackXBOEffect(const FeedbackXBOEffect &src) : Type(src.Type), -Handle(src.Handle), Status(src.Status), PlayCount(src.PlayCount), -StartTime(src.StartTime), Index(src.Index), LastTime(src.LastTime) -{ - memcpy(&DiEffect, &src.DiEffect, sizeof(FFEFFECT)); - memcpy(&DiEnvelope, &src.DiEnvelope, sizeof(FFENVELOPE)); - memcpy(&DiCustomForce, &src.DiCustomForce, sizeof(FFCUSTOMFORCE)); - memcpy(&DiConstantForce, &src.DiConstantForce, sizeof(FFCONSTANTFORCE)); - memcpy(&DiPeriodic, &src.DiPeriodic, sizeof(FFPERIODIC)); - memcpy(&DiRampforce, &src.DiRampforce, sizeof(FFRAMPFORCE)); -} - -//---------------------------------------------------------------------------------------------- -// Calc -//---------------------------------------------------------------------------------------------- -LONG FeedbackXBOEffect::Calc(LONG *LeftLevel, LONG *RightLevel, LONG *ltLevel, LONG *rtLevel) -{ - CFTimeInterval Duration = 0; - if(DiEffect.dwDuration != FF_INFINITE) { - Duration = max(1., DiEffect.dwDuration / 1000.) / 1000.; - } else { - Duration = DBL_MAX; - } - double BeginTime = StartTime + ( DiEffect.dwStartDelay / 1000. / 1000.); - double EndTime = DBL_MAX; - if (PlayCount != -1) - { - EndTime = BeginTime + Duration * PlayCount; - } - double CurrentTime = CurrentTimeUsingMach(); - - if (Status == FFEGES_PLAYING && BeginTime <= CurrentTime && CurrentTime <= EndTime) - { - // Used for force calculation - LONG NormalLevel; - LONG WorkLeftLevel; - LONG WorkRightLevel; - LONG WorkLTLevel; - LONG WorkRTLevel; - - // Used for envelope calculation - LONG NormalRate; - LONG AttackLevel; - LONG FadeLevel; - - CalcEnvelope((ULONG)(Duration*1000) - ,(ULONG)(fmod(CurrentTime - BeginTime, Duration)*1000) - ,&NormalRate - ,&AttackLevel - ,&FadeLevel); - - // CustomForce allows setting each channel separately - if(CFEqual(Type, kFFEffectType_CustomForce_ID)) { - if((CurrentTimeUsingMach() - LastTime)*1000*1000 < DiCustomForce.dwSamplePeriod) { - return -1; - } - else { - if (DiCustomForce.cChannels == 2) { - WorkLeftLevel = ((DiCustomForce.rglForceData[2*Index] * NormalRate + AttackLevel + FadeLevel) / 100) * DiEffect.dwGain / 10000; - WorkRightLevel = ((DiCustomForce.rglForceData[2*Index + 1] * NormalRate + AttackLevel + FadeLevel) / 100) * DiEffect.dwGain / 10000; - WorkLTLevel = 0; - WorkRTLevel = 0; - //fprintf(stderr, "L:%d; R:%d\n", WorkLeftLevel, WorkRightLevel); - Index = (Index + 1) % (DiCustomForce.cSamples/2); - LastTime = CurrentTimeUsingMach(); - } else { - WorkLeftLevel = ((DiCustomForce.rglForceData[4*Index] * NormalRate + AttackLevel + FadeLevel) / 100) * DiEffect.dwGain / 10000; - WorkRightLevel = ((DiCustomForce.rglForceData[4*Index + 1] * NormalRate + AttackLevel + FadeLevel) / 100) * DiEffect.dwGain / 10000; - WorkLTLevel = ((DiCustomForce.rglForceData[4*Index + 2] * NormalRate + AttackLevel + FadeLevel) / 100) * DiEffect.dwGain / 10000; - WorkRTLevel = ((DiCustomForce.rglForceData[4*Index + 3] * NormalRate + AttackLevel + FadeLevel) / 100) * DiEffect.dwGain / 10000; - //fprintf(stderr, "L:%d; R:%d\n", WorkLeftLevel, WorkRightLevel); - Index = (Index + 1) % (DiCustomForce.cSamples/4); - LastTime = CurrentTimeUsingMach(); - } - } - } - // Regular commands treat controller as a single output (both channels are together as one) - else { - CalcForce( - (ULONG)(Duration*1000) - ,(ULONG)(fmod(CurrentTime - BeginTime, Duration)*1000) - ,NormalRate - ,AttackLevel - ,FadeLevel - ,&NormalLevel ); - //fprintf(stderr, "DeltaT %f\n", CurrentTime - BeginTime); - //fprintf(stderr, "Duration %f; NormalRate: %d; AttackLevel: %d; FadeLevel: %d\n", Duration, NormalRate, AttackLevel, FadeLevel); - - WorkLeftLevel = (NormalLevel > 0) ? NormalLevel : -NormalLevel; - WorkRightLevel = (NormalLevel > 0) ? NormalLevel : -NormalLevel; - WorkLTLevel = 0; - WorkRTLevel = 0; - } - WorkLeftLevel = min( SCALE_MAX, WorkLeftLevel * SCALE_MAX / 10000 ); - WorkRightLevel = min( SCALE_MAX, WorkRightLevel * SCALE_MAX / 10000 ); - WorkLTLevel = min( SCALE_MAX, WorkLTLevel * SCALE_MAX / 10000 ); - WorkRTLevel = min( SCALE_MAX, WorkRTLevel * SCALE_MAX / 10000 ); - - *LeftLevel = *LeftLevel + WorkLeftLevel; - *RightLevel = *RightLevel + WorkRightLevel; - *ltLevel = *ltLevel + WorkLTLevel; - *rtLevel = *rtLevel + WorkRTLevel; - } - return 0; -} - -//---------------------------------------------------------------------------------------------- -// CalcEnvelope -//---------------------------------------------------------------------------------------------- -void FeedbackXBOEffect::CalcEnvelope(ULONG Duration, ULONG CurrentPos, LONG *NormalRate, LONG *AttackLevel, LONG *FadeLevel) -{ - if( ( DiEffect.dwFlags & FFEP_ENVELOPE ) && DiEffect.lpEnvelope != NULL ) - { - // Calculate attack factor - LONG AttackRate = 0; - ULONG AttackTime = max( (DWORD)1, DiEnvelope.dwAttackTime / 1000 ); - if (CurrentPos < AttackTime) - { - AttackRate = ( AttackTime - CurrentPos ) * 100 / AttackTime; - } - - // Calculate fade factor - LONG FadeRate = 0; - ULONG FadeTime = max( (DWORD)1, DiEnvelope.dwFadeTime / 1000 ); - ULONG FadePos = Duration - FadeTime; - if (FadePos < CurrentPos) - { - FadeRate = ( CurrentPos - FadePos ) * 100 / FadeTime; - } - - *NormalRate = 100 - AttackRate - FadeRate; - *AttackLevel = DiEnvelope.dwAttackLevel * AttackRate; - *FadeLevel = DiEnvelope.dwFadeLevel * FadeRate; - } else { - *NormalRate = 100; - *AttackLevel = 0; - *FadeLevel = 0; - } -} - -void FeedbackXBOEffect::CalcForce(ULONG Duration, ULONG CurrentPos, LONG NormalRate, LONG AttackLevel, LONG FadeLevel, LONG * NormalLevel) -{ - LONG Magnitude = 0; - LONG Period; - LONG R; - LONG Rate; - - if (CFEqual(Type, kFFEffectType_ConstantForce_ID)) { - Magnitude = DiConstantForce.lMagnitude; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - } - else if (CFEqual(Type, kFFEffectType_Square_ID)) { - Period = max( (DWORD)1, ( DiPeriodic.dwPeriod / 1000 ) ); - R = ( CurrentPos%Period) * 360 / Period; - R = ( R + ( DiPeriodic.dwPhase / 100 ) ) % 360; - - Magnitude = DiPeriodic.dwMagnitude; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - - if (180 <= R) - { - Magnitude = Magnitude * -1; - } - - Magnitude = Magnitude + DiPeriodic.lOffset; - } - else if (CFEqual(Type, kFFEffectType_Sine_ID)) { - Period = max( (DWORD)1, ( DiPeriodic.dwPeriod / 1000 ) ); - R = (CurrentPos%Period) * 360 / Period; - R = ( R + ( DiPeriodic.dwPhase / 100 ) ) % 360; - - Magnitude = DiPeriodic.dwMagnitude; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - - Magnitude = ( int)( Magnitude * sin( R * M_PI / 180.0 ) ); - - Magnitude = Magnitude + DiPeriodic.lOffset; - } - else if (CFEqual(Type, kFFEffectType_Triangle_ID)) { - Period = max( (DWORD)1, ( DiPeriodic.dwPeriod / 1000 ) ); - R = (CurrentPos%Period) * 360 / Period; - R = ( R + ( DiPeriodic.dwPhase / 100 ) ) % 360; - - Magnitude = DiPeriodic.dwMagnitude; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - - if (0 <= R && R < 90) - { - Magnitude = -Magnitude * ( 90 - R ) / 90; - } - if (90 <= R && R < 180) - { - Magnitude = Magnitude * ( R - 90 ) / 90; - } - if (180 <= R && R < 270) - { - Magnitude = Magnitude * ( 90 - ( R - 180 ) ) / 90; - } - if (270 <= R && R < 360) - { - Magnitude = -Magnitude * ( R - 270 ) / 90; - } - - Magnitude = Magnitude + DiPeriodic.lOffset; - } - else if(CFEqual(Type, kFFEffectType_SawtoothUp_ID)) { - Period = max( (DWORD)1, ( DiPeriodic.dwPeriod / 1000 ) ); - R = (CurrentPos%Period) * 360 / Period; - R = ( R + ( DiPeriodic.dwPhase / 100 ) ) % 360; - - Magnitude = DiPeriodic.dwMagnitude; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - - if (0 <= R && R < 180) - { - Magnitude = -Magnitude * ( 180 - R ) / 180; - } - if (180 <= R && R < 360) - { - Magnitude = Magnitude * ( R - 180 ) / 180; - } - - Magnitude = Magnitude + DiPeriodic.lOffset; - } - else if (CFEqual(Type, kFFEffectType_SawtoothDown_ID)) { - Period = max( (DWORD)1, ( DiPeriodic.dwPeriod / 1000 ) ); - R = (CurrentPos%Period) * 360 / Period; - R = ( R + ( DiPeriodic.dwPhase / 100 ) ) % 360; - - Magnitude = DiPeriodic.dwMagnitude; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - if( 0 <= R && R < 180 ) - { - Magnitude = Magnitude * ( 180 - R ) / 180; - } - if( 180 <= R && R < 360 ) - { - Magnitude = -Magnitude * ( R - 180 ) / 180; - } - - Magnitude = Magnitude + DiPeriodic.lOffset; - } - else if (CFEqual(Type, kFFEffectType_RampForce_ID)) { - Rate = ( Duration - CurrentPos ) * 100 - / Duration;//MAX( 1, DiEffect.dwDuration / 1000 ); - - Magnitude = ( DiRampforce.lStart * Rate - + DiRampforce.lEnd * ( 100 - Rate ) ) / 100; - Magnitude = ( Magnitude * NormalRate + AttackLevel + FadeLevel ) / 100; - } - - *NormalLevel = Magnitude * (LONG)DiEffect.dwGain / 10000; -} diff --git a/XBOBTFF/FeedbackXBOEffect.hpp b/XBOBTFF/FeedbackXBOEffect.hpp deleted file mode 100644 index 96974a8c..00000000 --- a/XBOBTFF/FeedbackXBOEffect.hpp +++ /dev/null @@ -1,69 +0,0 @@ -// -// FeedbackXBOEffect.hpp -// XBOBTFF -// -// Created by C.W. Betts on 9/20/17. -// Copyright © 2017 GitHub. All rights reserved. -// - -#ifndef FeedbackXBOEffect_hpp -#define FeedbackXBOEffect_hpp - -#include -#include -#include -#include - -//---------------------------------------------------------------------------------------------- -// Effects -//---------------------------------------------------------------------------------------------- - -#define CONSTANT_FORCE 0x00 -#define RAMP_FORCE 0x01 -#define SQUARE 0x02 -#define SINE 0x03 -#define TRIANGLE 0x04 -#define SAWTOOTH_UP 0x05 -#define SAWTOOTH_DOWN 0x06 -#define SPRING 0x07 -#define DAMPER 0x08 -#define INERTIA 0x09 -#define FRICTION 0x0A -#define CUSTOM_FORCE 0x0B - -#define SCALE_MAX (LONG)101 - -double CurrentTimeUsingMach(); - -class FeedbackXBOEffect -{ -public: - FeedbackXBOEffect(FFEffectDownloadID theHand); - FeedbackXBOEffect(const FeedbackXBOEffect &src); - - LONG Calc(LONG *LeftLevel, LONG *RightLevel, LONG *ltLevel, LONG *rtLevel); - - CFUUIDRef Type; - FFEffectDownloadID Handle; - - FFEFFECT DiEffect; - FFENVELOPE DiEnvelope; - FFCONSTANTFORCE DiConstantForce; - FFCUSTOMFORCE DiCustomForce; - FFPERIODIC DiPeriodic; - FFRAMPFORCE DiRampforce; - - DWORD Status; - DWORD PlayCount; - double StartTime; - - double LastTime; - DWORD Index; - -private: - FeedbackXBOEffect(); - void CalcEnvelope(ULONG Duration, ULONG CurrentPos, LONG *NormalRate, LONG *AttackLevel, LONG *FadeLevel); - void CalcForce(ULONG Duration, ULONG CurrentPos, LONG NormalRate, LONG AttackLevel, LONG FadeLevel, LONG * NormalLevel); -}; - -#endif /* FeedbackXBOEffect_hpp */ diff --git a/XBOBTFF/Info.plist b/XBOBTFF/Info.plist deleted file mode 100644 index a86914e6..00000000 --- a/XBOBTFF/Info.plist +++ /dev/null @@ -1,40 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundleSignature - ???? - CFBundlePackageType - BNDL - CFBundleShortVersionString - $(CURRENT_PROJECT_VERSION) - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - CFPlugInDynamicRegistration - - CFPlugInFactories - - 0F793F56-8C17-4BA0-9201-D52FEC6C2702 - FeedbackXBOBTFactory - - CFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - - 0F793F56-8C17-4BA0-9201-D52FEC6C2702 - - - NSHumanReadableCopyright - Copyright © 2017 C.W. Betts. All rights reserved. - - diff --git a/XBOBTFF/XBoxOneBTHID.h b/XBOBTFF/XBoxOneBTHID.h deleted file mode 100644 index 5ea1f812..00000000 --- a/XBOBTFF/XBoxOneBTHID.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// XBoxOneBTHID.h -// XBoxBTFF -// -// Created by C.W. Betts on 9/20/17. -// Copyright © 2017 C.W. Betts. All rights reserved. -// - -#ifndef XBoxOneBTHID_h -#define XBoxOneBTHID_h - -#include -#include - -#pragma pack(push, 1) - -typedef CF_OPTIONS(uint8_t, XBOBTActivationMask) { - XBOBTActivationMaskRightRumble = 1 << 0, - XBOBTActivationMaskLeftRumble = 1 << 1, - XBOBTActivationMaskRTRumble = 1 << 2, - XBOBTActivationMaskLTRumble = 1 << 3, -}; - -struct XboxOneBluetoothReport_t { - uint8_t reportID; //!< 0x03 - XBOBTActivationMask activationMask; - uint8_t ltMagnitude; //!< 0x00 to 0x65, 0x65 is default - uint8_t rtMagnitude; - uint8_t leftMagnitude; - uint8_t rightMagnitude; - uint8_t duration; //!< time in ms, 255 = 2.55s - uint8_t startDelay; - uint8_t loopCount; -}; - -#pragma pack(pop) - -#endif /* XBoxOneBTHID_h */ diff --git a/XboxOneBluetooth/Info.plist b/XboxOneBluetooth/Info.plist deleted file mode 100644 index e02350a1..00000000 --- a/XboxOneBluetooth/Info.plist +++ /dev/null @@ -1,62 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - KEXT - CFBundleShortVersionString - $(CURRENT_PROJECT_VERSION) - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - IOKitPersonalities - - XboxOneBluetooth - - CFBundleIdentifier - com.apple.driver.IOBluetoothHIDDriver - IOCFPlugInTypes - - F4545CE5-BF5B-11D6-A4BB-0003933E3E3E - XboxOneBluetooth.kext/Contents/PlugIns/XBOBTFF.plugin - - IOClass - IOBluetoothHIDDriver - IOProbeScore - 200 - IOProviderClass - IOBluetoothL2CAPChannel - PSM - 17 - IOKitDebug - 65535 - ProductID - 765 - VendorID - 1118 - - - NSHumanReadableCopyright - Copyright © 2016 GitHub. All rights reserved. - OSBundleLibraries - - com.apple.driver.IOBluetoothHIDDriver - 4.1.7f2 - com.apple.iokit.IOHIDFamily - 1.8.1 - com.apple.kpi.iokit - 12.5 - com.apple.kpi.libkern - 12.5 - - - diff --git a/build b/build new file mode 100755 index 00000000..65324c51 --- /dev/null +++ b/build @@ -0,0 +1,75 @@ +#!/bin/bash +zip -r ../360ControllerSource.zip * +cd Feedback360 +xcodebuild -configuration Deployment +if [ $? -ne 0 ] + then + echo "******** BUILD FAILED ********" + exit 1 +fi +cd ../DriverTool +xcodebuild -configuration Release +if [ $? -ne 0 ] + then + echo "******** BUILD FAILED ********" + exit 1 +fi +cd ../360Controller +xcodebuild -configuration Deployment +if [ $? -ne 0 ] + then + echo "******** BUILD FAILED ********" + exit 1 +fi +cd ../360Daemon +xcodebuild -configuration Release +if [ $? -ne 0 ] + then + echo "******** BUILD FAILED ********" + exit 1 +fi +cd ../WirelessGamingReceiver +xcodebuild -configuration Release +if [ $? -ne 0 ] + then + echo "******** BUILD FAILED ********" + exit 1 +fi +cd ../Wireless360Controller +xcodebuild -configuration Release +if [ $? -ne 0 ] + then + echo "******** BUILD FAILED ********" + exit 1 +fi +cd ../Pref360Control +xcodebuild -configuration Deployment +if [ $? -ne 0 ] + then + echo "******** BUILD FAILED ********" + exit 1 +fi +cd ../Install360Controller +packagesbuild -v Install360Controller.pkgproj +mv build 360ControllerInstall +hdiutil create -srcfolder 360ControllerInstall -format UDZO ../../360ControllerInstall.dmg +mv 360ControllerInstall build +cd .. +echo "** File contents **" +lipo -info 360Controller/build/Deployment/360Controller.kext/Contents/MacOS/360Controller +lipo -info 360Controller/build/Deployment/360Controller.kext/Contents/PlugIns/Feedback360.plugin/Contents/MacOS/Feedback360 +lipo -info 360Daemon/build/Release/360Daemon +lipo -info Pref360Control/build/Deployment/Pref360Control.prefPane/Contents/MacOS/Pref360Control +lipo -info Pref360Control/build/Deployment/Pref360Control.prefPane/Contents/Resources/DriverTool +lipo -info WirelessGamingReceiver/build/Release/WirelessGamingReceiver.kext/Contents/MacOS/WirelessGamingReceiver +lipo -info Wireless360Controller/build/Release/Wireless360Controller.kext/Contents/MacOS/Wireless360Controller +echo "** File signatures **" +sudo spctl -a -v 360Controller/build/Deployment/360Controller.kext +sudo spctl -a -v 360Controller/build/Deployment/360Controller.kext/Contents/PlugIns/Feedback360.plugin +sudo spctl -a -v 360Daemon/build/Release/360Daemon +sudo spctl -a -v Pref360Control/build/Deployment/Pref360Control.prefPane +sudo spctl -a -v Pref360Control/build/Deployment/Pref360Control.prefPane/Contents/Resources/DriverTool +sudo spctl -a -v WirelessGamingReceiver/build/Release/WirelessGamingReceiver.kext +sudo spctl -a -v Wireless360Controller/build/Release/Wireless360Controller.kext +sudo spctl -a -v --type install Install360Controller/build/Install360Controller.pkg +echo "*** DONE ***" diff --git a/build.sh b/build.sh deleted file mode 100755 index 4dd3b534..00000000 --- a/build.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -DEV_NAME=`echo | grep DEVELOPER_NAME DeveloperSettings.xcconfig` -DEV_TEAM=`echo | grep DEVELOPMENT_TEAM DeveloperSettings.xcconfig` -CERT_ID="${DEV_NAME//\DEVELOPER_NAME = } (${DEV_TEAM//\DEVELOPMENT_TEAM = })" - -mkdir -p build -zip -r build/360ControllerSource.zip * -x "build*" - -xcrun xcodebuild -configuration Release -target "Whole Driver" -xcconfig "DeveloperSettings.xcconfig" OTHER_CODE_SIGN_FLAGS="--timestamp --options=runtime" -if [ $? -ne 0 ] - then - echo "******** BUILD FAILED ********" - exit 1 -fi - -cd Install360Controller -packagesbuild -v Install360Controller.pkgproj --identity "Developer ID Installer: ""${CERT_ID}" -mv build 360ControllerInstall -hdiutil create -srcfolder 360ControllerInstall -fs HFS+ -format UDZO ../build/360ControllerInstall.dmg -mv 360ControllerInstall build -cd .. -echo "** File contents **" -xcrun lipo -info build/Release/360Controller.kext/Contents/MacOS/360Controller -xcrun lipo -info build/Release/360Controller.kext/Contents/PlugIns/Feedback360.plugin/Contents/MacOS/Feedback360 -xcrun lipo -info build/Release/360Daemon.app/Contents/MacOS/360Daemon -xcrun lipo -info build/Release/Pref360Control.prefPane/Contents/MacOS/Pref360Control -xcrun lipo -info build/Release/Pref360Control.prefPane/Contents/Resources/DriverTool -# xcrun lipo -info build/Release/WirelessGamingReceiver.kext/Contents/MacOS/WirelessGamingReceiver -# xcrun lipo -info build/Release/Wireless360Controller.kext/Contents/MacOS/Wireless360Controller -echo "** File signatures **" -xcrun spctl -a -v build/Release/360Controller.kext -xcrun spctl -a -v build/Release/360Controller.kext/Contents/PlugIns/Feedback360.plugin -xcrun spctl -a -v build/Release/360Daemon.app/Contents/MacOS/360Daemon -xcrun spctl -a -v build/Release/Pref360Control.prefPane -xcrun spctl -a -v build/Release/Pref360Control.prefPane/Contents/Resources/DriverTool -# xcrun spctl -a -v build/Release/WirelessGamingReceiver.kext -# xcrun spctl -a -v build/Release/Wireless360Controller.kext -xcrun spctl -a -v --type install Install360Controller/build/Install360Controller.pkg -echo "*** DONE ***" diff --git a/clean.sh b/clean.sh deleted file mode 100755 index 81149e9a..00000000 --- a/clean.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -for i in Install360Controller; do - rm -rf $i/build -done -rm -rf build -echo "Deleted build products." diff --git a/issue_template.md b/issue_template.md deleted file mode 100644 index 0d41d331..00000000 --- a/issue_template.md +++ /dev/null @@ -1,26 +0,0 @@ -### Type of Controller -Replace this text with: Original Xbox, Xbox 360, Xbox One, All or N/A - -### OS Version -Replace this text with the version of macOS that you are running - -### Driver Version -Replate this text with the version or versions of the driver that you are using or have tested - -### Connection Method -Replace this text with: Wired, Wireless Adapter, Bluetooth, N/A or more specific method if applicable - -### Device Name and Info -(If you don't know this information, please refer to the README for how to find it. Enter N/A if not applicable) ->Device Name: -
Product ID: -
Vendor ID: - -### Response of Controller -Replace this text with information on how the physical controller reacts. Does the guide button light up? Does it vibrate? Etc. - -### Response in Preference Pane -Replace this text with information about the controller's reaction in the preference pane. Does the controller appear in the preference pane? Do all of the buttons, joysticks, and triggers act as expected? - -### Detailed Explaination of Issue -Replace this text with a detailed explaination of your issue. Simply saying "it doesn't work" is a quick way to ensure that your issue is never fixed. Without detailed information on your specific issue, we cannot fix your issue. Including as much information as possible in this section increases the likelyhood of getting your issue quickly and effectively resolved.