![]() |
|
Questions about GameCube Controller Input on OS X - Printable Version +- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org) +-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support) +--- Forum: Development Discussion (https://forums.dolphin-emu.org/Forum-development-discussion) +--- Thread: Questions about GameCube Controller Input on OS X (/Thread-questions-about-gamecube-controller-input-on-os-x) |
Questions about GameCube Controller Input on OS X - steelphantom - 02-05-2016 Hi guys, I am running into an issue where my the dpad of my controller (Nyko Airflo EX) is not mapping correctly and I'm trying to narrow down where the controls are being mapped so I can debug what is going wrong. Basically what's happening is that if I hit "up" on the dpad, it is registering as "right" which throws everything off. I found some relevant stuff in ControllerInterface.cpp, namely the Detect method (https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp#L207), which is firing every time I update an input on the controller config screen, but I'm not sure where the code is that handles the mapping. I'm just debugging old school style on OS X by outputting logging statements to a file. I'm sure there is a better way, but I've never worked with Dolphin before and rarely work with C++, so I don't know the best way to handle debugging. Anyway, any help/hints are appreciated. Thanks! RE: Questions about GameCube Controller Input on OS X - steelphantom - 02-05-2016 @Neui — thanks, but actually I am trying to map a GameCube controller. I figured it out: in OSXJoystick.mm: https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm#L227 The default state of my hats is 0, which theGetState() method is treating as "up" and as a result an actual press on the up hat is then pushed down to the up || right case, causing the hat to get mapped as "right". I modified the code to check for 1/up, 3/right, 5/down, 7/left and it appears to work correctly. I'm going to comment on my issue in the issue tracker and see if I can figure out how we can resolve this issue the correct way without this hack! RE: Questions about GameCube Controller Input on OS X - Qaazavaca Qaanic - 02-06-2016 so what happened here? |