fishfolk / bones

An easy-to-use game engine for making real games.
https://fishfolk.org/development/bones/introduction/
Other
240 stars 20 forks source link

Input: Gamepad (PS5 controller) on macOS + firefox button mapping is wrong on wasm #478

Open MaxCWhitehead opened 1 month ago

MaxCWhitehead commented 1 month ago

Working on updating bones for jumpy - after updating bones with #475, controller on wasm seems to not map inputs correctly. The confirm / back buttons seem mixed up. Or some other issue, seems broken, not 100% in what way yet.

Tested with PS5 (dual sense) controller, I do not know if this is issue with gilrs newer version, our changes with gilrs, or somehow jumpy related. Will gather more info / experiment. EDIT: This is an issue on macOS in firefox, but not on chrome.

Update to bones on jumpy is not yet merged, but this can be repro'd by checking out this pr: https://github.com/fishfolk/jumpy/pull/1032 (gh pr checkout 1032) and running just build-web and comparing with non-wasm cargo run.

@RockasMockas if possible it may be helpful if you could see if this repos with other gamepads (if you have something else), mine are all kinda scattered in boxes lol. No worries if not.

MaxCWhitehead commented 1 month ago

Reading random gilrs issues - this could be specific to platform and browser lol, I am on macOS + firefox. Will grab add some logging soon and see if can get more info on what gilrs thinks is happening. there be dragons, maybe

MaxCWhitehead commented 1 month ago

Ok does not repo on chrome - @RockasMockas disregard, def gilrs issue and not your changes. There do be dragons. Seems like a regression in gilrs, will do more digging on gilrs issues and see if can find any solutions.

EDIT: actually not even sure if would call this a regression as previously ps5 controller crashed if you hit dpad on macOS in native build - and this is fixed, so weirdness in wasm for ps5 is def the lesser of two evils. Need to verify the past wasm behavior of ps5/wasm/firefox/macos - but native has improved.

zicklag commented 1 month ago

Just a historical note, I believe in the past it was possible to crash Firefox using a PS5 or some other kind of controller, which was absolutely a browser problem.

MaxCWhitehead commented 1 month ago

it does seem equally broken previously - ok I'll leave this open for tracking but no regression here.