Enable mouse input via gamepad + various mouse improvements #2
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.
At present, it is impossible to play mouse enabled games with this core on devices that do not have a physical mouse or touchscreen. This PR adds support for controlling mouse input via a gamepad, with the following new core options:
Pointer Device
:Mouse
: Uses physical mouse for inputTouchscreen (Pointer API)
: Uses pointer APILeft Analog
: Cursor is controlled using the left analog stick of the gamepad in port 1Right Analog
: Cursor is controlled using the right analog stick of the gamepad in port 1D-Pad
: Cursor is controlled using the d-pad of the gamepad in port 1 (disables normal d-pad input)Pointer Speed
: Allows the relative speed of cursor movement to be controlled for all input modes other thanTouchscreen (Pointer API)
. Cursor position is determined with sub-pixel precisionGamepad Analog Deadzone
: Sets the analog stick deadzone (e.g. X360 pads typically need a deadzone of 15% to prevent drift)Additional gamepad inputs for port 1 are mapped as follows:
R2
: Mouse left clickL2
: Mouse right clickL
: Slows the mouse cursor (for fine control) when usingLeft Analog
,Right Analog
orD-Pad
for cursor movementThe PR also adds a
Mouse Cursor Color
option, and fixes 2 mouse-related bugs: