mirror of https://github.com/bsnes-emu/bsnes.git
Update to bsnes v041r02? release.
New WIP. I've added the centering code. Had to hide and show the window to prevent the Windows 'restore-from-taskbar' animation. That's causing Xorg events to not propagate quickly enough so sometimes the windows start minimized. I'll keep working on it. I've also killed joypad<>::up, down, left, right; and added joypad<>::hat<0-3>. So far, I've adapted the Qt UI to map analog axes. You'll see now when you map one that you get ::lo or ::hi to indicate the state direction at the time of assignment. I have not done this for hats, so only the 'up' direction will map currently. I only know how to read the first two axes (first stick) on Windows, so it won't see any others yet. For the mapping, I made it both range-sensitive (requires at least 75% force to map, 50% force to trigger) and distance-sensitive (prevents auto-assignment for those annoying analog sticks that flicker within a few points in any direction; also protects against those sixaxis buttons that are idle at +32767) -- the distance is at 512, and slow movement causes ~1,000+ movement based on ~20ms sampling, should be enough. To prevent rapid assignment of the same analog axis when using the "Assign All ..." button, and because it makes no sense to allow it, I've added a check to make sure that each key assignment is unique to all previous ones. This doesn't apply to individual assignment in case you really do want one key to map to two inputs. It was that or add a ~200ms delay between each assignment. The only thing my emulator doesn't handle completely are those six- axis buttons. Mostly because I have no way of telling what they are. I can't tell if a user is holding a stick south-east, or if it's a button not pressed. You can map them anyway, but it won't work as you expect a button to. Lastly, I'm not sure how to support mouse pass-through just yet. Right now I block mouse input when the mouse isn't exclusively acquired. If I don't, then clicking to acquire the mouse will send a 'fire' command to the emulator. But if I do, then you can't use a mouse as a joypad. [No archive available]
This commit is contained in:
parent
91270e504a
commit
d15092dada