-
Notifications
You must be signed in to change notification settings - Fork 435
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
Add Wiimote support #1563
Add Wiimote support #1563
Conversation
…en supports. "YAGNI"
…s for it that work, and thus no predictable hardware ID's. The most common use case for it is to install a tool that makes it mirror a 360, at which point the Flixel API will just think it's a 360 and neither the user nor the API will be the wiser.
analog = new FlxGamepadAnalogList(this); | ||
} | ||
|
||
public function traceAxes(f:FlxTimer):Void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These trace functions look like debug code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are, but could be useful to keep around in the API if they're not actually called... maybe? I use them all the time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meh, not sure I'm a fan of having that be part of the API... Perhaps we could have a FlxGamepad
tracker profile instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It takes five seconds to add them in when I need them, I'll just trash em.
@@ -33,6 +37,12 @@ class FlxGamepad implements IFlxDestroyable | |||
public var model(default, set):FlxGamepadModel; | |||
|
|||
/** | |||
* For gamepads that can have things plugged into them (the Wii Remote, basically). | |||
* Making the user set this helps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"helps..." what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha, I did forget to finish that didn't I.
return model; | ||
} | ||
|
||
private var t:FlxTimer = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think this is used anywhere (anymore)?
…flash on google chrome, added missing y axis inversion case for flash on windows standalone player
…flash player, not google+chrome as reported. I'm restoring to just flipping AdobeWindows and not GooglePepper so someone can try to repro and confirm.
How bout now? |
HTML5 builds are failing (see travis). |
I can't test if the whole Wiimote stuff actually works, but the API looks ok to me now (and the Xbox 360 stuff still works). Thanks! 👍 |
Does the fact that we test HTML5 in travis imply that flixel works in HTML5? If so I can hook up the gamepad ID's for that too... are there any special instructions? (I just tried and got a black screen). |
That alone just implies that it compiles.. but, yes, in general it should also work. Mode works fine for example. Getting any errors in the js console? What browser? Browsers other than Chrome have some issues atm I think. |
Cool, that's a good starting point, I'll go from there. Are we using canvas or GL, and/or what custom backend/add'l dependencies, if any? |
You shouldn't need to add anything. I think OpenFL uses canvas by default, haven't tested GL. I'm not sure Lime's gamepad API is even implemented on HTML5 right now? |
This should help with setting up gamepads for HTML5, I think: |
It's only implemented in bitfive, looks like, not openfl... |
This adds wiimote support using either the MayFlash Dolphin Bar or the HID-Wiimote driver.
Currently works and tested in flash and legacy. Does not currently work in next for some reason, but doesn't break anything, either. I think it just isn't detecting the gamepad ID for some reason.
Legacy support needs this (simple) pull request to lime to work:
openfl/lime#499