Game Controller

RSS for tag

Support hardware game controllers in your game using Game Controller.

Posts under Game Controller tag

124 Posts

Post

Replies

Boosts

Views

Activity

Controller Not Connecting on 12.3.1 Update
Hi. I've been trying to connect my Playstation controller to my MacBook on the 12.3.1 update since it said it fixed the Bluetooth issue, but it didn't fix anything for me. My controller stays connected for less than 5 seconds and then just disconnects each time. I've tried the safe boot method and it didn't help at all either.
2
0
837
Apr ’22
Game Issue
Recently i have install freefire game in iphone13 mobile and my software is updated with Ios15.4 version Issue is when i try to play my game in Ultra graphics mode it start lagging and heating issue i dont know what happen with my mobile it was running smoothly and after update the software version it start lagging. Pixel also breaking while playing the game
0
0
783
Mar ’22
XBox One Wireless Controller reported as GCMicroGamepad on Mojave
I've run into a weird problem trying to use an XBox One Wireless gamepad via the GameController SDK. The controller works fine on two different Macs running Big Sur (and previously worked under Catalina), but is reported as a GCMicroGamepad on an iMac running Mojave. I can't seem to find a list of devices supported by the GameController framework, but I assumed the XBox One controller was a safe bet. Is this device not supported on the older OS?
2
0
2k
Mar ’22
GCController not working properly when open a second ViewController
i have a problem with the GCController framework: I have 2 viewcontrollers, each of them have a button to load the other viewcontroller. First controller code: import Cocoa import GameController class ViewController: NSViewController { @IBAction func abirVc2(_ sender: Any) { if let controller = self.storyboard?.instantiateController(withIdentifier: "ViewController2") as? ViewController2 { self.view.window?.contentViewController = controller } } override func viewDidLoad() { super.viewDidLoad() startWatchingForControllers() // Do any additional setup after loading the view. } override var representedObject: Any? { didSet { // Update the view, if already loaded. } } func startWatchingForControllers() { // Subscribe for the notes let ctr = NotificationCenter.default ctr.addObserver(forName: .GCControllerDidConnect, object: nil, queue: .main) { note in if let ctrl = note.object as? GCController { self.add(ctrl) } } ctr.addObserver(forName: .GCControllerDidDisconnect, object: nil, queue: .main) { note in if let ctrl = note.object as? GCController { self.remove(ctrl) } } // and kick off discovery GCController.startWirelessControllerDiscovery(completionHandler: {}) } func stopWatchingForControllers() { GCController.stopWirelessControllerDiscovery() let ctr = NotificationCenter.default ctr.removeObserver(self, name: .GCControllerDidConnect, object: nil) ctr.removeObserver(self, name: .GCControllerDidDisconnect, object: nil) } func add(_ controller: GCController) { let name = String(describing:controller.vendorName) if let extendedGamepad = controller.extendedGamepad { print("connect extended \(name)") configureDPadButtons(extendedGamepad) //configureDiamondButtons(extendedGamepad) //configureShoulderButtons(extendedGamepad) //configureTriggers(extendedGamepad) return } else if let gamepad = controller.microGamepad { print("connect micro (name)") } else { print("Huh? (name)") } } private func configureDPadButtons(_ gamepad: GCExtendedGamepad) { gamepad.dpad.up.pressedChangedHandler = {(button, value, pressed) in if let controller = self.storyboard?.instantiateController(withIdentifier: "ViewController2") as? ViewController2 { self.view.window?.contentViewController = controller } } gamepad.dpad.down.pressedChangedHandler = {(button, value, pressed) in print("ExtendedGamepad - Down") } gamepad.dpad.left.pressedChangedHandler = {(button, value, pressed) in print("ExtendedGamepad - Left") } gamepad.dpad.right.pressedChangedHandler = {(button, value, pressed) in print("ExtendedGamepad - Right") } } func remove(_ controller: GCController) { } } Second Controller code: import Cocoa class ViewController2: NSViewController { @IBAction func abrirHomeView(_ sender: Any) { if let controller = self.storyboard?.instantiateController(withIdentifier: "HomeView") as? ViewController { self.view.window?.contentViewController = controller } } override func viewDidLoad() { super.viewDidLoad() // Do view setup here. } } On the first controller i press the button to load the second, and then press the second viewcontroller´s button to return to the first one. And it works everytime I press the buttons. Then i use the GamePad´s Up arrow to load viewController 2, it loads correctly, then i use the button on second viewcontroller to return to first controller, ok it works too, but if i use the GamePad´s up button to load the second controller again, it does not do anything... It seems that function that handles the GamePad Up arrow can´t load again the second viewController. I used a simple project to make the test and it´s simple as this, 2 view controllers with one button each... I don´t know what is happening... Thanks in advance
2
0
1.6k
Feb ’22
Xbox Controller connected but no input
Hi, in Swift Playgrounds on my iPad I can see my Xbox controller. I can access its vendorName and it's recognized as an extendedGamepad. However the valueChangedHandler I assigned is never called. I tried both in code/preview mode and when starting the app separately via the play button. Is this not possible in playgrounds or is there something I am missing?
1
0
1.1k
Feb ’22
tvOS apps rejected from App Store
Ohai everyone, I am the developer of Stress Ball Breaker, a little breakout game. The three versions are compatible with game controllers, these are required on the tvOS version and remain optional on others versions. The game is available on the App Store for iOS, macOS and tvOS. On Wednesday, I have submitted an update on the App Store. The iOS and macOS versions were quickly accepted, but the tvOS version was suddenly rejected. Previous builds were accepted without any problem. The build was "out of compliance with Guideline 2.1 - Performance - App Completeness", because my app would not respond when user attempts to start game. When I'm testing it on my Apple TV and a game controller connected to it, everything works like a charm. The game controller I am using is a Nimbus Steelseries controller and is MFI-compliant. I have submitted two more builds of the tvOS version with little changes (I have made game controllers working on tvOS simulator). Both builds were rejected too. Now, I am asked to provide additional informations and to "update my plist to include the appropriate External Protocols for the associated MFi accessory. Accessories that use an External Accessory protocol [...] must complete the MFi self-certification process, under the MFi Program". I am also asked to join the MFI program, as if my app was only compatible with a custom game controller of which I would be the manufacturer! My app uses the GameController framework, which is part of the public APIs, so my app can use any Bluetooth gamepad connected to an iPhone, iPad, MacBook or Apple TV. The only thing I have to do is to check the "Extended Gamepad" option on Xcode under the "Signing and Capabilities" tab in my project settings. That's all! I don't know why my app is rejected. I have submitted an appeal, which was closed. The App Store Review requests additional information I can't provide! I don't see any other solution than to cancel my app submission and to remove the tvOS version from the App Store, because future builds will be probably rejected for the same reason. Can someone help me to solve this issue? Thanks in advance! Best regards, Frédéric
0
0
958
Feb ’22
Guided access issue
after the last update was done every time I'm activating guided access a white line mark is appearing in the middle of the display and touch is not working properly in that particular area.what to do to fix it ?please help.
0
0
945
Feb ’22
Bluetooth low energy HID device is invalid on iOS 13.4 or iOS 13.5
Brand name: The HID device controller Bluetooth low energy(BLE) HID device is invalid on iOS 13.4 or iOS 13.5, details:Now we find The BLE HID device controller can't work on iOS 13.4 or iOS 13.5, but it's ok on iOS 13.3.1 and below. The HID device controller is a bluetooth low energy(BLE) HID device. It is work well on windows 10 and Android system and iOS 13.3.1 and below, but all are no function on iOS 13.4 or iOS 13.5, please fix it, Thank you! Please open the URL: https://file.qixiongfiles.cn/videodemo.mp4, to watch the video The stylus device BLE HID report descriptor: 0x05, 0x0d, // USAGE_PAGE (Digitizers) 0x09, 0x01, // USAGE (Digitizer) 0xa1, 0x01, // COLLECTION (Application) 0x85, 0x01, // REPORT_ID (Touch) 0x05, 0x0d, // USAGE_PAGE (Digitizers) 0x09, 0x20, // USAGE (stylus) 0xa1, 0x02, // COLLECTION (Logical) 0x09, 0x42, // USAGE (Tip Switch) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x09, 0x32, // USAGE (In Range) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x95, 0x02, // REPORT_COUNT (2) 0x81, 0x01, // INPUT (Cnst,Ary,Abs) 0x75, 0x04, // REPORT_SIZE (4) 0x09, 0x51, // USAGE ( Contact Identifier) 0x25, 0x0f, // LOGICAL_MAXIMUM (255) 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x05, 0x01, // USAGE_PAGE (Generic Desk) 0x16, 0x00,0x00, //HID_LogicalMinS (0) 0x26, (0xcA8&0xff), (0xcA8>>8), // LOGICAL_MAXIMUM 0x75, 16, // REPORT_SIZE (16) 0x55, 0x00, // UNIT_EXPONENT (0) 0x65, 0x00, // UNIT (00) 0x09, 0x30, // USAGE (X) 0x36, 0x00,0x00, // PHYSICAL_MINIMUM (0) 0x46, (0xcA8&0xff), (0xcA8>>8), // PHYSICAL_MAXIMUM 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x26, (0x1680&0xff), (0x1680>>8), // LOGICAL_MAXIMUM 0x46, (0x1680&0xff), (0x1680>>8), // PHYSICAL_MAXIMUM 0x09, 0x31, // USAGE (Y) 0x81, 0x02, // INPUT (Data,Var,Abs) 0xc0, // END_COLLECTION 0x85, 0x02, // REPORT_ID (Feature) 0x75, 0x08, // REPORT_SIZE (8) 0x95, 0x01, // REPORT_COUNT (1) 0x15, 0x01, // LOGICAL_MINIMUM (1) 0x25, 0x08, // LOGICAL_MAXIMUM (8) 0x09, 0x55, // USAGE(Maximum Count) 0xB1, 0x02, // FEATURE (Data,Var,Abs) 0xc0, // END_COLLECTION
0
0
1.2k
Jan ’22
GCVirtualController -- Left elements do not appear when using portrait mode
I'm trying to use GCVirtualController in an app and am running into an apparent bug when trying to use it in portrait mode. If I create "left side" and "right side" elements such as a left analog stick and right analog stick, things appear as expected when in landscape mode. When I switch to portrait mode only the right side elements appear. This doesn't appear to be a documented limitation and I'd like to be able to use the GCVirtualController in both orientations. Any advice? Is this just a bug or an intentional design limitation.
0
0
666
Dec ’21
GCVirtualController -- Unable to customize appearance of analog sticks with a custom UIBezierPath
GCVirtualController supports setting a UIBezierPath for configuring controller elements. This seems to work fine for things like A/B/X/Y buttons but it seems to be silently ignored when trying to set against the analog stick elements. This doesn't seem to be a documented limitation. Is this just a bug in GCVirtualController or an intentional limitation?
0
0
973
Dec ’21
GCMouseInput mouseMovedHandler called only after scroll
Hi, I'm my game I'm using GCController to check for inputs, I have the following handlers set for when the current mouse changes override func mouseDidBecomeCurrent(_ mouse: GCMouse) {         guard let mouseInput = mouse.mouseInput else { return }         mouseInput.mouseMovedHandler = { (input, deltaX, deltaY) in             print("x: \(deltaX), y: \(deltaY), mouse: \(input.leftButton.isPressed)")             if (input.leftButton.isPressed) {                 let delta: SIMD2<Float> = [deltaX, deltaY]                 self.cameraManager.current.rotate(delta: delta)             }         }               mouseInput.scroll.valueChangedHandler = { (dpad, deltaX, deltaY) in             print(dpad)             self.cameraManager.current.zoom(delta: deltaY)         }     } override func mouseStopBeingCurrent(_ mouse: GCMouse {     guard let mouseInput = mouse.mouseInput else { return }     mouseInput.mouseMovedHandler = nil     mouseInput.scroll.valueChangedHandler = nil } I receive move mouse events as expected but .leftButton.isPressed on my input is always false until I scroll my trackpad. I'm also tracking mouse movements in view controller so I get the mouse position on screen and not just the deltas. let trackingArea = NSTrackingArea(rect: metalView.bounds, options: [.activeWhenFirstResponder, .mouseMoved, .enabledDuringMouseDrag], owner: self, userInfo: nil) metalView.addTrackingArea(trackingArea) Can the tracker cause this type of conflict?
3
0
1.1k
Dec ’21
Matching GCController and IOHIDDeviceRef
Hello!I encountered a problem in my OS X app. I'm using both IOKit HID devices and GameController.framework devices.Problem is, all GCController devices have HID devices, and I didn't find any way of matching them.So, here are questions:1. Is there a way to say "this IOHIDDeviceRef device is MFi controller which would be handled by GameController.framework"?2. This GCController and IOHIDDeviceRef object refer to same physical controller and I can ignore/blacklist one of them in my code to avoid duplicationsN.B.There is [GCController deviceRef] field. In fact it is IOHIDDeviceRef, so I can get their IOHIDDeviceGetService and then IORegistryEntryGetRegistryEntryID to see if they're same connected device.Problem is - deviceRef is a private field. I'm not sure if I can use it when submitting app to App Store
2
0
1.7k
Dec ’21
GCMouse mouse-moved handler is never called on macOS Big Sur, but works on Monterey
Using the GameController framework to receive raw mouse-movement input does not work for me on an Intel Mac with Big Sur. I can replicate it by simply creating a new Swift application in Xcode and modifying the AppDelegate like this: func applicationDidFinishLaunching(_ aNotification: Notification) { NotificationCenter.default.addObserver(forName: .GCMouseDidConnect, object: nil, queue: nil) { note in let mouse = note.object as? GCMouse mouse?.mouseInput?.mouseMovedHandler = { mouseInput, deltaX, deltaY in NSLog("%1.1f|%1.1f", deltaX, deltaY) } } } While the GCMouseDidConnect notification will be received, the mouseMovedHandler code will never be called on my Mac mini 2018 with macOS 11.6, but the same code will run perfectly fine on my Apple Silicon MacBook Pro with macOS 12.0.1. I couldn't find anything about why this code won't work looking it up, the whole topic of mouse input via the GameController framework seems to be not much talked about. Before filing a bug report I wanted to make sure that the problem isn't on my side. With code that simple, I just can't find anything I might be missing.
1
0
840
Dec ’21
GCControllerDidConnect/GCControllerDidDisconnect notifications don't work in a Playground
The following code does not work in an Xcode Playgrounds or the Swift Playgrounds App on iOS oder macOS. But the same code works when used in an app. Does anyone know how to get the notifications running in a Playground? import GameController import Combine import SwiftUI import PlaygroundSupport PlaygroundPage.current.needsIndefiniteExecution = true var cancellables = Set<AnyCancellable>() NotificationCenter.default.publisher(for: NSNotification.Name.GCControllerDidConnect) .subscribe(on:DispatchQueue.global())     .print()     .receive(on: DispatchQueue.main)     .sink { notification in         print(notification)     }.store(in: &cancellables) let disConnect = NotificationCenter.default.publisher(for: NSNotification.Name.GCControllerDidDisconnect)     .print()     .subscribe(on:DispatchQueue.global())     .receive(on: DispatchQueue.main)     .sink { value in         print(value)     }.store(in: &cancellables)
1
1
1.3k
Nov ’21
tvos 15 - Siri Remote not returning in the array: GCController.controllers()
in swiftUI & tvOS 15, when calling the GCController.controllers() to get the list of controllers connected to the apple tv, import GameController ... let siriRemoteAsGameController = GCController.controllers().first the Siri Remote is not registered as the first controller, in fact it is not registered at all ! up until tvOS 15 (14.7 for example) it was working even if i register for notification the connect event isn't dispatched for the already connected Siri remote NotificationCenter.default.addObserver(forName: .GCControllerDidConnect, object: nil, queue: .main) { note in print("GCControllerDidConnect") if let detectedGCController = note.object as? GCController { print("Controller Detected") } } GCController.startWirelessControllerDiscovery(completionHandler: {}) i cannot find a change in that area according to Appel's $#itty documentation any help would be appreciated
3
0
1.7k
Oct ’21
iOS device to control
What's new about iOS device controlling your environment and my personal interest 3d printer.
Replies
0
Boosts
0
Views
879
Activity
May ’22
Controller Not Connecting on 12.3.1 Update
Hi. I've been trying to connect my Playstation controller to my MacBook on the 12.3.1 update since it said it fixed the Bluetooth issue, but it didn't fix anything for me. My controller stays connected for less than 5 seconds and then just disconnects each time. I've tried the safe boot method and it didn't help at all either.
Replies
2
Boosts
0
Views
837
Activity
Apr ’22
Game Issue
Recently i have install freefire game in iphone13 mobile and my software is updated with Ios15.4 version Issue is when i try to play my game in Ultra graphics mode it start lagging and heating issue i dont know what happen with my mobile it was running smoothly and after update the software version it start lagging. Pixel also breaking while playing the game
Replies
0
Boosts
0
Views
783
Activity
Mar ’22
XBox One Wireless Controller reported as GCMicroGamepad on Mojave
I've run into a weird problem trying to use an XBox One Wireless gamepad via the GameController SDK. The controller works fine on two different Macs running Big Sur (and previously worked under Catalina), but is reported as a GCMicroGamepad on an iMac running Mojave. I can't seem to find a list of devices supported by the GameController framework, but I assumed the XBox One controller was a safe bet. Is this device not supported on the older OS?
Replies
2
Boosts
0
Views
2k
Activity
Mar ’22
How to add GameController support into macOS app
it seems like I have the option only for iOS apps by "+Capability" is it able to add GameController support some how for macOS app?
Replies
1
Boosts
0
Views
1k
Activity
Feb ’22
GCController not working properly when open a second ViewController
i have a problem with the GCController framework: I have 2 viewcontrollers, each of them have a button to load the other viewcontroller. First controller code: import Cocoa import GameController class ViewController: NSViewController { @IBAction func abirVc2(_ sender: Any) { if let controller = self.storyboard?.instantiateController(withIdentifier: "ViewController2") as? ViewController2 { self.view.window?.contentViewController = controller } } override func viewDidLoad() { super.viewDidLoad() startWatchingForControllers() // Do any additional setup after loading the view. } override var representedObject: Any? { didSet { // Update the view, if already loaded. } } func startWatchingForControllers() { // Subscribe for the notes let ctr = NotificationCenter.default ctr.addObserver(forName: .GCControllerDidConnect, object: nil, queue: .main) { note in if let ctrl = note.object as? GCController { self.add(ctrl) } } ctr.addObserver(forName: .GCControllerDidDisconnect, object: nil, queue: .main) { note in if let ctrl = note.object as? GCController { self.remove(ctrl) } } // and kick off discovery GCController.startWirelessControllerDiscovery(completionHandler: {}) } func stopWatchingForControllers() { GCController.stopWirelessControllerDiscovery() let ctr = NotificationCenter.default ctr.removeObserver(self, name: .GCControllerDidConnect, object: nil) ctr.removeObserver(self, name: .GCControllerDidDisconnect, object: nil) } func add(_ controller: GCController) { let name = String(describing:controller.vendorName) if let extendedGamepad = controller.extendedGamepad { print("connect extended \(name)") configureDPadButtons(extendedGamepad) //configureDiamondButtons(extendedGamepad) //configureShoulderButtons(extendedGamepad) //configureTriggers(extendedGamepad) return } else if let gamepad = controller.microGamepad { print("connect micro (name)") } else { print("Huh? (name)") } } private func configureDPadButtons(_ gamepad: GCExtendedGamepad) { gamepad.dpad.up.pressedChangedHandler = {(button, value, pressed) in if let controller = self.storyboard?.instantiateController(withIdentifier: "ViewController2") as? ViewController2 { self.view.window?.contentViewController = controller } } gamepad.dpad.down.pressedChangedHandler = {(button, value, pressed) in print("ExtendedGamepad - Down") } gamepad.dpad.left.pressedChangedHandler = {(button, value, pressed) in print("ExtendedGamepad - Left") } gamepad.dpad.right.pressedChangedHandler = {(button, value, pressed) in print("ExtendedGamepad - Right") } } func remove(_ controller: GCController) { } } Second Controller code: import Cocoa class ViewController2: NSViewController { @IBAction func abrirHomeView(_ sender: Any) { if let controller = self.storyboard?.instantiateController(withIdentifier: "HomeView") as? ViewController { self.view.window?.contentViewController = controller } } override func viewDidLoad() { super.viewDidLoad() // Do view setup here. } } On the first controller i press the button to load the second, and then press the second viewcontroller´s button to return to the first one. And it works everytime I press the buttons. Then i use the GamePad´s Up arrow to load viewController 2, it loads correctly, then i use the button on second viewcontroller to return to first controller, ok it works too, but if i use the GamePad´s up button to load the second controller again, it does not do anything... It seems that function that handles the GamePad Up arrow can´t load again the second viewController. I used a simple project to make the test and it´s simple as this, 2 view controllers with one button each... I don´t know what is happening... Thanks in advance
Replies
2
Boosts
0
Views
1.6k
Activity
Feb ’22
Xbox Controller connected but no input
Hi, in Swift Playgrounds on my iPad I can see my Xbox controller. I can access its vendorName and it's recognized as an extendedGamepad. However the valueChangedHandler I assigned is never called. I tried both in code/preview mode and when starting the app separately via the play button. Is this not possible in playgrounds or is there something I am missing?
Replies
1
Boosts
0
Views
1.1k
Activity
Feb ’22
tvOS apps rejected from App Store
Ohai everyone, I am the developer of Stress Ball Breaker, a little breakout game. The three versions are compatible with game controllers, these are required on the tvOS version and remain optional on others versions. The game is available on the App Store for iOS, macOS and tvOS. On Wednesday, I have submitted an update on the App Store. The iOS and macOS versions were quickly accepted, but the tvOS version was suddenly rejected. Previous builds were accepted without any problem. The build was "out of compliance with Guideline 2.1 - Performance - App Completeness", because my app would not respond when user attempts to start game. When I'm testing it on my Apple TV and a game controller connected to it, everything works like a charm. The game controller I am using is a Nimbus Steelseries controller and is MFI-compliant. I have submitted two more builds of the tvOS version with little changes (I have made game controllers working on tvOS simulator). Both builds were rejected too. Now, I am asked to provide additional informations and to "update my plist to include the appropriate External Protocols for the associated MFi accessory. Accessories that use an External Accessory protocol [...] must complete the MFi self-certification process, under the MFi Program". I am also asked to join the MFI program, as if my app was only compatible with a custom game controller of which I would be the manufacturer! My app uses the GameController framework, which is part of the public APIs, so my app can use any Bluetooth gamepad connected to an iPhone, iPad, MacBook or Apple TV. The only thing I have to do is to check the "Extended Gamepad" option on Xcode under the "Signing and Capabilities" tab in my project settings. That's all! I don't know why my app is rejected. I have submitted an appeal, which was closed. The App Store Review requests additional information I can't provide! I don't see any other solution than to cancel my app submission and to remove the tvOS version from the App Store, because future builds will be probably rejected for the same reason. Can someone help me to solve this issue? Thanks in advance! Best regards, Frédéric
Replies
0
Boosts
0
Views
958
Activity
Feb ’22
Guided access issue
after the last update was done every time I'm activating guided access a white line mark is appearing in the middle of the display and touch is not working properly in that particular area.what to do to fix it ?please help.
Replies
0
Boosts
0
Views
945
Activity
Feb ’22
Bluetooth low energy HID device is invalid on iOS 13.4 or iOS 13.5
Brand name: The HID device controller Bluetooth low energy(BLE) HID device is invalid on iOS 13.4 or iOS 13.5, details:Now we find The BLE HID device controller can't work on iOS 13.4 or iOS 13.5, but it's ok on iOS 13.3.1 and below. The HID device controller is a bluetooth low energy(BLE) HID device. It is work well on windows 10 and Android system and iOS 13.3.1 and below, but all are no function on iOS 13.4 or iOS 13.5, please fix it, Thank you! Please open the URL: https://file.qixiongfiles.cn/videodemo.mp4, to watch the video The stylus device BLE HID report descriptor: 0x05, 0x0d, // USAGE_PAGE (Digitizers) 0x09, 0x01, // USAGE (Digitizer) 0xa1, 0x01, // COLLECTION (Application) 0x85, 0x01, // REPORT_ID (Touch) 0x05, 0x0d, // USAGE_PAGE (Digitizers) 0x09, 0x20, // USAGE (stylus) 0xa1, 0x02, // COLLECTION (Logical) 0x09, 0x42, // USAGE (Tip Switch) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x09, 0x32, // USAGE (In Range) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x95, 0x02, // REPORT_COUNT (2) 0x81, 0x01, // INPUT (Cnst,Ary,Abs) 0x75, 0x04, // REPORT_SIZE (4) 0x09, 0x51, // USAGE ( Contact Identifier) 0x25, 0x0f, // LOGICAL_MAXIMUM (255) 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x05, 0x01, // USAGE_PAGE (Generic Desk) 0x16, 0x00,0x00, //HID_LogicalMinS (0) 0x26, (0xcA8&0xff), (0xcA8>>8), // LOGICAL_MAXIMUM 0x75, 16, // REPORT_SIZE (16) 0x55, 0x00, // UNIT_EXPONENT (0) 0x65, 0x00, // UNIT (00) 0x09, 0x30, // USAGE (X) 0x36, 0x00,0x00, // PHYSICAL_MINIMUM (0) 0x46, (0xcA8&0xff), (0xcA8>>8), // PHYSICAL_MAXIMUM 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x26, (0x1680&0xff), (0x1680>>8), // LOGICAL_MAXIMUM 0x46, (0x1680&0xff), (0x1680>>8), // PHYSICAL_MAXIMUM 0x09, 0x31, // USAGE (Y) 0x81, 0x02, // INPUT (Data,Var,Abs) 0xc0, // END_COLLECTION 0x85, 0x02, // REPORT_ID (Feature) 0x75, 0x08, // REPORT_SIZE (8) 0x95, 0x01, // REPORT_COUNT (1) 0x15, 0x01, // LOGICAL_MINIMUM (1) 0x25, 0x08, // LOGICAL_MAXIMUM (8) 0x09, 0x55, // USAGE(Maximum Count) 0xB1, 0x02, // FEATURE (Data,Var,Abs) 0xc0, // END_COLLECTION
Replies
0
Boosts
0
Views
1.2k
Activity
Jan ’22
Iphone 12
My new iphone 12 128gb variant is not functioning properly, i experience frame drops while plaing pubg mobile. Is there a way to fix this ?
Replies
2
Boosts
0
Views
1k
Activity
Jan ’22
GCVirtualController -- Left elements do not appear when using portrait mode
I'm trying to use GCVirtualController in an app and am running into an apparent bug when trying to use it in portrait mode. If I create "left side" and "right side" elements such as a left analog stick and right analog stick, things appear as expected when in landscape mode. When I switch to portrait mode only the right side elements appear. This doesn't appear to be a documented limitation and I'd like to be able to use the GCVirtualController in both orientations. Any advice? Is this just a bug or an intentional design limitation.
Replies
0
Boosts
0
Views
666
Activity
Dec ’21
GCVirtualController -- Unable to customize appearance of analog sticks with a custom UIBezierPath
GCVirtualController supports setting a UIBezierPath for configuring controller elements. This seems to work fine for things like A/B/X/Y buttons but it seems to be silently ignored when trying to set against the analog stick elements. This doesn't seem to be a documented limitation. Is this just a bug in GCVirtualController or an intentional limitation?
Replies
0
Boosts
0
Views
973
Activity
Dec ’21
GCMouseInput mouseMovedHandler called only after scroll
Hi, I'm my game I'm using GCController to check for inputs, I have the following handlers set for when the current mouse changes override func mouseDidBecomeCurrent(_ mouse: GCMouse) {         guard let mouseInput = mouse.mouseInput else { return }         mouseInput.mouseMovedHandler = { (input, deltaX, deltaY) in             print("x: \(deltaX), y: \(deltaY), mouse: \(input.leftButton.isPressed)")             if (input.leftButton.isPressed) {                 let delta: SIMD2<Float> = [deltaX, deltaY]                 self.cameraManager.current.rotate(delta: delta)             }         }               mouseInput.scroll.valueChangedHandler = { (dpad, deltaX, deltaY) in             print(dpad)             self.cameraManager.current.zoom(delta: deltaY)         }     } override func mouseStopBeingCurrent(_ mouse: GCMouse {     guard let mouseInput = mouse.mouseInput else { return }     mouseInput.mouseMovedHandler = nil     mouseInput.scroll.valueChangedHandler = nil } I receive move mouse events as expected but .leftButton.isPressed on my input is always false until I scroll my trackpad. I'm also tracking mouse movements in view controller so I get the mouse position on screen and not just the deltas. let trackingArea = NSTrackingArea(rect: metalView.bounds, options: [.activeWhenFirstResponder, .mouseMoved, .enabledDuringMouseDrag], owner: self, userInfo: nil) metalView.addTrackingArea(trackingArea) Can the tracker cause this type of conflict?
Replies
3
Boosts
0
Views
1.1k
Activity
Dec ’21
Matching GCController and IOHIDDeviceRef
Hello!I encountered a problem in my OS X app. I'm using both IOKit HID devices and GameController.framework devices.Problem is, all GCController devices have HID devices, and I didn't find any way of matching them.So, here are questions:1. Is there a way to say "this IOHIDDeviceRef device is MFi controller which would be handled by GameController.framework"?2. This GCController and IOHIDDeviceRef object refer to same physical controller and I can ignore/blacklist one of them in my code to avoid duplicationsN.B.There is [GCController deviceRef] field. In fact it is IOHIDDeviceRef, so I can get their IOHIDDeviceGetService and then IORegistryEntryGetRegistryEntryID to see if they're same connected device.Problem is - deviceRef is a private field. I'm not sure if I can use it when submitting app to App Store
Replies
2
Boosts
0
Views
1.7k
Activity
Dec ’21
GCMouse mouse-moved handler is never called on macOS Big Sur, but works on Monterey
Using the GameController framework to receive raw mouse-movement input does not work for me on an Intel Mac with Big Sur. I can replicate it by simply creating a new Swift application in Xcode and modifying the AppDelegate like this: func applicationDidFinishLaunching(_ aNotification: Notification) { NotificationCenter.default.addObserver(forName: .GCMouseDidConnect, object: nil, queue: nil) { note in let mouse = note.object as? GCMouse mouse?.mouseInput?.mouseMovedHandler = { mouseInput, deltaX, deltaY in NSLog("%1.1f|%1.1f", deltaX, deltaY) } } } While the GCMouseDidConnect notification will be received, the mouseMovedHandler code will never be called on my Mac mini 2018 with macOS 11.6, but the same code will run perfectly fine on my Apple Silicon MacBook Pro with macOS 12.0.1. I couldn't find anything about why this code won't work looking it up, the whole topic of mouse input via the GameController framework seems to be not much talked about. Before filing a bug report I wanted to make sure that the problem isn't on my side. With code that simple, I just can't find anything I might be missing.
Replies
1
Boosts
0
Views
840
Activity
Dec ’21
GCControllerDidConnect/GCControllerDidDisconnect notifications don't work in a Playground
The following code does not work in an Xcode Playgrounds or the Swift Playgrounds App on iOS oder macOS. But the same code works when used in an app. Does anyone know how to get the notifications running in a Playground? import GameController import Combine import SwiftUI import PlaygroundSupport PlaygroundPage.current.needsIndefiniteExecution = true var cancellables = Set<AnyCancellable>() NotificationCenter.default.publisher(for: NSNotification.Name.GCControllerDidConnect) .subscribe(on:DispatchQueue.global())     .print()     .receive(on: DispatchQueue.main)     .sink { notification in         print(notification)     }.store(in: &cancellables) let disConnect = NotificationCenter.default.publisher(for: NSNotification.Name.GCControllerDidDisconnect)     .print()     .subscribe(on:DispatchQueue.global())     .receive(on: DispatchQueue.main)     .sink { value in         print(value)     }.store(in: &cancellables)
Replies
1
Boosts
1
Views
1.3k
Activity
Nov ’21
Sony PS3/Dual Shock 3 controller support broken in Monterrey
My App has lots its support for this controller it seems. Has Sony PS3/Dual Shock 3 support officially been removed from Monterrey?
Replies
1
Boosts
0
Views
643
Activity
Oct ’21
tvos 15 - Siri Remote not returning in the array: GCController.controllers()
in swiftUI & tvOS 15, when calling the GCController.controllers() to get the list of controllers connected to the apple tv, import GameController ... let siriRemoteAsGameController = GCController.controllers().first the Siri Remote is not registered as the first controller, in fact it is not registered at all ! up until tvOS 15 (14.7 for example) it was working even if i register for notification the connect event isn't dispatched for the already connected Siri remote NotificationCenter.default.addObserver(forName: .GCControllerDidConnect, object: nil, queue: .main) { note in print("GCControllerDidConnect") if let detectedGCController = note.object as? GCController { print("Controller Detected") } } GCController.startWirelessControllerDiscovery(completionHandler: {}) i cannot find a change in that area according to Appel's $#itty documentation any help would be appreciated
Replies
3
Boosts
0
Views
1.7k
Activity
Oct ’21
Glitch in Pubg sound
Hi, when I turn on my mic my speaker volume is low and I cannot hear any game sounds . This happened since I updated to iOS 14 . Can anyone help me with how to solve this issue.
Replies
7
Boosts
0
Views
5.1k
Activity
Oct ’21