-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Gamepads are not detected on deployed game projects #1848
Comments
Update - I have tested Slayer Knight ( https://andrewandrepowell.itch.io/slayer-knight-playground ) and I have the same problems - gamepad is not detected in chrome or firefox, but works fine in Edge. |
This may be related to plugins on Chrome. I uninstalled most of my plugins and I was able to get a connected gamepad - at least, I was getting something I didn't get before - an exception. I think that the exception is an unrelated issue, but it is preventing me from testing with this Xbox360 gamepad that I have. For reference, the issue is: I was able to get this exception to happen by uninstalling plugins/disabling plugins. This is what I have enabled (notice most are disabled): Another user was able to get gamepads working, these are the plugins they had enabled: |
I can no longer reproduce the issue in chrome; however, I can reproduce the issue that @mfigueirido posted above in Firefox. I believe the two issues that I had (chrome and Firefox) might be unrelated. I can also see the gamepad array using the same code: |
I've tested it with two xbox360 controllers. Both worked on Chrome without making any changes. For the issue in firefox, does it fire the gamepadConnected event? it's in window.js, place a break point there and connect/disconnect the controller and press a couple of buttons. |
Gamepads are detected properly when creating a local game project (both debug and release), but they are not detected when the project is deployed.
I have created a simple project that reproduces the problem:
XboxGamepadTest.zip
For convenience, the only difference between this project and a brand new BlazorGL project is the code to read the gamepad and output it to the console. Here's the entire Game class:
If I run this locally, I can view the console in the browser to see that the gamepad does get connected once I press the A button (it does not connect until input is registered).
I have uploaded the project here:
https://files.flatredball.com/WebProjects/GamepadTest/wwwroot/
Unfortunately if I run this, the gamepad is never connected, nor is input detected even if I press buttons on the gamepad.
This problem reproduces on both Chrome and Firefox, but mysteriously enough it works fine in Edge.
What could I be doing wrong on Firefox and Chrome?
What version of KNI does the bug occur on:
What operating system are you using:
What KNI platform are you using:
The text was updated successfully, but these errors were encountered: