-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xbox One Controller not working on MacOS cpp builds #3197
Comments
Are all of your tests done via bluetooth or did you also try physically connecting them? I wanna say in the past I've had trouble using controllers on my mac with BT even outside of flixel testing and also on my browser, I'll give the suite a try. I don't have an xbox controller but I have PS4 and Switch Pro controllers. This is likely something that will need to be fixed in lime, but its never a bad idea to start here Edit: I'm not familiar with running SDL projects, should I be using Xcode directly for that? |
@Geokureli Hi! I was not able to get either Xbox or Xbox Elite controller working at all in wired usb mode (I even installed the open source drives that I used to use https://github.com/360Controller/360Controller, but it didn't make a difference). All the (slightly older versions of the tests I used yesterday) failed on MacOS. On Windows in my main project I haven't had any problems with wired Xbox controllers (nor with my wired 8BitDo controller). I just tried the 8BitDo controller in wireless mode and it looks to work wirelessly. It is detected by MacOS as a gamepad: And here are the test results:
(note, I accidentally ran the SO tests with Steam running in the background, which technically breaks my protocol, but my controller just ran out of battery...)
Should I just duplicate the bug report to lime? I could remove the flixel-specific examples to save them some effort. |
I used Xcode (which I'm also not so familiar with anymore) - I had followed the http://lazyfoo.net tutorial - it should be a case of opening up the linked .xcodeproj file and hitting build. However, maybe I've messed things up slightly and Xcode has some global paths set or the like. To help verify that things are okay, the opened project should have this structure in XCode (I guess the products folder only appears when you actually do a build). I'm very happy to try prepare a different SDL build if you can specific a different process/set of build tools you'd prefer! |
Thanks for having a look! Hmm, given your test results, and my test results, I wonder if it's to do with controller mappings (SDL_gamecontrollerdb.h). I couldn't find lime 8.1.2 on GitHub, but lime 8.2.0-dev relies on SDL 2.0.12 according to this page, released on 11.03.2020. I see then this issue, Added mapping for Xbox One S controller with newer firmware on macOS - submitted to the SDL 2.0.22 release branch (there are of course more recent bugs relating to xbox controllers and MacOS). I think SDL loads controller mappings of its own, but lime loads some here: In the lime test, I tried calling this at the start of Main::init() to load the most recent mappings:
But it doesn't make a difference. (I also tried moving it to before Main::new's call to super, in case you have to call it very early, but that made no difference). I also tried with lines 1072-1096 from the SDL_GameControllerDB file, but it didn't work either. ====
They had very diverse and somewhat confusing results in early and more informal tests (though the Xbox Elite had the same behaviour as the regular Xbox one controller). For the bug report I wanted to focus on one controller and be really certain I wasn't talking nonsense. But now I have a protocol established I can try them again. Indeed, see the 8BitDo results in a comment above - it works fine wirelessly on Mac. The PS controller is a friend's. I'll try at the next possibility, and report back (probably within the next week :) ). |
Checking out a PS5 controller in bluetooth-mode:
(Doubting my sanity, I double checked and the 8BitDo bluetooth controller I tried before still works in the bluetooth test cases where the PS5 controller fails... ). Checking it out when it's plugged in via a cable:
@Geokureli You're on MacOS Somona (V14) right? x86 or ARM? I don't think I've done too much violence to my operating system that I'd expect to have different results for the same hardware. 😅 |
Ventura 13.6.7 x86 (intel is x86, right?) I'm away from home for the next 2 weeks and i wasn't able to borrow a friend's xbox controller, plus it was a 360 controller, anyway. I may just buy one and return it, if the policy allows it |
(I'm more than happy to sponsor the purchase of an xbox controller if you like - just email me the amount at [email protected] :) ) |
Version/Build: information (checked for all listed platforms):
Brief description:
Controller support isn't working for me for cpp flixel builds on MacOS (ok in browser). Works on windows fine.
Long description:
I have made five test programs as part of trying to verify this bug:
FLIX - FlixelControllerTest ( Uses FlxGamepad. Opens the Flixel debugger at launch and logs when the left stick is moved or the a button is pressed ).
LIME - LimeControllerTest ( Uses lime.ui.Gamepad. This traces all controller events to the console ).
SDL - SDL_Test (C example with SDL2. Visualises input in a window, and outputs to console. Should be further along the dependency chain still I think. It only runs for me from within xcode 🤷 ).
JS - JsWebExample (basic html/js Controller-API example, displays all inputs in browser window ).
DC - Dead Cells (I just wanted a Haxe example in a different engine, in this case Dead Cells, that is made with heaps.io - I briefly tried but wasn't able to get https://heaps.io/samples/pad.html compiling on my computer).
Source Code:
The source code for FLIX/LIME/SDL/JS examples is in this repo:
https://github.com/increpare/ControllerBugTestSuite
For reference, because it pertains the most, here's the core of the Flixel source code example:
Testing
I test them on the following platforms:
I test them with the following builds:
Setup:
Results
Firstly, the results on windows, where everything should work (Y=controller input works, N = controller input doesn't work):
Then on my MacBook
Then on my friend's MacBook (Macs are so weird with permissions it was worth double-checking on another computer for differences)
The text was updated successfully, but these errors were encountered: