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
Upstream joystick handling, fixes some broken games #68
Merged
inactive123
merged 10 commits into
libretro:master
from
bbbradsmith:upstream_joystick_handling
Dec 21, 2020
Merged
Upstream joystick handling, fixes some broken games #68
inactive123
merged 10 commits into
libretro:master
from
bbbradsmith:upstream_joystick_handling
Dec 21, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…etJoystickData which isn't how some games get their joystick data
…acts with Hatari much better and can per-game override input changes: hatari GUI now on "start", virtual keyboard now on "Y", stats/key-page now on L/R and mouse-speed on L2/R2
…ead only replace the JOYSTICK_REALSTICK
This was referenced Oct 28, 2020
…nd don't want conflicts with retroarch hotkeys)
I've been testing this for several weeks now, and I got some positive testing confirmation from two other users here: #50 (comment) |
My bad for noticing this so late. Here you go. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some games were not working the with joystick. The problem seemed to be that we had used IKBD_GetJoystickData to insert our joystick data, instead of further upstream at Joy_GetStickData, which has some other ways to be called besides just in that IKBD function. Games that used an alternate method were thus failing to get joystick readings.
This should fix issue #50 and I tested it with Altered Beast, Alien Syndrome and Time Bandit, which all previously didn't work.
While doing this, I also removed the joystick button mapping to select number of joysticks, which was never implemented properly and doesn't actually map to any Hatari setting properly as far as I can tell? Instead I turned 1 or 2 joysticks into a libretro option that enables/disables the second joystick through Hatari's config. It seems to be a good default to leave it on, since it does not appear to cause conflicts with the mouse normally, but with the option it can be turned off (and with per-game override) if the need arises.
Also saw a request for a space bar to controller mapping #46 which I put on R3. (Since start was freed up, I moved the Hatari GUI there, where it might be more intuitive, and put the virtual keyboard on X where it might be easier to find. Removed redundant tilde for GUI which conflicted with a key in use.)
Added start in GUI to exit from GUI so it works both ways now. (This also allows savestate restore to leave the GUI now.)
Added options to disable mouse/keyboard input in case they conflict with hotkeys or other things and you'd like to do input only from the gamepad.
(Also includes pull #67 which is just a minor update to the internal savestate.)