-
Notifications
You must be signed in to change notification settings - Fork 36
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
Joystick to keyboard mapping and secondary BBC joystick support #95
Open
monkeyman79
wants to merge
38
commits into
stardot:master
Choose a base branch
from
monkeyman79:joystick-mapping-rebased
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
- Assigning host joystick axes and buttons to BBC keyboard (up to 2 joysticks or gamepads separately). - New human readable file format for joystick mapping (see Documents/JoystickMap.txt) - Option to automatically load image-specific joystick mapping file (same as disk name, but .jmap extension) - Fixed displaying keys assigned to Shift in User Mapping dialog - Added "Unassign" to keyboard and joystick mapping dialog - Joystick mapping table is separate from key mapping table - Mapping joysticks is done separately from keyboard (but using the same dialog code) - Highlight assigned keys in joystick mapping dialog
Map first two PC joystick or gamepad fire buttons to two BBC joystick buttons separately. Fixes stardot#74
Also replace -> with right-arrow symbol
Moved SetDlgItemChecked() and IsDlgItemChecked() to new files, Dialog.cpp and Dialog.h
- Moved joystick state to JoystickState struct - Removed ResetJoystick - Fixed some signedness warnings - Unmute when keyboard mapping dialog is closed
- Simplfied code a bit - Added CaptureJoystick() function to remove duplication - Renamed MaybeEnableInitJoystick() function for consistency
Long names are OK, and this makes it easier to search the code for related variables
- Maps from ... to BBCKey are now const - Functions GetBBCKeyBy... return pointer instead of reference
- Display checkmark next to 'Initialise Joystick' menu item if first joystick initialised OK. - Display warning message only if explicit initialisation failed.
- Added second BBC joystick support - Select PC joystick and axes for each BBC joystick
This option disabled the ADC and Serial interface, presumably to make the emulator run faster. I've removed this option as it doesn't affect performance particularly, and simplifies joystick handling.
This fixes an issue where the joystick position would never be centred. With this change, the joystick is centred when the mouse is in the centre of the BeebEm window.
- Moved joystick handling to separate class and files - Up to 4 joysticks mapped to keyboard
This is somewhat experimental and may be changed or removed in the future
- Autodetect secondary thumbstick axes - Display joystick names in menu - More user friendly axis names - Map right thumbstick axes Z/RZ to RX/RY in joystick to keyboard mapping if those axes are not present to make mapping files more portable - Changed axes order, old mapping files may need to be updated
and removed unneeded backward compatiblity for jmap files
- Move joystick configuration to "Joysticks" menu - Update menus.html and keyboard.html
- Add joystick sensitivity to menu - Add joystick to keyboard threshold to menu - Update menus.html
chrisn
force-pushed
the
master
branch
2 times, most recently
from
January 14, 2023 12:02
f9b9c33
to
917bced
Compare
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.
Another redo of PR #87. Rebased branch because previous one became messy.