Skip to content
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

Add HID support for macOS #3031

Merged
merged 4 commits into from
Feb 20, 2022
Merged

Add HID support for macOS #3031

merged 4 commits into from
Feb 20, 2022

Conversation

rom1v
Copy link
Collaborator

@rom1v rom1v commented Feb 17, 2022

Build with libusb on macOS to enable HID/OTG features.

Due to a bug in SDL (libsdl-org/SDL#5340) related to relative mouse mode, implement a workaround to capture the mouse correctly (and avoid double mouse cursors).

Fixes #2774

Tests welcome.


FYI, Windows support (for OTG only) will be provided by #3011.

@rom1v rom1v mentioned this pull request Feb 17, 2022
@r4dixx
Copy link

r4dixx commented Feb 19, 2022

Thank you for this. However, I'm encountering a particular issue in both --otg and -KM mode. I have to click to get my cursor back. In other words, option does not suffice. I have to do option, then left click and my cursor is back.

EDIT: For some reason this does not happen all the time. Although this seems to be a pretty consistent issue in --otg mode

HID/OTG features are not limited to Linux anymore.

PR #3031 <#3031>
Using the screen instance or not in these functions is an implementation
detail. Further changes will require the screen instance.

Refs 7848a38
PR #3031 <#3031>
On macOS, SDL relative mouse mode does not work correctly when the
cursor is outside the window.

As a workaround, move the cursor inside the window before setting the
relative mouse mode.

Refs SDL/#5340 <libsdl-org/SDL#5340>
PR #3031 <#3031>
@rom1v
Copy link
Collaborator Author

rom1v commented Feb 20, 2022

Thank you for your tests 👍

Noted for the remaining bug. At least the "double cursor" issue has a workaround, this one looks minor.

I merge and hopefully everything will be fixed in libusb in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants